J81.NSToolkit.Config/Public/ns-functions-config-appfw.ps1

function Invoke-NSDeleteAppfwarchive {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for archive resource.
    .PARAMETER Name
        Name of tar archive.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwarchive -Name <string>
        An example how to delete appfwarchive config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwarchive
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwarchive/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwarchive: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwarchive -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwarchive: Finished"
    }
}

function Invoke-NSExportAppfwarchive {
    <#
    .SYNOPSIS
        Export Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for archive resource.
    .PARAMETER Name
        Name of tar archive.
    .PARAMETER Target
        Path to the file to be exported.
    .EXAMPLE
        PS C:\>Invoke-NSExportAppfwarchive -name <string> -target <string>
        An example how to export appfwarchive config Object(s).
    .NOTES
        File Name : Invoke-NSExportAppfwarchive
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwarchive/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateLength(1, 2047)]
        [string]$Target 

    )
    begin {
        Write-Verbose "Invoke-NSExportAppfwarchive: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                target         = $target
            }

            if ( $PSCmdlet.ShouldProcess($Name, "Export Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwarchive -Action export -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSExportAppfwarchive: Finished"
    }
}

function Invoke-NSImportAppfwarchive {
    <#
    .SYNOPSIS
        Import Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for archive resource.
    .PARAMETER Src
        Indicates the source of the tar archive file as a URL
        of the form
          
        &lt;protocol&gt;://&lt;host&gt;[:&lt;port&gt;][/&lt;path&gt;]
          
        &lt;protocol&gt; is http or https.
        &lt;host&gt; is the DNS name or IP address of the http or https server.
        &lt;port&gt; is the port number of the server. If omitted, the
        default port for http or https will be used.
        &lt;path&gt; is the path of the file on the server.
          
        Import will fail if an https server requires client
        certificate authentication.
          
          
        .
    .PARAMETER Name
        Name of tar archive.
    .PARAMETER Comment
        Comments associated with this archive.
    .EXAMPLE
        PS C:\>Invoke-NSImportAppfwarchive -src <string> -name <string>
        An example how to import appfwarchive config Object(s).
    .NOTES
        File Name : Invoke-NSImportAppfwarchive
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwarchive/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateLength(1, 2047)]
        [string]$Src,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment 

    )
    begin {
        Write-Verbose "Invoke-NSImportAppfwarchive: Starting"
    }
    process {
        try {
            $payload = @{ src = $src
                name          = $name
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSCmdlet.ShouldProcess($Name, "Import Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwarchive -Action import -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSImportAppfwarchive: Finished"
    }
}

function Invoke-NSGetAppfwarchive {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for archive resource.
    .PARAMETER GetAll
        Retrieve all appfwarchive object(s).
    .PARAMETER Count
        If specified, the count of the appfwarchive object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwarchive
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwarchive -GetAll
        Get all appfwarchive data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwarchive -name <string>
        Get appfwarchive object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwarchive -Filter @{ 'name'='<value>' }
        Get appfwarchive data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwarchive
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwarchive/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwarchive: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwarchive objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwarchive -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwarchive objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwarchive -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwarchive objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwarchive -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwarchive configuration for property ''"

            } else {
                Write-Verbose "Retrieving appfwarchive configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwarchive -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwarchive: Ended"
    }
}

function Invoke-NSUnsetAppfwconfidfield {
    <#
    .SYNOPSIS
        Unset Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for configured confidential form fields resource.
    .PARAMETER Fieldname
        Name of the form field to designate as confidential.
    .PARAMETER Url
        URL of the web page that contains the web form.
    .PARAMETER Comment
        Any comments to preserve information about the form field designation.
    .PARAMETER Isregex
        Method of specifying the form field name. Available settings function as follows:
        * REGEX. Form field is a regular expression.
        * NOTREGEX. Form field is a literal string.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER State
        Enable or disable the confidential field designation.
          
        Possible values = ENABLED, DISABLED
    .EXAMPLE
        PS C:\>Invoke-NSUnsetAppfwconfidfield -fieldname <string> -url <string>
        An example how to unset appfwconfidfield config Object(s).
    .NOTES
        File Name : Invoke-NSUnsetAppfwconfidfield
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwconfidfield
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Fieldname,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Url,

        [Boolean]$comment,

        [Boolean]$isregex,

        [Boolean]$state 
    )
    begin {
        Write-Verbose "Invoke-NSUnsetAppfwconfidfield: Starting"
    }
    process {
        try {
            $payload = @{ fieldname = $fieldname
                url                 = $url
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSCmdlet.ShouldProcess("$fieldname url", "Unset Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type appfwconfidfield -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUnsetAppfwconfidfield: Finished"
    }
}

function Invoke-NSAddAppfwconfidfield {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for configured confidential form fields resource.
    .PARAMETER Fieldname
        Name of the form field to designate as confidential.
    .PARAMETER Url
        URL of the web page that contains the web form.
    .PARAMETER Isregex
        Method of specifying the form field name. Available settings function as follows:
        * REGEX. Form field is a regular expression.
        * NOTREGEX. Form field is a literal string.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER Comment
        Any comments to preserve information about the form field designation.
    .PARAMETER State
        Enable or disable the confidential field designation.
          
        Possible values = ENABLED, DISABLED
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwconfidfield -fieldname <string> -url <string>
        An example how to add appfwconfidfield config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwconfidfield
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwconfidfield/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Fieldname,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Url,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex = 'NOTREGEX',

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State = 'ENABLED' 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwconfidfield: Starting"
    }
    process {
        try {
            $payload = @{ fieldname = $fieldname
                url                 = $url
            }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSCmdlet.ShouldProcess("appfwconfidfield", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwconfidfield -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwconfidfield: Finished"
    }
}

function Invoke-NSDeleteAppfwconfidfield {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for configured confidential form fields resource.
    .PARAMETER Fieldname
        Name of the form field to designate as confidential.
    .PARAMETER Url
        URL of the web page that contains the web form.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwconfidfield -Fieldname <string>
        An example how to delete appfwconfidfield config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwconfidfield
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwconfidfield/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Fieldname,

        [string]$Url 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwconfidfield: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Url') ) { $arguments.Add('url', $Url) }
            if ( $PSCmdlet.ShouldProcess("$fieldname", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwconfidfield -NitroPath nitro/v1/config -Resource $fieldname -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwconfidfield: Finished"
    }
}

function Invoke-NSUpdateAppfwconfidfield {
    <#
    .SYNOPSIS
        Update Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for configured confidential form fields resource.
    .PARAMETER Fieldname
        Name of the form field to designate as confidential.
    .PARAMETER Url
        URL of the web page that contains the web form.
    .PARAMETER Comment
        Any comments to preserve information about the form field designation.
    .PARAMETER Isregex
        Method of specifying the form field name. Available settings function as follows:
        * REGEX. Form field is a regular expression.
        * NOTREGEX. Form field is a literal string.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER State
        Enable or disable the confidential field designation.
          
        Possible values = ENABLED, DISABLED
    .EXAMPLE
        PS C:\>Invoke-NSUpdateAppfwconfidfield -fieldname <string> -url <string>
        An example how to update appfwconfidfield config Object(s).
    .NOTES
        File Name : Invoke-NSUpdateAppfwconfidfield
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwconfidfield/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Fieldname,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Url,

        [string]$Comment,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State 
    )
    begin {
        Write-Verbose "Invoke-NSUpdateAppfwconfidfield: Starting"
    }
    process {
        try {
            $payload = @{ fieldname = $fieldname
                url                 = $url
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSCmdlet.ShouldProcess("appfwconfidfield", "Update Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwconfidfield -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUpdateAppfwconfidfield: Finished"
    }
}

function Invoke-NSGetAppfwconfidfield {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for configured confidential form fields resource.
    .PARAMETER GetAll
        Retrieve all appfwconfidfield object(s).
    .PARAMETER Count
        If specified, the count of the appfwconfidfield object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwconfidfield
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwconfidfield -GetAll
        Get all appfwconfidfield data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwconfidfield -Count
        Get the number of appfwconfidfield objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwconfidfield -name <string>
        Get appfwconfidfield object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwconfidfield -Filter @{ 'name'='<value>' }
        Get appfwconfidfield data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwconfidfield
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwconfidfield/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwconfidfield: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwconfidfield objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwconfidfield -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwconfidfield objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwconfidfield -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwconfidfield objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwconfidfield -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwconfidfield configuration for property ''"

            } else {
                Write-Verbose "Retrieving appfwconfidfield configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwconfidfield -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwconfidfield: Ended"
    }
}

function Invoke-NSExportAppfwcustomsettings {
    <#
    .SYNOPSIS
        Export Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall custom settings XML configuration resource.
    .PARAMETER Name
        .
    .PARAMETER Target
        .
    .EXAMPLE
        PS C:\>Invoke-NSExportAppfwcustomsettings -name <string> -target <string>
        An example how to export appfwcustomsettings config Object(s).
    .NOTES
        File Name : Invoke-NSExportAppfwcustomsettings
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwcustomsettings/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateLength(1, 2047)]
        [string]$Target 

    )
    begin {
        Write-Verbose "Invoke-NSExportAppfwcustomsettings: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                target         = $target
            }

            if ( $PSCmdlet.ShouldProcess($Name, "Export Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwcustomsettings -Action export -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSExportAppfwcustomsettings: Finished"
    }
}

function Invoke-NSDeleteAppfwfieldtype {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall form field type resource.
    .PARAMETER Name
        Name for the field type.
        Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after the field type is added.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwfieldtype -Name <string>
        An example how to delete appfwfieldtype config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwfieldtype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwfieldtype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwfieldtype: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwfieldtype -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwfieldtype: Finished"
    }
}

function Invoke-NSUpdateAppfwfieldtype {
    <#
    .SYNOPSIS
        Update Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall form field type resource.
    .PARAMETER Name
        Name for the field type.
        Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after the field type is added.
    .PARAMETER Regex
        PCRE - format regular expression defining the characters and length allowed for this field type.
    .PARAMETER Priority
        Positive integer specifying the priority of the field type. A lower number specifies a higher priority. Field types are checked in the order of their priority numbers.
          
        Maximum value = 64000
    .PARAMETER Comment
        Comment describing the type of field that this field type is intended to match.
    .PARAMETER PassThru
        Return details about the created appfwfieldtype item.
    .EXAMPLE
        PS C:\>Invoke-NSUpdateAppfwfieldtype -name <string> -regex <string> -priority <double>
        An example how to update appfwfieldtype config Object(s).
    .NOTES
        File Name : Invoke-NSUpdateAppfwfieldtype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwfieldtype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Regex,

        [Parameter(Mandatory)]
        [double]$Priority,

        [string]$Comment,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSUpdateAppfwfieldtype: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                regex          = $regex
                priority       = $priority
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSCmdlet.ShouldProcess("appfwfieldtype", "Update Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwfieldtype -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwfieldtype -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUpdateAppfwfieldtype: Finished"
    }
}

function Invoke-NSAddAppfwfieldtype {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall form field type resource.
    .PARAMETER Name
        Name for the field type.
        Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after the field type is added.
    .PARAMETER Regex
        PCRE - format regular expression defining the characters and length allowed for this field type.
    .PARAMETER Priority
        Positive integer specifying the priority of the field type. A lower number specifies a higher priority. Field types are checked in the order of their priority numbers.
          
        Maximum value = 64000
    .PARAMETER Comment
        Comment describing the type of field that this field type is intended to match.
    .PARAMETER PassThru
        Return details about the created appfwfieldtype item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwfieldtype -name <string> -regex <string> -priority <double>
        An example how to add appfwfieldtype config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwfieldtype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwfieldtype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Regex,

        [Parameter(Mandatory)]
        [double]$Priority,

        [string]$Comment,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwfieldtype: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                regex          = $regex
                priority       = $priority
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSCmdlet.ShouldProcess("appfwfieldtype", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwfieldtype -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwfieldtype -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwfieldtype: Finished"
    }
}

function Invoke-NSGetAppfwfieldtype {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for application firewall form field type resource.
    .PARAMETER Name
        Name for the field type.
        Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after the field type is added.
    .PARAMETER GetAll
        Retrieve all appfwfieldtype object(s).
    .PARAMETER Count
        If specified, the count of the appfwfieldtype object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwfieldtype
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwfieldtype -GetAll
        Get all appfwfieldtype data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwfieldtype -Count
        Get the number of appfwfieldtype objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwfieldtype -name <string>
        Get appfwfieldtype object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwfieldtype -Filter @{ 'name'='<value>' }
        Get appfwfieldtype data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwfieldtype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwfieldtype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwfieldtype: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwfieldtype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwfieldtype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwfieldtype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwfieldtype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwfieldtype objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwfieldtype -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwfieldtype configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwfieldtype -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwfieldtype configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwfieldtype -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwfieldtype: Ended"
    }
}

function Invoke-NSAddAppfwglobalAppfwpolicyBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the appfwpolicy that can be bound to appfwglobal.
    .PARAMETER Policyname
        Name of the policy.
    .PARAMETER Priority
        The priority of the policy.
    .PARAMETER State
        Enable or disable the binding to activate or deactivate the policy. This is applicable to classic policies only.
        Possible values = ENABLED, DISABLED
    .PARAMETER Gotopriorityexpression
        Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER Type
        Bind point to which to policy is bound.
        Possible values = REQ_OVERRIDE, REQ_DEFAULT, HTTPQUIC_REQ_OVERRIDE, HTTPQUIC_REQ_DEFAULT, NONE
    .PARAMETER Invoke
        If the current policy evaluates to TRUE, terminate evaluation of policies bound to the current policy label, and then forward the request to the specified virtual server or evaluate the specified policy label.
    .PARAMETER Labeltype
        Type of policy label invocation.
        Possible values = reqvserver, policylabel
    .PARAMETER Labelname
        Name of the policy label to invoke if the current policy evaluates to TRUE, the invoke parameter is set, and Label Type is set to Policy Label.
    .PARAMETER PassThru
        Return details about the created appfwglobal_appfwpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwglobalAppfwpolicyBinding -policyname <string> -priority <double>
        An example how to add appfwglobal_appfwpolicy_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwglobalAppfwpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwglobal_appfwpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Policyname,

        [Parameter(Mandatory)]
        [double]$Priority,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQ_OVERRIDE', 'REQ_DEFAULT', 'HTTPQUIC_REQ_OVERRIDE', 'HTTPQUIC_REQ_DEFAULT', 'NONE')]
        [string]$Type,

        [boolean]$Invoke,

        [ValidateSet('reqvserver', 'policylabel')]
        [string]$Labeltype,

        [string]$Labelname,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwglobalAppfwpolicyBinding: Starting"
    }
    process {
        try {
            $payload = @{ policyname = $policyname
                priority             = $priority
            }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('type') ) { $payload.Add('type', $type) }
            if ( $PSBoundParameters.ContainsKey('invoke') ) { $payload.Add('invoke', $invoke) }
            if ( $PSBoundParameters.ContainsKey('labeltype') ) { $payload.Add('labeltype', $labeltype) }
            if ( $PSBoundParameters.ContainsKey('labelname') ) { $payload.Add('labelname', $labelname) }
            if ( $PSCmdlet.ShouldProcess("appfwglobal_appfwpolicy_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwglobal_appfwpolicy_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwglobalAppfwpolicyBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwglobalAppfwpolicyBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwglobalAppfwpolicyBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the appfwpolicy that can be bound to appfwglobal.
    .PARAMETER Policyname
        Name of the policy.
    .PARAMETER Type
        Bind point to which to policy is bound.
        Possible values = REQ_OVERRIDE, REQ_DEFAULT, HTTPQUIC_REQ_OVERRIDE, HTTPQUIC_REQ_DEFAULT, NONE
    .PARAMETER Priority
        The priority of the policy.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwglobalAppfwpolicyBinding
        An example how to delete appfwglobal_appfwpolicy_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwglobalAppfwpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwglobal_appfwpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [string]$Policyname,

        [string]$Type,

        [double]$Priority 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwglobalAppfwpolicyBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Type') ) { $arguments.Add('type', $Type) }
            if ( $PSBoundParameters.ContainsKey('Priority') ) { $arguments.Add('priority', $Priority) }
            if ( $PSCmdlet.ShouldProcess("appfwglobal_appfwpolicy_binding", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwglobal_appfwpolicy_binding -NitroPath nitro/v1/config -Resource $ -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwglobalAppfwpolicyBinding: Finished"
    }
}

function Invoke-NSGetAppfwglobalAppfwpolicyBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the appfwpolicy that can be bound to appfwglobal.
    .PARAMETER Type
        Bind point to which to policy is bound.
        Possible values = REQ_OVERRIDE, REQ_DEFAULT, HTTPQUIC_REQ_OVERRIDE, HTTPQUIC_REQ_DEFAULT, NONE
    .PARAMETER GetAll
        Retrieve all appfwglobal_appfwpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwglobal_appfwpolicy_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAppfwpolicyBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAppfwpolicyBinding -GetAll
        Get all appfwglobal_appfwpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAppfwpolicyBinding -Count
        Get the number of appfwglobal_appfwpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAppfwpolicyBinding -name <string>
        Get appfwglobal_appfwpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAppfwpolicyBinding -Filter @{ 'name'='<value>' }
        Get appfwglobal_appfwpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwglobalAppfwpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwglobal_appfwpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateSet('REQ_OVERRIDE', 'REQ_DEFAULT', 'HTTPQUIC_REQ_OVERRIDE', 'HTTPQUIC_REQ_DEFAULT', 'NONE')]
        [string]$Type,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwglobalAppfwpolicyBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwglobal_appfwpolicy_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_appfwpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwglobal_appfwpolicy_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_appfwpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwglobal_appfwpolicy_binding objects by arguments"
                $arguments = @{ } 
                if ( $PSBoundParameters.ContainsKey('type') ) { $arguments.Add('type', $type) }
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_appfwpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwglobal_appfwpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving appfwglobal_appfwpolicy_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_appfwpolicy_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwglobalAppfwpolicyBinding: Ended"
    }
}

function Invoke-NSAddAppfwglobalAuditnslogpolicyBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the auditnslogpolicy that can be bound to appfwglobal.
    .PARAMETER Policyname
        Name of the policy.
    .PARAMETER Priority
        The priority of the policy.
    .PARAMETER State
        Enable or disable the binding to activate or deactivate the policy. This is applicable to classic policies only.
        Possible values = ENABLED, DISABLED
    .PARAMETER Gotopriorityexpression
        Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * USE_INVOCATION_RESULT - Applicable if this policy invokes another policy label. If the final goto in the invoked policy label has a value of END, the evaluation stops. If the final goto is anything other than END, the current policy label performs a NEXT. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is smaller than the current policy's priority number. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Type
        Bind point to which to policy is bound.
        Possible values = REQ_OVERRIDE, REQ_DEFAULT, HTTPQUIC_REQ_OVERRIDE, HTTPQUIC_REQ_DEFAULT, NONE
    .PARAMETER Invoke
        If the current policy evaluates to TRUE, terminate evaluation of policies bound to the current policy label, and then forward the request to the specified virtual server or evaluate the specified policy label.
    .PARAMETER Labeltype
        Type of policy label to invoke if the current policy evaluates to TRUE and the invoke parameter is set. Available settings function as follows: * reqvserver. Invoke the unnamed policy label associated with the specified request virtual server. * policylabel. Invoke the specified user-defined policy label.
        Possible values = reqvserver, policylabel
    .PARAMETER Labelname
        Name of the policy label to invoke if the current policy evaluates to TRUE, the invoke parameter is set, and Label Type is set to Policy Label.
    .PARAMETER PassThru
        Return details about the created appfwglobal_auditnslogpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwglobalAuditnslogpolicyBinding -policyname <string> -priority <double>
        An example how to add appfwglobal_auditnslogpolicy_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwglobalAuditnslogpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwglobal_auditnslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Policyname,

        [Parameter(Mandatory)]
        [double]$Priority,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQ_OVERRIDE', 'REQ_DEFAULT', 'HTTPQUIC_REQ_OVERRIDE', 'HTTPQUIC_REQ_DEFAULT', 'NONE')]
        [string]$Type,

        [boolean]$Invoke,

        [ValidateSet('reqvserver', 'policylabel')]
        [string]$Labeltype,

        [string]$Labelname,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwglobalAuditnslogpolicyBinding: Starting"
    }
    process {
        try {
            $payload = @{ policyname = $policyname
                priority             = $priority
            }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('type') ) { $payload.Add('type', $type) }
            if ( $PSBoundParameters.ContainsKey('invoke') ) { $payload.Add('invoke', $invoke) }
            if ( $PSBoundParameters.ContainsKey('labeltype') ) { $payload.Add('labeltype', $labeltype) }
            if ( $PSBoundParameters.ContainsKey('labelname') ) { $payload.Add('labelname', $labelname) }
            if ( $PSCmdlet.ShouldProcess("appfwglobal_auditnslogpolicy_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwglobal_auditnslogpolicy_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwglobalAuditnslogpolicyBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwglobalAuditnslogpolicyBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwglobalAuditnslogpolicyBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the auditnslogpolicy that can be bound to appfwglobal.
    .PARAMETER Policyname
        Name of the policy.
    .PARAMETER Type
        Bind point to which to policy is bound.
        Possible values = REQ_OVERRIDE, REQ_DEFAULT, HTTPQUIC_REQ_OVERRIDE, HTTPQUIC_REQ_DEFAULT, NONE
    .PARAMETER Priority
        The priority of the policy.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwglobalAuditnslogpolicyBinding
        An example how to delete appfwglobal_auditnslogpolicy_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwglobalAuditnslogpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwglobal_auditnslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [string]$Policyname,

        [string]$Type,

        [double]$Priority 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwglobalAuditnslogpolicyBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Type') ) { $arguments.Add('type', $Type) }
            if ( $PSBoundParameters.ContainsKey('Priority') ) { $arguments.Add('priority', $Priority) }
            if ( $PSCmdlet.ShouldProcess("appfwglobal_auditnslogpolicy_binding", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwglobal_auditnslogpolicy_binding -NitroPath nitro/v1/config -Resource $ -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwglobalAuditnslogpolicyBinding: Finished"
    }
}

function Invoke-NSGetAppfwglobalAuditnslogpolicyBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the auditnslogpolicy that can be bound to appfwglobal.
    .PARAMETER Type
        Bind point to which to policy is bound.
        Possible values = REQ_OVERRIDE, REQ_DEFAULT, HTTPQUIC_REQ_OVERRIDE, HTTPQUIC_REQ_DEFAULT, NONE
    .PARAMETER GetAll
        Retrieve all appfwglobal_auditnslogpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwglobal_auditnslogpolicy_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAuditnslogpolicyBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAuditnslogpolicyBinding -GetAll
        Get all appfwglobal_auditnslogpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAuditnslogpolicyBinding -Count
        Get the number of appfwglobal_auditnslogpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAuditnslogpolicyBinding -name <string>
        Get appfwglobal_auditnslogpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAuditnslogpolicyBinding -Filter @{ 'name'='<value>' }
        Get appfwglobal_auditnslogpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwglobalAuditnslogpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwglobal_auditnslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateSet('REQ_OVERRIDE', 'REQ_DEFAULT', 'HTTPQUIC_REQ_OVERRIDE', 'HTTPQUIC_REQ_DEFAULT', 'NONE')]
        [string]$Type,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwglobalAuditnslogpolicyBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwglobal_auditnslogpolicy_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_auditnslogpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwglobal_auditnslogpolicy_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_auditnslogpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwglobal_auditnslogpolicy_binding objects by arguments"
                $arguments = @{ } 
                if ( $PSBoundParameters.ContainsKey('type') ) { $arguments.Add('type', $type) }
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_auditnslogpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwglobal_auditnslogpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving appfwglobal_auditnslogpolicy_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_auditnslogpolicy_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwglobalAuditnslogpolicyBinding: Ended"
    }
}

function Invoke-NSAddAppfwglobalAuditsyslogpolicyBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the auditsyslogpolicy that can be bound to appfwglobal.
    .PARAMETER Policyname
        Name of the policy.
    .PARAMETER Priority
        The priority of the policy.
    .PARAMETER State
        Enable or disable the binding to activate or deactivate the policy. This is applicable to classic policies only.
        Possible values = ENABLED, DISABLED
    .PARAMETER Gotopriorityexpression
        Expression or other value specifying the next policy to evaluate if the current policy evaluates to TRUE. Specify one of the following values: * NEXT - Evaluate the policy with the next higher priority number. * END - End policy evaluation. * USE_INVOCATION_RESULT - Applicable if this policy invokes another policy label. If the final goto in the invoked policy label has a value of END, the evaluation stops. If the final goto is anything other than END, the current policy label performs a NEXT. * An expression that evaluates to a number. If you specify an expression, the number to which it evaluates determines the next policy to evaluate, as follows: * If the expression evaluates to a higher numbered priority, the policy with that priority is evaluated next. * If the expression evaluates to the priority of the current policy, the policy with the next higher numbered priority is evaluated next. * If the expression evaluates to a number that is larger than the largest numbered priority, policy evaluation ends. An UNDEF event is triggered if: * The expression is invalid. * The expression evaluates to a priority number that is smaller than the current policy's priority number. * The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.
    .PARAMETER Type
        Bind point to which to policy is bound.
        Possible values = REQ_OVERRIDE, REQ_DEFAULT, HTTPQUIC_REQ_OVERRIDE, HTTPQUIC_REQ_DEFAULT, NONE
    .PARAMETER Invoke
        If the current policy evaluates to TRUE, terminate evaluation of policies bound to the current policy label, and then forward the request to the specified virtual server or evaluate the specified policy label.
    .PARAMETER Labeltype
        Type of policy label to invoke if the current policy evaluates to TRUE and the invoke parameter is set. Available settings function as follows: * reqvserver. Invoke the unnamed policy label associated with the specified request virtual server. * policylabel. Invoke the specified user-defined policy label.
        Possible values = reqvserver, policylabel
    .PARAMETER Labelname
        Name of the policy label to invoke if the current policy evaluates to TRUE, the invoke parameter is set, and Label Type is set to Policy Label.
    .PARAMETER PassThru
        Return details about the created appfwglobal_auditsyslogpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwglobalAuditsyslogpolicyBinding -policyname <string> -priority <double>
        An example how to add appfwglobal_auditsyslogpolicy_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwglobalAuditsyslogpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwglobal_auditsyslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Policyname,

        [Parameter(Mandatory)]
        [double]$Priority,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Gotopriorityexpression,

        [ValidateSet('REQ_OVERRIDE', 'REQ_DEFAULT', 'HTTPQUIC_REQ_OVERRIDE', 'HTTPQUIC_REQ_DEFAULT', 'NONE')]
        [string]$Type,

        [boolean]$Invoke,

        [ValidateSet('reqvserver', 'policylabel')]
        [string]$Labeltype,

        [string]$Labelname,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwglobalAuditsyslogpolicyBinding: Starting"
    }
    process {
        try {
            $payload = @{ policyname = $policyname
                priority             = $priority
            }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('type') ) { $payload.Add('type', $type) }
            if ( $PSBoundParameters.ContainsKey('invoke') ) { $payload.Add('invoke', $invoke) }
            if ( $PSBoundParameters.ContainsKey('labeltype') ) { $payload.Add('labeltype', $labeltype) }
            if ( $PSBoundParameters.ContainsKey('labelname') ) { $payload.Add('labelname', $labelname) }
            if ( $PSCmdlet.ShouldProcess("appfwglobal_auditsyslogpolicy_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwglobal_auditsyslogpolicy_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwglobalAuditsyslogpolicyBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwglobalAuditsyslogpolicyBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwglobalAuditsyslogpolicyBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the auditsyslogpolicy that can be bound to appfwglobal.
    .PARAMETER Policyname
        Name of the policy.
    .PARAMETER Type
        Bind point to which to policy is bound.
        Possible values = REQ_OVERRIDE, REQ_DEFAULT, HTTPQUIC_REQ_OVERRIDE, HTTPQUIC_REQ_DEFAULT, NONE
    .PARAMETER Priority
        The priority of the policy.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwglobalAuditsyslogpolicyBinding
        An example how to delete appfwglobal_auditsyslogpolicy_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwglobalAuditsyslogpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwglobal_auditsyslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [string]$Policyname,

        [string]$Type,

        [double]$Priority 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwglobalAuditsyslogpolicyBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Type') ) { $arguments.Add('type', $Type) }
            if ( $PSBoundParameters.ContainsKey('Priority') ) { $arguments.Add('priority', $Priority) }
            if ( $PSCmdlet.ShouldProcess("appfwglobal_auditsyslogpolicy_binding", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Resource $ -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwglobalAuditsyslogpolicyBinding: Finished"
    }
}

function Invoke-NSGetAppfwglobalAuditsyslogpolicyBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the auditsyslogpolicy that can be bound to appfwglobal.
    .PARAMETER Type
        Bind point to which to policy is bound.
        Possible values = REQ_OVERRIDE, REQ_DEFAULT, HTTPQUIC_REQ_OVERRIDE, HTTPQUIC_REQ_DEFAULT, NONE
    .PARAMETER GetAll
        Retrieve all appfwglobal_auditsyslogpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwglobal_auditsyslogpolicy_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAuditsyslogpolicyBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAuditsyslogpolicyBinding -GetAll
        Get all appfwglobal_auditsyslogpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAuditsyslogpolicyBinding -Count
        Get the number of appfwglobal_auditsyslogpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAuditsyslogpolicyBinding -name <string>
        Get appfwglobal_auditsyslogpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalAuditsyslogpolicyBinding -Filter @{ 'name'='<value>' }
        Get appfwglobal_auditsyslogpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwglobalAuditsyslogpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwglobal_auditsyslogpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateSet('REQ_OVERRIDE', 'REQ_DEFAULT', 'HTTPQUIC_REQ_OVERRIDE', 'HTTPQUIC_REQ_DEFAULT', 'NONE')]
        [string]$Type,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwglobalAuditsyslogpolicyBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwglobal_auditsyslogpolicy_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwglobal_auditsyslogpolicy_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwglobal_auditsyslogpolicy_binding objects by arguments"
                $arguments = @{ } 
                if ( $PSBoundParameters.ContainsKey('type') ) { $arguments.Add('type', $type) }
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwglobal_auditsyslogpolicy_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving appfwglobal_auditsyslogpolicy_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_auditsyslogpolicy_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwglobalAuditsyslogpolicyBinding: Ended"
    }
}

function Invoke-NSGetAppfwglobalBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object which returns the resources bound to appfwglobal.
    .PARAMETER GetAll
        Retrieve all appfwglobal_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwglobal_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalBinding -GetAll
        Get all appfwglobal_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalBinding -name <string>
        Get appfwglobal_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwglobalBinding -Filter @{ 'name'='<value>' }
        Get appfwglobal_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwglobalBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwglobal_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwglobalBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwglobal_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwglobal_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwglobal_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwglobal_binding configuration for property ''"

            } else {
                Write-Verbose "Retrieving appfwglobal_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwglobal_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwglobalBinding: Ended"
    }
}

function Invoke-NSAddAppfwgrpccontenttype {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for gRRPC content type resource.
    .PARAMETER Grpccontenttypevalue
        Content type to be classified as gRPC.
    .PARAMETER Isregex
        Is gRPC content type a regular expression?.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER PassThru
        Return details about the created appfwgrpccontenttype item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwgrpccontenttype -grpccontenttypevalue <string>
        An example how to add appfwgrpccontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwgrpccontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwgrpccontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Grpccontenttypevalue,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex = 'NOTREGEX',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwgrpccontenttype: Starting"
    }
    process {
        try {
            $payload = @{ grpccontenttypevalue = $grpccontenttypevalue }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSCmdlet.ShouldProcess("appfwgrpccontenttype", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwgrpccontenttype -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwgrpccontenttype -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwgrpccontenttype: Finished"
    }
}

function Invoke-NSDeleteAppfwgrpccontenttype {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for gRRPC content type resource.
    .PARAMETER Grpccontenttypevalue
        Content type to be classified as gRPC.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwgrpccontenttype -Grpccontenttypevalue <string>
        An example how to delete appfwgrpccontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwgrpccontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwgrpccontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Grpccontenttypevalue 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwgrpccontenttype: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$grpccontenttypevalue", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwgrpccontenttype -NitroPath nitro/v1/config -Resource $grpccontenttypevalue -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwgrpccontenttype: Finished"
    }
}

function Invoke-NSGetAppfwgrpccontenttype {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for gRRPC content type resource.
    .PARAMETER Grpccontenttypevalue
        Content type to be classified as gRPC.
    .PARAMETER GetAll
        Retrieve all appfwgrpccontenttype object(s).
    .PARAMETER Count
        If specified, the count of the appfwgrpccontenttype object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpccontenttype
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpccontenttype -GetAll
        Get all appfwgrpccontenttype data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpccontenttype -Count
        Get the number of appfwgrpccontenttype objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpccontenttype -name <string>
        Get appfwgrpccontenttype object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpccontenttype -Filter @{ 'name'='<value>' }
        Get appfwgrpccontenttype data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwgrpccontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwgrpccontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Grpccontenttypevalue,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwgrpccontenttype: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwgrpccontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpccontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwgrpccontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpccontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwgrpccontenttype objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpccontenttype -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwgrpccontenttype configuration for property 'grpccontenttypevalue'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpccontenttype -NitroPath nitro/v1/config -Resource $grpccontenttypevalue -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwgrpccontenttype configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpccontenttype -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwgrpccontenttype: Ended"
    }
}

function Invoke-NSDeleteAppfwgrpcwebjsoncontenttype {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for gRRPC-Web-json content type resource.
    .PARAMETER Grpcwebjsoncontenttypevalue
        Content type to be classified as gRPC-web-json.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwgrpcwebjsoncontenttype -Grpcwebjsoncontenttypevalue <string>
        An example how to delete appfwgrpcwebjsoncontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwgrpcwebjsoncontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwgrpcwebjsoncontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Grpcwebjsoncontenttypevalue 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwgrpcwebjsoncontenttype: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$grpcwebjsoncontenttypevalue", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwgrpcwebjsoncontenttype -NitroPath nitro/v1/config -Resource $grpcwebjsoncontenttypevalue -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwgrpcwebjsoncontenttype: Finished"
    }
}

function Invoke-NSAddAppfwgrpcwebjsoncontenttype {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for gRRPC-Web-json content type resource.
    .PARAMETER Grpcwebjsoncontenttypevalue
        Content type to be classified as gRPC-web-json.
    .PARAMETER Isregex
        Is gRPC-web-json content type a regular expression?.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER PassThru
        Return details about the created appfwgrpcwebjsoncontenttype item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwgrpcwebjsoncontenttype -grpcwebjsoncontenttypevalue <string>
        An example how to add appfwgrpcwebjsoncontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwgrpcwebjsoncontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwgrpcwebjsoncontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Grpcwebjsoncontenttypevalue,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex = 'NOTREGEX',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwgrpcwebjsoncontenttype: Starting"
    }
    process {
        try {
            $payload = @{ grpcwebjsoncontenttypevalue = $grpcwebjsoncontenttypevalue }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSCmdlet.ShouldProcess("appfwgrpcwebjsoncontenttype", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwgrpcwebjsoncontenttype -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwgrpcwebjsoncontenttype -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwgrpcwebjsoncontenttype: Finished"
    }
}

function Invoke-NSGetAppfwgrpcwebjsoncontenttype {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for gRRPC-Web-json content type resource.
    .PARAMETER Grpcwebjsoncontenttypevalue
        Content type to be classified as gRPC-web-json.
    .PARAMETER GetAll
        Retrieve all appfwgrpcwebjsoncontenttype object(s).
    .PARAMETER Count
        If specified, the count of the appfwgrpcwebjsoncontenttype object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpcwebjsoncontenttype
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpcwebjsoncontenttype -GetAll
        Get all appfwgrpcwebjsoncontenttype data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpcwebjsoncontenttype -Count
        Get the number of appfwgrpcwebjsoncontenttype objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpcwebjsoncontenttype -name <string>
        Get appfwgrpcwebjsoncontenttype object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpcwebjsoncontenttype -Filter @{ 'name'='<value>' }
        Get appfwgrpcwebjsoncontenttype data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwgrpcwebjsoncontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwgrpcwebjsoncontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Grpcwebjsoncontenttypevalue,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwgrpcwebjsoncontenttype: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwgrpcwebjsoncontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpcwebjsoncontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwgrpcwebjsoncontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpcwebjsoncontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwgrpcwebjsoncontenttype objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpcwebjsoncontenttype -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwgrpcwebjsoncontenttype configuration for property 'grpcwebjsoncontenttypevalue'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpcwebjsoncontenttype -NitroPath nitro/v1/config -Resource $grpcwebjsoncontenttypevalue -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwgrpcwebjsoncontenttype configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpcwebjsoncontenttype -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwgrpcwebjsoncontenttype: Ended"
    }
}

function Invoke-NSAddAppfwgrpcwebtextcontenttype {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for gRRPC-Web-text content type resource.
    .PARAMETER Grpcwebtextcontenttypevalue
        Content type to be classified as gRPC-web-text.
    .PARAMETER Isregex
        Is gRPC-web-text content type a regular expression?.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER PassThru
        Return details about the created appfwgrpcwebtextcontenttype item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwgrpcwebtextcontenttype -grpcwebtextcontenttypevalue <string>
        An example how to add appfwgrpcwebtextcontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwgrpcwebtextcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwgrpcwebtextcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Grpcwebtextcontenttypevalue,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex = 'NOTREGEX',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwgrpcwebtextcontenttype: Starting"
    }
    process {
        try {
            $payload = @{ grpcwebtextcontenttypevalue = $grpcwebtextcontenttypevalue }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSCmdlet.ShouldProcess("appfwgrpcwebtextcontenttype", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwgrpcwebtextcontenttype -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwgrpcwebtextcontenttype -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwgrpcwebtextcontenttype: Finished"
    }
}

function Invoke-NSDeleteAppfwgrpcwebtextcontenttype {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for gRRPC-Web-text content type resource.
    .PARAMETER Grpcwebtextcontenttypevalue
        Content type to be classified as gRPC-web-text.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwgrpcwebtextcontenttype -Grpcwebtextcontenttypevalue <string>
        An example how to delete appfwgrpcwebtextcontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwgrpcwebtextcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwgrpcwebtextcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Grpcwebtextcontenttypevalue 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwgrpcwebtextcontenttype: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$grpcwebtextcontenttypevalue", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwgrpcwebtextcontenttype -NitroPath nitro/v1/config -Resource $grpcwebtextcontenttypevalue -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwgrpcwebtextcontenttype: Finished"
    }
}

function Invoke-NSGetAppfwgrpcwebtextcontenttype {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for gRRPC-Web-text content type resource.
    .PARAMETER Grpcwebtextcontenttypevalue
        Content type to be classified as gRPC-web-text.
    .PARAMETER GetAll
        Retrieve all appfwgrpcwebtextcontenttype object(s).
    .PARAMETER Count
        If specified, the count of the appfwgrpcwebtextcontenttype object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpcwebtextcontenttype
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpcwebtextcontenttype -GetAll
        Get all appfwgrpcwebtextcontenttype data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpcwebtextcontenttype -Count
        Get the number of appfwgrpcwebtextcontenttype objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpcwebtextcontenttype -name <string>
        Get appfwgrpcwebtextcontenttype object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwgrpcwebtextcontenttype -Filter @{ 'name'='<value>' }
        Get appfwgrpcwebtextcontenttype data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwgrpcwebtextcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwgrpcwebtextcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Grpcwebtextcontenttypevalue,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwgrpcwebtextcontenttype: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwgrpcwebtextcontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpcwebtextcontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwgrpcwebtextcontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpcwebtextcontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwgrpcwebtextcontenttype objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpcwebtextcontenttype -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwgrpcwebtextcontenttype configuration for property 'grpcwebtextcontenttypevalue'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpcwebtextcontenttype -NitroPath nitro/v1/config -Resource $grpcwebtextcontenttypevalue -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwgrpcwebtextcontenttype configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwgrpcwebtextcontenttype -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwgrpcwebtextcontenttype: Ended"
    }
}

function Invoke-NSImportAppfwhtmlerrorpage {
    <#
    .SYNOPSIS
        Import Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for HTML error page resource.
    .PARAMETER Src
        URL (protocol, host, path, and name) for the location at which to store the imported HTML error object.
        NOTE: The import fails if the object to be imported is on an HTTPS server that requires client certificate authentication for access.
    .PARAMETER Name
        Name of the XML error object to remove.
    .PARAMETER Comment
        Any comments to preserve information about the HTML error object.
    .PARAMETER Overwrite
        Overwrite any existing HTML error object of the same name.
    .EXAMPLE
        PS C:\>Invoke-NSImportAppfwhtmlerrorpage -src <string> -name <string>
        An example how to import appfwhtmlerrorpage config Object(s).
    .NOTES
        File Name : Invoke-NSImportAppfwhtmlerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwhtmlerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateLength(1, 2047)]
        [string]$Src,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [boolean]$Overwrite 

    )
    begin {
        Write-Verbose "Invoke-NSImportAppfwhtmlerrorpage: Starting"
    }
    process {
        try {
            $payload = @{ src = $src
                name          = $name
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('overwrite') ) { $payload.Add('overwrite', $overwrite) }
            if ( $PSCmdlet.ShouldProcess($Name, "Import Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwhtmlerrorpage -Action import -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSImportAppfwhtmlerrorpage: Finished"
    }
}

function Invoke-NSChangeAppfwhtmlerrorpage {
    <#
    .SYNOPSIS
        Change Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for HTML error page resource.
    .PARAMETER Name
        Name of the XML error object to remove.
    .PARAMETER PassThru
        Return details about the created appfwhtmlerrorpage item.
    .EXAMPLE
        PS C:\>Invoke-NSChangeAppfwhtmlerrorpage -name <string>
        An example how to change appfwhtmlerrorpage config Object(s).
    .NOTES
        File Name : Invoke-NSChangeAppfwhtmlerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwhtmlerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSChangeAppfwhtmlerrorpage: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }

            if ( $PSCmdlet.ShouldProcess("appfwhtmlerrorpage", "Change Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwhtmlerrorpage -Action update -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwhtmlerrorpage -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSChangeAppfwhtmlerrorpage: Finished"
    }
}

function Invoke-NSDeleteAppfwhtmlerrorpage {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for HTML error page resource.
    .PARAMETER Name
        Name of the XML error object to remove.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwhtmlerrorpage -Name <string>
        An example how to delete appfwhtmlerrorpage config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwhtmlerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwhtmlerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwhtmlerrorpage: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwhtmlerrorpage -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwhtmlerrorpage: Finished"
    }
}

function Invoke-NSGetAppfwhtmlerrorpage {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for HTML error page resource.
    .PARAMETER Name
        Name of the XML error object to remove.
    .PARAMETER GetAll
        Retrieve all appfwhtmlerrorpage object(s).
    .PARAMETER Count
        If specified, the count of the appfwhtmlerrorpage object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwhtmlerrorpage
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwhtmlerrorpage -GetAll
        Get all appfwhtmlerrorpage data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwhtmlerrorpage -name <string>
        Get appfwhtmlerrorpage object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwhtmlerrorpage -Filter @{ 'name'='<value>' }
        Get appfwhtmlerrorpage data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwhtmlerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwhtmlerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwhtmlerrorpage: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwhtmlerrorpage objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwhtmlerrorpage -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwhtmlerrorpage objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwhtmlerrorpage -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwhtmlerrorpage objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwhtmlerrorpage -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwhtmlerrorpage configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwhtmlerrorpage -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwhtmlerrorpage configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwhtmlerrorpage -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwhtmlerrorpage: Ended"
    }
}

function Invoke-NSDeleteAppfwjsoncontenttype {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for JSON content type resource.
    .PARAMETER Jsoncontenttypevalue
        Content type to be classified as JSON.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwjsoncontenttype -Jsoncontenttypevalue <string>
        An example how to delete appfwjsoncontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwjsoncontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwjsoncontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Jsoncontenttypevalue 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwjsoncontenttype: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$jsoncontenttypevalue", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwjsoncontenttype -NitroPath nitro/v1/config -Resource $jsoncontenttypevalue -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwjsoncontenttype: Finished"
    }
}

function Invoke-NSAddAppfwjsoncontenttype {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for JSON content type resource.
    .PARAMETER Jsoncontenttypevalue
        Content type to be classified as JSON.
    .PARAMETER Isregex
        Is json content type a regular expression?.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER PassThru
        Return details about the created appfwjsoncontenttype item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwjsoncontenttype -jsoncontenttypevalue <string>
        An example how to add appfwjsoncontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwjsoncontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwjsoncontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Jsoncontenttypevalue,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex = 'NOTREGEX',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwjsoncontenttype: Starting"
    }
    process {
        try {
            $payload = @{ jsoncontenttypevalue = $jsoncontenttypevalue }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSCmdlet.ShouldProcess("appfwjsoncontenttype", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwjsoncontenttype -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwjsoncontenttype -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwjsoncontenttype: Finished"
    }
}

function Invoke-NSGetAppfwjsoncontenttype {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for JSON content type resource.
    .PARAMETER Jsoncontenttypevalue
        Content type to be classified as JSON.
    .PARAMETER GetAll
        Retrieve all appfwjsoncontenttype object(s).
    .PARAMETER Count
        If specified, the count of the appfwjsoncontenttype object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwjsoncontenttype
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwjsoncontenttype -GetAll
        Get all appfwjsoncontenttype data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwjsoncontenttype -Count
        Get the number of appfwjsoncontenttype objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwjsoncontenttype -name <string>
        Get appfwjsoncontenttype object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwjsoncontenttype -Filter @{ 'name'='<value>' }
        Get appfwjsoncontenttype data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwjsoncontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwjsoncontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Jsoncontenttypevalue,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwjsoncontenttype: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwjsoncontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwjsoncontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwjsoncontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwjsoncontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwjsoncontenttype objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwjsoncontenttype -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwjsoncontenttype configuration for property 'jsoncontenttypevalue'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwjsoncontenttype -NitroPath nitro/v1/config -Resource $jsoncontenttypevalue -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwjsoncontenttype configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwjsoncontenttype -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwjsoncontenttype: Ended"
    }
}

function Invoke-NSImportAppfwjsonerrorpage {
    <#
    .SYNOPSIS
        Import Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for JSON error page resource.
    .PARAMETER Src
        URL (protocol, host, path, and name) for the location at which to store the imported JSON error object.
        NOTE: The import fails if the object to be imported is on an HTTPS server that requires client certificate authentication for access.
    .PARAMETER Name
        Indicates name of the imported json error page to be removed.
    .PARAMETER Comment
        Any comments to preserve information about the JSON error object.
    .PARAMETER Overwrite
        Overwrite any existing JSON error object of the same name.
    .EXAMPLE
        PS C:\>Invoke-NSImportAppfwjsonerrorpage -src <string> -name <string>
        An example how to import appfwjsonerrorpage config Object(s).
    .NOTES
        File Name : Invoke-NSImportAppfwjsonerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwjsonerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateLength(1, 2047)]
        [string]$Src,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [boolean]$Overwrite 

    )
    begin {
        Write-Verbose "Invoke-NSImportAppfwjsonerrorpage: Starting"
    }
    process {
        try {
            $payload = @{ src = $src
                name          = $name
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('overwrite') ) { $payload.Add('overwrite', $overwrite) }
            if ( $PSCmdlet.ShouldProcess($Name, "Import Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwjsonerrorpage -Action import -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSImportAppfwjsonerrorpage: Finished"
    }
}

function Invoke-NSChangeAppfwjsonerrorpage {
    <#
    .SYNOPSIS
        Change Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for JSON error page resource.
    .PARAMETER Name
        Indicates name of the imported json error page to be removed.
    .PARAMETER PassThru
        Return details about the created appfwjsonerrorpage item.
    .EXAMPLE
        PS C:\>Invoke-NSChangeAppfwjsonerrorpage -name <string>
        An example how to change appfwjsonerrorpage config Object(s).
    .NOTES
        File Name : Invoke-NSChangeAppfwjsonerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwjsonerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSChangeAppfwjsonerrorpage: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }

            if ( $PSCmdlet.ShouldProcess("appfwjsonerrorpage", "Change Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwjsonerrorpage -Action update -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwjsonerrorpage -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSChangeAppfwjsonerrorpage: Finished"
    }
}

function Invoke-NSDeleteAppfwjsonerrorpage {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for JSON error page resource.
    .PARAMETER Name
        Indicates name of the imported json error page to be removed.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwjsonerrorpage -Name <string>
        An example how to delete appfwjsonerrorpage config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwjsonerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwjsonerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwjsonerrorpage: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwjsonerrorpage -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwjsonerrorpage: Finished"
    }
}

function Invoke-NSGetAppfwjsonerrorpage {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for JSON error page resource.
    .PARAMETER Name
        Indicates name of the imported json error page to be removed.
    .PARAMETER GetAll
        Retrieve all appfwjsonerrorpage object(s).
    .PARAMETER Count
        If specified, the count of the appfwjsonerrorpage object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwjsonerrorpage
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwjsonerrorpage -GetAll
        Get all appfwjsonerrorpage data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwjsonerrorpage -name <string>
        Get appfwjsonerrorpage object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwjsonerrorpage -Filter @{ 'name'='<value>' }
        Get appfwjsonerrorpage data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwjsonerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwjsonerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwjsonerrorpage: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwjsonerrorpage objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwjsonerrorpage -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwjsonerrorpage objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwjsonerrorpage -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwjsonerrorpage objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwjsonerrorpage -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwjsonerrorpage configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwjsonerrorpage -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwjsonerrorpage configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwjsonerrorpage -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwjsonerrorpage: Ended"
    }
}

function Invoke-NSResetAppfwlearningdata {
    <#
    .SYNOPSIS
        Reset Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for learning data resource.
    .EXAMPLE
        PS C:\>Invoke-NSResetAppfwlearningdata
        An example how to reset appfwlearningdata config Object(s).
    .NOTES
        File Name : Invoke-NSResetAppfwlearningdata
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwlearningdata/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession) 

    )
    begin {
        Write-Verbose "Invoke-NSResetAppfwlearningdata: Starting"
    }
    process {
        try {
            $payload = @{ }

            if ( $PSCmdlet.ShouldProcess($Name, "Reset Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwlearningdata -Action reset -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSResetAppfwlearningdata: Finished"
    }
}

function Invoke-NSExportAppfwlearningdata {
    <#
    .SYNOPSIS
        Export Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for learning data resource.
    .PARAMETER Profilename
        Name of the profile.
    .PARAMETER Securitycheck
        Name of the security check.
        Possible values = startURL, cookieConsistency, fieldConsistency, crossSiteScripting, SQLInjection, fieldFormat, CSRFtag, XMLDoSCheck, XMLWSICheck, XMLAttachmentCheck, TotalXMLRequests, creditCardNumber, ContentType
    .PARAMETER Target
        Target filename for data to be exported.
    .EXAMPLE
        PS C:\>Invoke-NSExportAppfwlearningdata -profilename <string> -securitycheck <string>
        An example how to export appfwlearningdata config Object(s).
    .NOTES
        File Name : Invoke-NSExportAppfwlearningdata
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwlearningdata/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Profilename,

        [Parameter(Mandatory)]
        [ValidateSet('startURL', 'cookieConsistency', 'fieldConsistency', 'crossSiteScripting', 'SQLInjection', 'fieldFormat', 'CSRFtag', 'XMLDoSCheck', 'XMLWSICheck', 'XMLAttachmentCheck', 'TotalXMLRequests', 'creditCardNumber', 'ContentType')]
        [string]$Securitycheck,

        [ValidateLength(1, 127)]
        [string]$Target 

    )
    begin {
        Write-Verbose "Invoke-NSExportAppfwlearningdata: Starting"
    }
    process {
        try {
            $payload = @{ profilename = $profilename
                securitycheck         = $securitycheck
            }
            if ( $PSBoundParameters.ContainsKey('target') ) { $payload.Add('target', $target) }
            if ( $PSCmdlet.ShouldProcess($Name, "Export Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwlearningdata -Action export -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSExportAppfwlearningdata: Finished"
    }
}

function Invoke-NSDeleteAppfwlearningdata {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for learning data resource.
    .PARAMETER Profilename
        Name of the profile.
    .PARAMETER Starturl
        Start URL configuration.
    .PARAMETER Cookieconsistency
        Cookie Name.
    .PARAMETER Fieldconsistency
        Form field name.
    .PARAMETER Formactionurl_ffc
        Form action URL.
    .PARAMETER Contenttype
        Content Type Name.
    .PARAMETER Crosssitescripting
        Cross-site scripting.
    .PARAMETER Formactionurl_xss
        Form action URL.
    .PARAMETER As_scan_location_xss
        Location of cross-site scripting exception - form field, header, cookie or url.
        Possible values = FORMFIELD, HEADER, COOKIE, URL
    .PARAMETER As_value_type_xss
        XSS value type. (Tag | Attribute | Pattern).
        Possible values = Tag, Attribute, Pattern
    .PARAMETER As_value_expr_xss
        XSS value expressions consistituting expressions for Tag, Attribute or Pattern.
    .PARAMETER Sqlinjection
        Form field name.
    .PARAMETER Formactionurl_sql
        Form action URL.
    .PARAMETER As_scan_location_sql
        Location of sql injection exception - form field, header or cookie.
        Possible values = FORMFIELD, HEADER, COOKIE
    .PARAMETER As_value_type_sql
        SQL value type. Keyword, SpecialString or Wildchar.
        Possible values = Keyword, SpecialString, Wildchar
    .PARAMETER As_value_expr_sql
        SQL value expressions consistituting expressions for Keyword, SpecialString or Wildchar.
    .PARAMETER Fieldformat
        Field format name.
    .PARAMETER Formactionurl_ff
        Form action URL.
    .PARAMETER Csrftag
        CSRF Form Action URL.
    .PARAMETER Csrfformoriginurl
        CSRF Form Origin URL.
    .PARAMETER Creditcardnumber
        The object expression that is to be excluded from safe commerce check.
    .PARAMETER Creditcardnumberurl
        The url for which the list of credit card numbers are needed to be bypassed from inspection.
    .PARAMETER Xmldoscheck
        XML Denial of Service check, one of
        MaxAttributes
        MaxAttributeNameLength
        MaxAttributeValueLength
        MaxElementNameLength
        MaxFileSize
        MinFileSize
        MaxCDATALength
        MaxElements
        MaxElementDepth
        MaxElementChildren
        NumDTDs
        NumProcessingInstructions
        NumExternalEntities
        MaxEntityExpansions
        MaxEntityExpansionDepth
        MaxNamespaces
        MaxNamespaceUriLength
        MaxSOAPArraySize
        MaxSOAPArrayRank
        .
    .PARAMETER Xmlwsicheck
        Web Services Interoperability Rule ID.
    .PARAMETER Xmlattachmentcheck
        XML Attachment Content-Type.
    .PARAMETER Totalxmlrequests
        Total XML requests.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwlearningdata
        An example how to delete appfwlearningdata config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwlearningdata
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwlearningdata/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [string]$Profilename,

        [string]$Starturl,

        [string]$Cookieconsistency,

        [string]$Fieldconsistency,

        [string]$Formactionurl_ffc,

        [string]$Contenttype,

        [string]$Crosssitescripting,

        [string]$Formactionurl_xss,

        [string]$As_scan_location_xss,

        [string]$As_value_type_xss,

        [string]$As_value_expr_xss,

        [string]$Sqlinjection,

        [string]$Formactionurl_sql,

        [string]$As_scan_location_sql,

        [string]$As_value_type_sql,

        [string]$As_value_expr_sql,

        [string]$Fieldformat,

        [string]$Formactionurl_ff,

        [string]$Csrftag,

        [string]$Csrfformoriginurl,

        [string]$Creditcardnumber,

        [string]$Creditcardnumberurl,

        [string]$Xmldoscheck,

        [string]$Xmlwsicheck,

        [string]$Xmlattachmentcheck,

        [boolean]$Totalxmlrequests 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwlearningdata: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Profilename') ) { $arguments.Add('profilename', $Profilename) }
            if ( $PSBoundParameters.ContainsKey('Starturl') ) { $arguments.Add('starturl', $Starturl) }
            if ( $PSBoundParameters.ContainsKey('Cookieconsistency') ) { $arguments.Add('cookieconsistency', $Cookieconsistency) }
            if ( $PSBoundParameters.ContainsKey('Fieldconsistency') ) { $arguments.Add('fieldconsistency', $Fieldconsistency) }
            if ( $PSBoundParameters.ContainsKey('Formactionurl_ffc') ) { $arguments.Add('formactionurl_ffc', $Formactionurl_ffc) }
            if ( $PSBoundParameters.ContainsKey('Contenttype') ) { $arguments.Add('contenttype', $Contenttype) }
            if ( $PSBoundParameters.ContainsKey('Crosssitescripting') ) { $arguments.Add('crosssitescripting', $Crosssitescripting) }
            if ( $PSBoundParameters.ContainsKey('Formactionurl_xss') ) { $arguments.Add('formactionurl_xss', $Formactionurl_xss) }
            if ( $PSBoundParameters.ContainsKey('As_scan_location_xss') ) { $arguments.Add('as_scan_location_xss', $As_scan_location_xss) }
            if ( $PSBoundParameters.ContainsKey('As_value_type_xss') ) { $arguments.Add('as_value_type_xss', $As_value_type_xss) }
            if ( $PSBoundParameters.ContainsKey('As_value_expr_xss') ) { $arguments.Add('as_value_expr_xss', $As_value_expr_xss) }
            if ( $PSBoundParameters.ContainsKey('Sqlinjection') ) { $arguments.Add('sqlinjection', $Sqlinjection) }
            if ( $PSBoundParameters.ContainsKey('Formactionurl_sql') ) { $arguments.Add('formactionurl_sql', $Formactionurl_sql) }
            if ( $PSBoundParameters.ContainsKey('As_scan_location_sql') ) { $arguments.Add('as_scan_location_sql', $As_scan_location_sql) }
            if ( $PSBoundParameters.ContainsKey('As_value_type_sql') ) { $arguments.Add('as_value_type_sql', $As_value_type_sql) }
            if ( $PSBoundParameters.ContainsKey('As_value_expr_sql') ) { $arguments.Add('as_value_expr_sql', $As_value_expr_sql) }
            if ( $PSBoundParameters.ContainsKey('Fieldformat') ) { $arguments.Add('fieldformat', $Fieldformat) }
            if ( $PSBoundParameters.ContainsKey('Formactionurl_ff') ) { $arguments.Add('formactionurl_ff', $Formactionurl_ff) }
            if ( $PSBoundParameters.ContainsKey('Csrftag') ) { $arguments.Add('csrftag', $Csrftag) }
            if ( $PSBoundParameters.ContainsKey('Csrfformoriginurl') ) { $arguments.Add('csrfformoriginurl', $Csrfformoriginurl) }
            if ( $PSBoundParameters.ContainsKey('Creditcardnumber') ) { $arguments.Add('creditcardnumber', $Creditcardnumber) }
            if ( $PSBoundParameters.ContainsKey('Creditcardnumberurl') ) { $arguments.Add('creditcardnumberurl', $Creditcardnumberurl) }
            if ( $PSBoundParameters.ContainsKey('Xmldoscheck') ) { $arguments.Add('xmldoscheck', $Xmldoscheck) }
            if ( $PSBoundParameters.ContainsKey('Xmlwsicheck') ) { $arguments.Add('xmlwsicheck', $Xmlwsicheck) }
            if ( $PSBoundParameters.ContainsKey('Xmlattachmentcheck') ) { $arguments.Add('xmlattachmentcheck', $Xmlattachmentcheck) }
            if ( $PSBoundParameters.ContainsKey('Totalxmlrequests') ) { $arguments.Add('totalxmlrequests', $Totalxmlrequests) }
            if ( $PSCmdlet.ShouldProcess("appfwlearningdata", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwlearningdata -NitroPath nitro/v1/config -Resource $ -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwlearningdata: Finished"
    }
}

function Invoke-NSGetAppfwlearningdata {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for learning data resource.
    .PARAMETER Profilename
        Name of the profile.
    .PARAMETER Securitycheck
        Name of the security check.
        Possible values = startURL, cookieConsistency, fieldConsistency, crossSiteScripting, SQLInjection, fieldFormat, CSRFtag, XMLDoSCheck, XMLWSICheck, XMLAttachmentCheck, TotalXMLRequests, creditCardNumber, ContentType
    .PARAMETER GetAll
        Retrieve all appfwlearningdata object(s).
    .PARAMETER Count
        If specified, the count of the appfwlearningdata object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwlearningdata
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwlearningdata -GetAll
        Get all appfwlearningdata data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwlearningdata -Count
        Get the number of appfwlearningdata objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwlearningdata -name <string>
        Get appfwlearningdata object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwlearningdata -Filter @{ 'name'='<value>' }
        Get appfwlearningdata data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwlearningdata
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwlearningdata/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByArgument')]
        [string]$Profilename,

        [Parameter(ParameterSetName = 'GetByArgument')]
        [ValidateSet('startURL', 'cookieConsistency', 'fieldConsistency', 'crossSiteScripting', 'SQLInjection', 'fieldFormat', 'CSRFtag', 'XMLDoSCheck', 'XMLWSICheck', 'XMLAttachmentCheck', 'TotalXMLRequests', 'creditCardNumber', 'ContentType')]
        [string]$Securitycheck,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwlearningdata: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwlearningdata objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwlearningdata -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwlearningdata objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwlearningdata -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwlearningdata objects by arguments"
                $arguments = @{ } 
                if ( $PSBoundParameters.ContainsKey('profilename') ) { $arguments.Add('profilename', $profilename) } 
                if ( $PSBoundParameters.ContainsKey('securitycheck') ) { $arguments.Add('securitycheck', $securitycheck) }
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwlearningdata -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwlearningdata configuration for property ''"

            } else {
                Write-Verbose "Retrieving appfwlearningdata configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwlearningdata -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwlearningdata: Ended"
    }
}

function Invoke-NSUnsetAppfwlearningsettings {
    <#
    .SYNOPSIS
        Unset Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for learning settings resource.
    .PARAMETER Profilename
        Name of the profile.
    .PARAMETER Starturlminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn start URLs.
    .PARAMETER Starturlpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular start URL pattern for the learning engine to learn that start URL.
          
          
        Maximum value = 100
    .PARAMETER Cookieconsistencyminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn cookies.
    .PARAMETER Cookieconsistencypercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular cookie pattern for the learning engine to learn that cookie.
          
          
        Maximum value = 100
    .PARAMETER Csrftagminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn cross-site request forgery (CSRF) tags.
    .PARAMETER Csrftagpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular CSRF tag for the learning engine to learn that CSRF tag.
          
          
        Maximum value = 100
    .PARAMETER Fieldconsistencyminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn field consistency information.
    .PARAMETER Fieldconsistencypercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular field consistency pattern for the learning engine to learn that field consistency pattern.
          
          
        Maximum value = 100
    .PARAMETER Crosssitescriptingminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn HTML cross-site scripting patterns.
    .PARAMETER Crosssitescriptingpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular cross-site scripting pattern for the learning engine to learn that cross-site scripting pattern.
          
          
        Maximum value = 100
    .PARAMETER Sqlinjectionminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn HTML SQL injection patterns.
    .PARAMETER Sqlinjectionpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular HTML SQL injection pattern for the learning engine to learn that HTML SQL injection pattern.
          
          
        Maximum value = 100
    .PARAMETER Fieldformatminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn field formats.
    .PARAMETER Fieldformatpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular web form field pattern for the learning engine to recommend a field format for that form field.
          
          
        Maximum value = 100
    .PARAMETER Creditcardnumberminthreshold
        Minimum threshold to learn Credit Card information.
    .PARAMETER Creditcardnumberpercentthreshold
        Minimum threshold in percent to learn Credit Card information.
          
          
        Maximum value = 100
    .PARAMETER Contenttypeminthreshold
        Minimum threshold to learn Content Type information.
    .PARAMETER Contenttypepercentthreshold
        Minimum threshold in percent to learn Content Type information.
          
          
        Maximum value = 100
    .PARAMETER Xmlwsiminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn web services interoperability (WSI) information.
    .PARAMETER Xmlwsipercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular pattern for the learning engine to learn a web services interoperability (WSI) pattern.
          
          
        Maximum value = 100
    .PARAMETER Xmlattachmentminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn XML attachment patterns.
    .PARAMETER Xmlattachmentpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular XML attachment pattern for the learning engine to learn that XML attachment pattern.
          
          
        Maximum value = 100
    .PARAMETER Fieldformatautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Sqlinjectionautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Crosssitescriptingautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Starturlautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Cookieconsistencyautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Csrftagautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Fieldconsistencyautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Contenttypeautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .EXAMPLE
        PS C:\>Invoke-NSUnsetAppfwlearningsettings -profilename <string>
        An example how to unset appfwlearningsettings config Object(s).
    .NOTES
        File Name : Invoke-NSUnsetAppfwlearningsettings
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwlearningsettings
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Profilename,

        [Boolean]$starturlminthreshold,

        [Boolean]$starturlpercentthreshold,

        [Boolean]$cookieconsistencyminthreshold,

        [Boolean]$cookieconsistencypercentthreshold,

        [Boolean]$csrftagminthreshold,

        [Boolean]$csrftagpercentthreshold,

        [Boolean]$fieldconsistencyminthreshold,

        [Boolean]$fieldconsistencypercentthreshold,

        [Boolean]$crosssitescriptingminthreshold,

        [Boolean]$crosssitescriptingpercentthreshold,

        [Boolean]$sqlinjectionminthreshold,

        [Boolean]$sqlinjectionpercentthreshold,

        [Boolean]$fieldformatminthreshold,

        [Boolean]$fieldformatpercentthreshold,

        [Boolean]$creditcardnumberminthreshold,

        [Boolean]$creditcardnumberpercentthreshold,

        [Boolean]$contenttypeminthreshold,

        [Boolean]$contenttypepercentthreshold,

        [Boolean]$xmlwsiminthreshold,

        [Boolean]$xmlwsipercentthreshold,

        [Boolean]$xmlattachmentminthreshold,

        [Boolean]$xmlattachmentpercentthreshold,

        [Boolean]$fieldformatautodeploygraceperiod,

        [Boolean]$sqlinjectionautodeploygraceperiod,

        [Boolean]$crosssitescriptingautodeploygraceperiod,

        [Boolean]$starturlautodeploygraceperiod,

        [Boolean]$cookieconsistencyautodeploygraceperiod,

        [Boolean]$csrftagautodeploygraceperiod,

        [Boolean]$fieldconsistencyautodeploygraceperiod,

        [Boolean]$contenttypeautodeploygraceperiod 
    )
    begin {
        Write-Verbose "Invoke-NSUnsetAppfwlearningsettings: Starting"
    }
    process {
        try {
            $payload = @{ profilename = $profilename }
            if ( $PSBoundParameters.ContainsKey('starturlminthreshold') ) { $payload.Add('starturlminthreshold', $starturlminthreshold) }
            if ( $PSBoundParameters.ContainsKey('starturlpercentthreshold') ) { $payload.Add('starturlpercentthreshold', $starturlpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('cookieconsistencyminthreshold') ) { $payload.Add('cookieconsistencyminthreshold', $cookieconsistencyminthreshold) }
            if ( $PSBoundParameters.ContainsKey('cookieconsistencypercentthreshold') ) { $payload.Add('cookieconsistencypercentthreshold', $cookieconsistencypercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('csrftagminthreshold') ) { $payload.Add('csrftagminthreshold', $csrftagminthreshold) }
            if ( $PSBoundParameters.ContainsKey('csrftagpercentthreshold') ) { $payload.Add('csrftagpercentthreshold', $csrftagpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('fieldconsistencyminthreshold') ) { $payload.Add('fieldconsistencyminthreshold', $fieldconsistencyminthreshold) }
            if ( $PSBoundParameters.ContainsKey('fieldconsistencypercentthreshold') ) { $payload.Add('fieldconsistencypercentthreshold', $fieldconsistencypercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingminthreshold') ) { $payload.Add('crosssitescriptingminthreshold', $crosssitescriptingminthreshold) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingpercentthreshold') ) { $payload.Add('crosssitescriptingpercentthreshold', $crosssitescriptingpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionminthreshold') ) { $payload.Add('sqlinjectionminthreshold', $sqlinjectionminthreshold) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionpercentthreshold') ) { $payload.Add('sqlinjectionpercentthreshold', $sqlinjectionpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('fieldformatminthreshold') ) { $payload.Add('fieldformatminthreshold', $fieldformatminthreshold) }
            if ( $PSBoundParameters.ContainsKey('fieldformatpercentthreshold') ) { $payload.Add('fieldformatpercentthreshold', $fieldformatpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('creditcardnumberminthreshold') ) { $payload.Add('creditcardnumberminthreshold', $creditcardnumberminthreshold) }
            if ( $PSBoundParameters.ContainsKey('creditcardnumberpercentthreshold') ) { $payload.Add('creditcardnumberpercentthreshold', $creditcardnumberpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('contenttypeminthreshold') ) { $payload.Add('contenttypeminthreshold', $contenttypeminthreshold) }
            if ( $PSBoundParameters.ContainsKey('contenttypepercentthreshold') ) { $payload.Add('contenttypepercentthreshold', $contenttypepercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('xmlwsiminthreshold') ) { $payload.Add('xmlwsiminthreshold', $xmlwsiminthreshold) }
            if ( $PSBoundParameters.ContainsKey('xmlwsipercentthreshold') ) { $payload.Add('xmlwsipercentthreshold', $xmlwsipercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('xmlattachmentminthreshold') ) { $payload.Add('xmlattachmentminthreshold', $xmlattachmentminthreshold) }
            if ( $PSBoundParameters.ContainsKey('xmlattachmentpercentthreshold') ) { $payload.Add('xmlattachmentpercentthreshold', $xmlattachmentpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('fieldformatautodeploygraceperiod') ) { $payload.Add('fieldformatautodeploygraceperiod', $fieldformatautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionautodeploygraceperiod') ) { $payload.Add('sqlinjectionautodeploygraceperiod', $sqlinjectionautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingautodeploygraceperiod') ) { $payload.Add('crosssitescriptingautodeploygraceperiod', $crosssitescriptingautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('starturlautodeploygraceperiod') ) { $payload.Add('starturlautodeploygraceperiod', $starturlautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('cookieconsistencyautodeploygraceperiod') ) { $payload.Add('cookieconsistencyautodeploygraceperiod', $cookieconsistencyautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('csrftagautodeploygraceperiod') ) { $payload.Add('csrftagautodeploygraceperiod', $csrftagautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('fieldconsistencyautodeploygraceperiod') ) { $payload.Add('fieldconsistencyautodeploygraceperiod', $fieldconsistencyautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('contenttypeautodeploygraceperiod') ) { $payload.Add('contenttypeautodeploygraceperiod', $contenttypeautodeploygraceperiod) }
            if ( $PSCmdlet.ShouldProcess("$profilename", "Unset Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type appfwlearningsettings -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUnsetAppfwlearningsettings: Finished"
    }
}

function Invoke-NSUpdateAppfwlearningsettings {
    <#
    .SYNOPSIS
        Update Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for learning settings resource.
    .PARAMETER Profilename
        Name of the profile.
    .PARAMETER Starturlminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn start URLs.
    .PARAMETER Starturlpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular start URL pattern for the learning engine to learn that start URL.
          
          
        Maximum value = 100
    .PARAMETER Cookieconsistencyminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn cookies.
    .PARAMETER Cookieconsistencypercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular cookie pattern for the learning engine to learn that cookie.
          
          
        Maximum value = 100
    .PARAMETER Csrftagminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn cross-site request forgery (CSRF) tags.
    .PARAMETER Csrftagpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular CSRF tag for the learning engine to learn that CSRF tag.
          
          
        Maximum value = 100
    .PARAMETER Fieldconsistencyminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn field consistency information.
    .PARAMETER Fieldconsistencypercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular field consistency pattern for the learning engine to learn that field consistency pattern.
          
          
        Maximum value = 100
    .PARAMETER Crosssitescriptingminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn HTML cross-site scripting patterns.
    .PARAMETER Crosssitescriptingpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular cross-site scripting pattern for the learning engine to learn that cross-site scripting pattern.
          
          
        Maximum value = 100
    .PARAMETER Sqlinjectionminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn HTML SQL injection patterns.
    .PARAMETER Sqlinjectionpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular HTML SQL injection pattern for the learning engine to learn that HTML SQL injection pattern.
          
          
        Maximum value = 100
    .PARAMETER Fieldformatminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn field formats.
    .PARAMETER Fieldformatpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular web form field pattern for the learning engine to recommend a field format for that form field.
          
          
        Maximum value = 100
    .PARAMETER Creditcardnumberminthreshold
        Minimum threshold to learn Credit Card information.
    .PARAMETER Creditcardnumberpercentthreshold
        Minimum threshold in percent to learn Credit Card information.
          
          
        Maximum value = 100
    .PARAMETER Contenttypeminthreshold
        Minimum threshold to learn Content Type information.
    .PARAMETER Contenttypepercentthreshold
        Minimum threshold in percent to learn Content Type information.
          
          
        Maximum value = 100
    .PARAMETER Xmlwsiminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn web services interoperability (WSI) information.
    .PARAMETER Xmlwsipercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular pattern for the learning engine to learn a web services interoperability (WSI) pattern.
          
          
        Maximum value = 100
    .PARAMETER Xmlattachmentminthreshold
        Minimum number of application firewall sessions that the learning engine must observe to learn XML attachment patterns.
    .PARAMETER Xmlattachmentpercentthreshold
        Minimum percentage of application firewall sessions that must contain a particular XML attachment pattern for the learning engine to learn that XML attachment pattern.
          
          
        Maximum value = 100
    .PARAMETER Fieldformatautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Sqlinjectionautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Crosssitescriptingautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Starturlautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Cookieconsistencyautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Csrftagautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Fieldconsistencyautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER Contenttypeautodeploygraceperiod
        The number of minutes after the threshold hit alert the learned rule will be deployed.
          
          
        Maximum value = 43200
    .PARAMETER PassThru
        Return details about the created appfwlearningsettings item.
    .EXAMPLE
        PS C:\>Invoke-NSUpdateAppfwlearningsettings -profilename <string>
        An example how to update appfwlearningsettings config Object(s).
    .NOTES
        File Name : Invoke-NSUpdateAppfwlearningsettings
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwlearningsettings/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Profilename,

        [double]$Starturlminthreshold,

        [double]$Starturlpercentthreshold,

        [double]$Cookieconsistencyminthreshold,

        [double]$Cookieconsistencypercentthreshold,

        [double]$Csrftagminthreshold,

        [double]$Csrftagpercentthreshold,

        [double]$Fieldconsistencyminthreshold,

        [double]$Fieldconsistencypercentthreshold,

        [double]$Crosssitescriptingminthreshold,

        [double]$Crosssitescriptingpercentthreshold,

        [double]$Sqlinjectionminthreshold,

        [double]$Sqlinjectionpercentthreshold,

        [double]$Fieldformatminthreshold,

        [double]$Fieldformatpercentthreshold,

        [double]$Creditcardnumberminthreshold,

        [double]$Creditcardnumberpercentthreshold,

        [double]$Contenttypeminthreshold,

        [double]$Contenttypepercentthreshold,

        [double]$Xmlwsiminthreshold,

        [double]$Xmlwsipercentthreshold,

        [double]$Xmlattachmentminthreshold,

        [double]$Xmlattachmentpercentthreshold,

        [double]$Fieldformatautodeploygraceperiod,

        [double]$Sqlinjectionautodeploygraceperiod,

        [double]$Crosssitescriptingautodeploygraceperiod,

        [double]$Starturlautodeploygraceperiod,

        [double]$Cookieconsistencyautodeploygraceperiod,

        [double]$Csrftagautodeploygraceperiod,

        [double]$Fieldconsistencyautodeploygraceperiod,

        [double]$Contenttypeautodeploygraceperiod,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSUpdateAppfwlearningsettings: Starting"
    }
    process {
        try {
            $payload = @{ profilename = $profilename }
            if ( $PSBoundParameters.ContainsKey('starturlminthreshold') ) { $payload.Add('starturlminthreshold', $starturlminthreshold) }
            if ( $PSBoundParameters.ContainsKey('starturlpercentthreshold') ) { $payload.Add('starturlpercentthreshold', $starturlpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('cookieconsistencyminthreshold') ) { $payload.Add('cookieconsistencyminthreshold', $cookieconsistencyminthreshold) }
            if ( $PSBoundParameters.ContainsKey('cookieconsistencypercentthreshold') ) { $payload.Add('cookieconsistencypercentthreshold', $cookieconsistencypercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('csrftagminthreshold') ) { $payload.Add('csrftagminthreshold', $csrftagminthreshold) }
            if ( $PSBoundParameters.ContainsKey('csrftagpercentthreshold') ) { $payload.Add('csrftagpercentthreshold', $csrftagpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('fieldconsistencyminthreshold') ) { $payload.Add('fieldconsistencyminthreshold', $fieldconsistencyminthreshold) }
            if ( $PSBoundParameters.ContainsKey('fieldconsistencypercentthreshold') ) { $payload.Add('fieldconsistencypercentthreshold', $fieldconsistencypercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingminthreshold') ) { $payload.Add('crosssitescriptingminthreshold', $crosssitescriptingminthreshold) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingpercentthreshold') ) { $payload.Add('crosssitescriptingpercentthreshold', $crosssitescriptingpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionminthreshold') ) { $payload.Add('sqlinjectionminthreshold', $sqlinjectionminthreshold) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionpercentthreshold') ) { $payload.Add('sqlinjectionpercentthreshold', $sqlinjectionpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('fieldformatminthreshold') ) { $payload.Add('fieldformatminthreshold', $fieldformatminthreshold) }
            if ( $PSBoundParameters.ContainsKey('fieldformatpercentthreshold') ) { $payload.Add('fieldformatpercentthreshold', $fieldformatpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('creditcardnumberminthreshold') ) { $payload.Add('creditcardnumberminthreshold', $creditcardnumberminthreshold) }
            if ( $PSBoundParameters.ContainsKey('creditcardnumberpercentthreshold') ) { $payload.Add('creditcardnumberpercentthreshold', $creditcardnumberpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('contenttypeminthreshold') ) { $payload.Add('contenttypeminthreshold', $contenttypeminthreshold) }
            if ( $PSBoundParameters.ContainsKey('contenttypepercentthreshold') ) { $payload.Add('contenttypepercentthreshold', $contenttypepercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('xmlwsiminthreshold') ) { $payload.Add('xmlwsiminthreshold', $xmlwsiminthreshold) }
            if ( $PSBoundParameters.ContainsKey('xmlwsipercentthreshold') ) { $payload.Add('xmlwsipercentthreshold', $xmlwsipercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('xmlattachmentminthreshold') ) { $payload.Add('xmlattachmentminthreshold', $xmlattachmentminthreshold) }
            if ( $PSBoundParameters.ContainsKey('xmlattachmentpercentthreshold') ) { $payload.Add('xmlattachmentpercentthreshold', $xmlattachmentpercentthreshold) }
            if ( $PSBoundParameters.ContainsKey('fieldformatautodeploygraceperiod') ) { $payload.Add('fieldformatautodeploygraceperiod', $fieldformatautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionautodeploygraceperiod') ) { $payload.Add('sqlinjectionautodeploygraceperiod', $sqlinjectionautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingautodeploygraceperiod') ) { $payload.Add('crosssitescriptingautodeploygraceperiod', $crosssitescriptingautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('starturlautodeploygraceperiod') ) { $payload.Add('starturlautodeploygraceperiod', $starturlautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('cookieconsistencyautodeploygraceperiod') ) { $payload.Add('cookieconsistencyautodeploygraceperiod', $cookieconsistencyautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('csrftagautodeploygraceperiod') ) { $payload.Add('csrftagautodeploygraceperiod', $csrftagautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('fieldconsistencyautodeploygraceperiod') ) { $payload.Add('fieldconsistencyautodeploygraceperiod', $fieldconsistencyautodeploygraceperiod) }
            if ( $PSBoundParameters.ContainsKey('contenttypeautodeploygraceperiod') ) { $payload.Add('contenttypeautodeploygraceperiod', $contenttypeautodeploygraceperiod) }
            if ( $PSCmdlet.ShouldProcess("appfwlearningsettings", "Update Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwlearningsettings -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwlearningsettings -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUpdateAppfwlearningsettings: Finished"
    }
}

function Invoke-NSGetAppfwlearningsettings {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for learning settings resource.
    .PARAMETER Profilename
        Name of the profile.
    .PARAMETER GetAll
        Retrieve all appfwlearningsettings object(s).
    .PARAMETER Count
        If specified, the count of the appfwlearningsettings object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwlearningsettings
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwlearningsettings -GetAll
        Get all appfwlearningsettings data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwlearningsettings -Count
        Get the number of appfwlearningsettings objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwlearningsettings -name <string>
        Get appfwlearningsettings object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwlearningsettings -Filter @{ 'name'='<value>' }
        Get appfwlearningsettings data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwlearningsettings
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwlearningsettings/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Profilename,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwlearningsettings: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwlearningsettings objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwlearningsettings -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwlearningsettings objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwlearningsettings -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwlearningsettings objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwlearningsettings -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwlearningsettings configuration for property 'profilename'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwlearningsettings -NitroPath nitro/v1/config -Resource $profilename -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwlearningsettings configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwlearningsettings -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwlearningsettings: Ended"
    }
}

function Invoke-NSDeleteAppfwmultipartformcontenttype {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for Multipart form content type resource.
    .PARAMETER Multipartformcontenttypevalue
        Content type to be classified as multipart form.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwmultipartformcontenttype -Multipartformcontenttypevalue <string>
        An example how to delete appfwmultipartformcontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwmultipartformcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwmultipartformcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Multipartformcontenttypevalue 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwmultipartformcontenttype: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$multipartformcontenttypevalue", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwmultipartformcontenttype -NitroPath nitro/v1/config -Resource $multipartformcontenttypevalue -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwmultipartformcontenttype: Finished"
    }
}

function Invoke-NSAddAppfwmultipartformcontenttype {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for Multipart form content type resource.
    .PARAMETER Multipartformcontenttypevalue
        Content type to be classified as multipart form.
    .PARAMETER Isregex
        Is multipart_form content type a regular expression?.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER PassThru
        Return details about the created appfwmultipartformcontenttype item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwmultipartformcontenttype -multipartformcontenttypevalue <string>
        An example how to add appfwmultipartformcontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwmultipartformcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwmultipartformcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Multipartformcontenttypevalue,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex = 'NOTREGEX',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwmultipartformcontenttype: Starting"
    }
    process {
        try {
            $payload = @{ multipartformcontenttypevalue = $multipartformcontenttypevalue }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSCmdlet.ShouldProcess("appfwmultipartformcontenttype", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwmultipartformcontenttype -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwmultipartformcontenttype -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwmultipartformcontenttype: Finished"
    }
}

function Invoke-NSGetAppfwmultipartformcontenttype {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for Multipart form content type resource.
    .PARAMETER Multipartformcontenttypevalue
        Content type to be classified as multipart form.
    .PARAMETER GetAll
        Retrieve all appfwmultipartformcontenttype object(s).
    .PARAMETER Count
        If specified, the count of the appfwmultipartformcontenttype object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwmultipartformcontenttype
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwmultipartformcontenttype -GetAll
        Get all appfwmultipartformcontenttype data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwmultipartformcontenttype -Count
        Get the number of appfwmultipartformcontenttype objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwmultipartformcontenttype -name <string>
        Get appfwmultipartformcontenttype object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwmultipartformcontenttype -Filter @{ 'name'='<value>' }
        Get appfwmultipartformcontenttype data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwmultipartformcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwmultipartformcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Multipartformcontenttypevalue,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwmultipartformcontenttype: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwmultipartformcontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwmultipartformcontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwmultipartformcontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwmultipartformcontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwmultipartformcontenttype objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwmultipartformcontenttype -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwmultipartformcontenttype configuration for property 'multipartformcontenttypevalue'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwmultipartformcontenttype -NitroPath nitro/v1/config -Resource $multipartformcontenttypevalue -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwmultipartformcontenttype configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwmultipartformcontenttype -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwmultipartformcontenttype: Ended"
    }
}

function Invoke-NSRenameAppfwpolicy {
    <#
    .SYNOPSIS
        Rename Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall policy resource.
    .PARAMETER Name
        Name for the policy.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Can be changed after the policy is created.
    .PARAMETER Newname
        New name for the policy. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters.
    .PARAMETER PassThru
        Return details about the created appfwpolicy item.
    .EXAMPLE
        PS C:\>Invoke-NSRenameAppfwpolicy -name <string> -newname <string>
        An example how to rename appfwpolicy config Object(s).
    .NOTES
        File Name : Invoke-NSRenameAppfwpolicy
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Newname,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSRenameAppfwpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                newname        = $newname
            }

            if ( $PSCmdlet.ShouldProcess("appfwpolicy", "Rename Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwpolicy -Action rename -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwpolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSRenameAppfwpolicy: Finished"
    }
}

function Invoke-NSUnsetAppfwpolicy {
    <#
    .SYNOPSIS
        Unset Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall policy resource.
    .PARAMETER Name
        Name for the policy.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Can be changed after the policy is created.
    .PARAMETER Comment
        Any comments to preserve information about the policy for later reference.
    .PARAMETER Logaction
        Where to log information for connections that match this policy.
    .EXAMPLE
        PS C:\>Invoke-NSUnsetAppfwpolicy -name <string>
        An example how to unset appfwpolicy config Object(s).
    .NOTES
        File Name : Invoke-NSUnsetAppfwpolicy
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Boolean]$comment,

        [Boolean]$logaction 
    )
    begin {
        Write-Verbose "Invoke-NSUnsetAppfwpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('logaction') ) { $payload.Add('logaction', $logaction) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type appfwpolicy -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUnsetAppfwpolicy: Finished"
    }
}

function Invoke-NSDeleteAppfwpolicy {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall policy resource.
    .PARAMETER Name
        Name for the policy.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Can be changed after the policy is created.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwpolicy -Name <string>
        An example how to delete appfwpolicy config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwpolicy
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwpolicy: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwpolicy -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwpolicy: Finished"
    }
}

function Invoke-NSUpdateAppfwpolicy {
    <#
    .SYNOPSIS
        Update Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall policy resource.
    .PARAMETER Name
        Name for the policy.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Can be changed after the policy is created.
    .PARAMETER Rule
        Name of the Citrix ADC named rule, or a Citrix ADC expression, that the policy uses to determine whether to filter the connection through the application firewall with the designated profile.
    .PARAMETER Profilename
        Name of the application firewall profile to use if the policy matches.
    .PARAMETER Comment
        Any comments to preserve information about the policy for later reference.
    .PARAMETER Logaction
        Where to log information for connections that match this policy.
    .PARAMETER PassThru
        Return details about the created appfwpolicy item.
    .EXAMPLE
        PS C:\>Invoke-NSUpdateAppfwpolicy -name <string>
        An example how to update appfwpolicy config Object(s).
    .NOTES
        File Name : Invoke-NSUpdateAppfwpolicy
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Rule,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Profilename,

        [string]$Comment,

        [string]$Logaction,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSUpdateAppfwpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('rule') ) { $payload.Add('rule', $rule) }
            if ( $PSBoundParameters.ContainsKey('profilename') ) { $payload.Add('profilename', $profilename) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('logaction') ) { $payload.Add('logaction', $logaction) }
            if ( $PSCmdlet.ShouldProcess("appfwpolicy", "Update Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwpolicy -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwpolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUpdateAppfwpolicy: Finished"
    }
}

function Invoke-NSAddAppfwpolicy {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall policy resource.
    .PARAMETER Name
        Name for the policy.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Can be changed after the policy is created.
    .PARAMETER Rule
        Name of the Citrix ADC named rule, or a Citrix ADC expression, that the policy uses to determine whether to filter the connection through the application firewall with the designated profile.
    .PARAMETER Profilename
        Name of the application firewall profile to use if the policy matches.
    .PARAMETER Comment
        Any comments to preserve information about the policy for later reference.
    .PARAMETER Logaction
        Where to log information for connections that match this policy.
    .PARAMETER PassThru
        Return details about the created appfwpolicy item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwpolicy -name <string> -rule <string> -profilename <string>
        An example how to add appfwpolicy config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwpolicy
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(Mandatory)]
        [string]$Rule,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Profilename,

        [string]$Comment,

        [string]$Logaction,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwpolicy: Starting"
    }
    process {
        try {
            $payload = @{ name = $name
                rule           = $rule
                profilename    = $profilename
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('logaction') ) { $payload.Add('logaction', $logaction) }
            if ( $PSCmdlet.ShouldProcess("appfwpolicy", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwpolicy -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwpolicy -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwpolicy: Finished"
    }
}

function Invoke-NSGetAppfwpolicy {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for application firewall policy resource.
    .PARAMETER Name
        Name for the policy.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Can be changed after the policy is created.
    .PARAMETER GetAll
        Retrieve all appfwpolicy object(s).
    .PARAMETER Count
        If specified, the count of the appfwpolicy object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicy
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicy -GetAll
        Get all appfwpolicy data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicy -Count
        Get the number of appfwpolicy objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicy -name <string>
        Get appfwpolicy object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicy -Filter @{ 'name'='<value>' }
        Get appfwpolicy data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwpolicy
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwpolicy: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwpolicy objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwpolicy objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwpolicy objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwpolicy configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwpolicy configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwpolicy: Ended"
    }
}

function Invoke-NSGetAppfwpolicyAppfwglobalBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the appfwglobal that can be bound to appfwpolicy.
    .PARAMETER Name
        Name of the policy.
    .PARAMETER GetAll
        Retrieve all appfwpolicy_appfwglobal_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwpolicy_appfwglobal_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyAppfwglobalBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyAppfwglobalBinding -GetAll
        Get all appfwpolicy_appfwglobal_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyAppfwglobalBinding -Count
        Get the number of appfwpolicy_appfwglobal_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyAppfwglobalBinding -name <string>
        Get appfwpolicy_appfwglobal_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyAppfwglobalBinding -Filter @{ 'name'='<value>' }
        Get appfwpolicy_appfwglobal_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwpolicyAppfwglobalBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy_appfwglobal_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwpolicyAppfwglobalBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwpolicy_appfwglobal_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_appfwglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwpolicy_appfwglobal_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_appfwglobal_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwpolicy_appfwglobal_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_appfwglobal_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwpolicy_appfwglobal_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_appfwglobal_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwpolicy_appfwglobal_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_appfwglobal_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwpolicyAppfwglobalBinding: Ended"
    }
}

function Invoke-NSGetAppfwpolicyAppfwpolicylabelBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the appfwpolicylabel that can be bound to appfwpolicy.
    .PARAMETER Name
        Name of the policy.
    .PARAMETER GetAll
        Retrieve all appfwpolicy_appfwpolicylabel_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwpolicy_appfwpolicylabel_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyAppfwpolicylabelBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyAppfwpolicylabelBinding -GetAll
        Get all appfwpolicy_appfwpolicylabel_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyAppfwpolicylabelBinding -Count
        Get the number of appfwpolicy_appfwpolicylabel_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyAppfwpolicylabelBinding -name <string>
        Get appfwpolicy_appfwpolicylabel_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyAppfwpolicylabelBinding -Filter @{ 'name'='<value>' }
        Get appfwpolicy_appfwpolicylabel_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwpolicyAppfwpolicylabelBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy_appfwpolicylabel_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwpolicyAppfwpolicylabelBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwpolicy_appfwpolicylabel_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_appfwpolicylabel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwpolicy_appfwpolicylabel_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_appfwpolicylabel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwpolicy_appfwpolicylabel_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_appfwpolicylabel_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwpolicy_appfwpolicylabel_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_appfwpolicylabel_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwpolicy_appfwpolicylabel_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_appfwpolicylabel_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwpolicyAppfwpolicylabelBinding: Ended"
    }
}

function Invoke-NSGetAppfwpolicyBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object which returns the resources bound to appfwpolicy.
    .PARAMETER Name
        Name of the policy.
    .PARAMETER GetAll
        Retrieve all appfwpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwpolicy_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyBinding -GetAll
        Get all appfwpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyBinding -name <string>
        Get appfwpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyBinding -Filter @{ 'name'='<value>' }
        Get appfwpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwpolicyBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwpolicy_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwpolicy_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwpolicy_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwpolicy_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwpolicyBinding: Ended"
    }
}

function Invoke-NSGetAppfwpolicyCsvserverBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the csvserver that can be bound to appfwpolicy.
    .PARAMETER Name
        Name of the policy.
    .PARAMETER GetAll
        Retrieve all appfwpolicy_csvserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwpolicy_csvserver_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyCsvserverBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyCsvserverBinding -GetAll
        Get all appfwpolicy_csvserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyCsvserverBinding -Count
        Get the number of appfwpolicy_csvserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyCsvserverBinding -name <string>
        Get appfwpolicy_csvserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyCsvserverBinding -Filter @{ 'name'='<value>' }
        Get appfwpolicy_csvserver_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwpolicyCsvserverBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy_csvserver_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwpolicyCsvserverBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwpolicy_csvserver_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_csvserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwpolicy_csvserver_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_csvserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwpolicy_csvserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_csvserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwpolicy_csvserver_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_csvserver_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwpolicy_csvserver_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_csvserver_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwpolicyCsvserverBinding: Ended"
    }
}

function Invoke-NSGetAppfwpolicyLbvserverBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the lbvserver that can be bound to appfwpolicy.
    .PARAMETER Name
        Name of the policy.
    .PARAMETER GetAll
        Retrieve all appfwpolicy_lbvserver_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwpolicy_lbvserver_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyLbvserverBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyLbvserverBinding -GetAll
        Get all appfwpolicy_lbvserver_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyLbvserverBinding -Count
        Get the number of appfwpolicy_lbvserver_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyLbvserverBinding -name <string>
        Get appfwpolicy_lbvserver_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicyLbvserverBinding -Filter @{ 'name'='<value>' }
        Get appfwpolicy_lbvserver_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwpolicyLbvserverBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicy_lbvserver_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwpolicyLbvserverBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwpolicy_lbvserver_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_lbvserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwpolicy_lbvserver_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_lbvserver_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwpolicy_lbvserver_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_lbvserver_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwpolicy_lbvserver_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_lbvserver_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwpolicy_lbvserver_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicy_lbvserver_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwpolicyLbvserverBinding: Ended"
    }
}

function Invoke-NSRenameAppfwpolicylabel {
    <#
    .SYNOPSIS
        Rename Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall policy label resource.
    .PARAMETER Labelname
        Name for the policy label. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the policy label is created.
    .PARAMETER Newname
        The new name of the application firewall policylabel.
    .PARAMETER PassThru
        Return details about the created appfwpolicylabel item.
    .EXAMPLE
        PS C:\>Invoke-NSRenameAppfwpolicylabel -labelname <string> -newname <string>
        An example how to rename appfwpolicylabel config Object(s).
    .NOTES
        File Name : Invoke-NSRenameAppfwpolicylabel
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicylabel/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Labelname,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Newname,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSRenameAppfwpolicylabel: Starting"
    }
    process {
        try {
            $payload = @{ labelname = $labelname
                newname             = $newname
            }

            if ( $PSCmdlet.ShouldProcess("appfwpolicylabel", "Rename Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwpolicylabel -Action rename -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwpolicylabel -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSRenameAppfwpolicylabel: Finished"
    }
}

function Invoke-NSAddAppfwpolicylabel {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall policy label resource.
    .PARAMETER Labelname
        Name for the policy label. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the policy label is created.
    .PARAMETER Policylabeltype
        Type of transformations allowed by the policies bound to the label. Always http_req for application firewall policy labels.
        Possible values = http_req, httpquic_req
    .PARAMETER PassThru
        Return details about the created appfwpolicylabel item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwpolicylabel -labelname <string> -policylabeltype <string>
        An example how to add appfwpolicylabel config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwpolicylabel
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicylabel/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Labelname,

        [Parameter(Mandatory)]
        [ValidateSet('http_req', 'httpquic_req')]
        [string]$Policylabeltype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwpolicylabel: Starting"
    }
    process {
        try {
            $payload = @{ labelname = $labelname
                policylabeltype     = $policylabeltype
            }

            if ( $PSCmdlet.ShouldProcess("appfwpolicylabel", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwpolicylabel -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwpolicylabel -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwpolicylabel: Finished"
    }
}

function Invoke-NSDeleteAppfwpolicylabel {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall policy label resource.
    .PARAMETER Labelname
        Name for the policy label. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the policy label is created.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwpolicylabel -Labelname <string>
        An example how to delete appfwpolicylabel config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwpolicylabel
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicylabel/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Labelname 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwpolicylabel: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$labelname", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwpolicylabel -NitroPath nitro/v1/config -Resource $labelname -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwpolicylabel: Finished"
    }
}

function Invoke-NSGetAppfwpolicylabel {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for application firewall policy label resource.
    .PARAMETER Labelname
        Name for the policy label. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the policy label is created.
    .PARAMETER GetAll
        Retrieve all appfwpolicylabel object(s).
    .PARAMETER Count
        If specified, the count of the appfwpolicylabel object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabel
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabel -GetAll
        Get all appfwpolicylabel data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabel -Count
        Get the number of appfwpolicylabel objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabel -name <string>
        Get appfwpolicylabel object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabel -Filter @{ 'name'='<value>' }
        Get appfwpolicylabel data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwpolicylabel
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicylabel/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [string]$Labelname,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwpolicylabel: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwpolicylabel objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwpolicylabel objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwpolicylabel objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwpolicylabel configuration for property 'labelname'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel -NitroPath nitro/v1/config -Resource $labelname -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwpolicylabel configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwpolicylabel: Ended"
    }
}

function Invoke-NSAddAppfwpolicylabelAppfwpolicyBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the appfwpolicy that can be bound to appfwpolicylabel.
    .PARAMETER Labelname
        Name of the application firewall policy label.
    .PARAMETER Policyname
        Name of the application firewall policy to bind to the policy label.
    .PARAMETER Priority
        Positive integer specifying the priority of the policy. A lower number specifies a higher priority. Must be unique within a group of policies that are bound to the same bind point or label. Policies are evaluated in the order of their priority numbers.
    .PARAMETER Gotopriorityexpression
        Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
    .PARAMETER Invoke
        If the current policy evaluates to TRUE, terminate evaluation of policies bound to the current policy label, and then forward the request to the specified virtual server or evaluate the specified policy label.
    .PARAMETER Labeltype
        Type of policy label to invoke if the current policy evaluates to TRUE and the invoke parameter is set. Available settings function as follows: * reqvserver. Invoke the unnamed policy label associated with the specified request virtual server. * policylabel. Invoke the specified user-defined policy label.
        Possible values = reqvserver, policylabel
    .PARAMETER Invoke_labelname
        Name of the policy label to invoke if the current policy evaluates to TRUE, the invoke parameter is set, and Label Type is set to Policy Label.
    .PARAMETER PassThru
        Return details about the created appfwpolicylabel_appfwpolicy_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwpolicylabelAppfwpolicyBinding -labelname <string> -policyname <string> -priority <double>
        An example how to add appfwpolicylabel_appfwpolicy_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwpolicylabelAppfwpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicylabel_appfwpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Labelname,

        [Parameter(Mandatory)]
        [string]$Policyname,

        [Parameter(Mandatory)]
        [double]$Priority,

        [string]$Gotopriorityexpression,

        [boolean]$Invoke,

        [ValidateSet('reqvserver', 'policylabel')]
        [string]$Labeltype,

        [string]$Invoke_labelname,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwpolicylabelAppfwpolicyBinding: Starting"
    }
    process {
        try {
            $payload = @{ labelname = $labelname
                policyname          = $policyname
                priority            = $priority
            }
            if ( $PSBoundParameters.ContainsKey('gotopriorityexpression') ) { $payload.Add('gotopriorityexpression', $gotopriorityexpression) }
            if ( $PSBoundParameters.ContainsKey('invoke') ) { $payload.Add('invoke', $invoke) }
            if ( $PSBoundParameters.ContainsKey('labeltype') ) { $payload.Add('labeltype', $labeltype) }
            if ( $PSBoundParameters.ContainsKey('invoke_labelname') ) { $payload.Add('invoke_labelname', $invoke_labelname) }
            if ( $PSCmdlet.ShouldProcess("appfwpolicylabel_appfwpolicy_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwpolicylabel_appfwpolicy_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwpolicylabelAppfwpolicyBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwpolicylabelAppfwpolicyBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwpolicylabelAppfwpolicyBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the appfwpolicy that can be bound to appfwpolicylabel.
    .PARAMETER Labelname
        Name of the application firewall policy label.
    .PARAMETER Policyname
        Name of the application firewall policy to bind to the policy label.
    .PARAMETER Priority
        Positive integer specifying the priority of the policy. A lower number specifies a higher priority. Must be unique within a group of policies that are bound to the same bind point or label. Policies are evaluated in the order of their priority numbers.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwpolicylabelAppfwpolicyBinding -Labelname <string>
        An example how to delete appfwpolicylabel_appfwpolicy_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwpolicylabelAppfwpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicylabel_appfwpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Labelname,

        [string]$Policyname,

        [double]$Priority 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwpolicylabelAppfwpolicyBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Policyname') ) { $arguments.Add('policyname', $Policyname) }
            if ( $PSBoundParameters.ContainsKey('Priority') ) { $arguments.Add('priority', $Priority) }
            if ( $PSCmdlet.ShouldProcess("$labelname", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwpolicylabel_appfwpolicy_binding -NitroPath nitro/v1/config -Resource $labelname -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwpolicylabelAppfwpolicyBinding: Finished"
    }
}

function Invoke-NSGetAppfwpolicylabelAppfwpolicyBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the appfwpolicy that can be bound to appfwpolicylabel.
    .PARAMETER Labelname
        Name of the application firewall policy label.
    .PARAMETER GetAll
        Retrieve all appfwpolicylabel_appfwpolicy_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwpolicylabel_appfwpolicy_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelAppfwpolicyBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelAppfwpolicyBinding -GetAll
        Get all appfwpolicylabel_appfwpolicy_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelAppfwpolicyBinding -Count
        Get the number of appfwpolicylabel_appfwpolicy_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelAppfwpolicyBinding -name <string>
        Get appfwpolicylabel_appfwpolicy_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelAppfwpolicyBinding -Filter @{ 'name'='<value>' }
        Get appfwpolicylabel_appfwpolicy_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwpolicylabelAppfwpolicyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicylabel_appfwpolicy_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [string]$Labelname,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwpolicylabelAppfwpolicyBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwpolicylabel_appfwpolicy_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_appfwpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwpolicylabel_appfwpolicy_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_appfwpolicy_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwpolicylabel_appfwpolicy_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_appfwpolicy_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwpolicylabel_appfwpolicy_binding configuration for property 'labelname'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_appfwpolicy_binding -NitroPath nitro/v1/config -Resource $labelname -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwpolicylabel_appfwpolicy_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_appfwpolicy_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwpolicylabelAppfwpolicyBinding: Ended"
    }
}

function Invoke-NSGetAppfwpolicylabelBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object which returns the resources bound to appfwpolicylabel.
    .PARAMETER Labelname
        Name of the application firewall policy label.
    .PARAMETER GetAll
        Retrieve all appfwpolicylabel_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwpolicylabel_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelBinding -GetAll
        Get all appfwpolicylabel_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelBinding -name <string>
        Get appfwpolicylabel_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelBinding -Filter @{ 'name'='<value>' }
        Get appfwpolicylabel_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwpolicylabelBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicylabel_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [string]$Labelname,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwpolicylabelBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwpolicylabel_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwpolicylabel_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwpolicylabel_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwpolicylabel_binding configuration for property 'labelname'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_binding -NitroPath nitro/v1/config -Resource $labelname -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwpolicylabel_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwpolicylabelBinding: Ended"
    }
}

function Invoke-NSGetAppfwpolicylabelPolicybindingBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the policybinding that can be bound to appfwpolicylabel.
    .PARAMETER Labelname
        Name of the application firewall policy label.
    .PARAMETER GetAll
        Retrieve all appfwpolicylabel_policybinding_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwpolicylabel_policybinding_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelPolicybindingBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelPolicybindingBinding -GetAll
        Get all appfwpolicylabel_policybinding_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelPolicybindingBinding -Count
        Get the number of appfwpolicylabel_policybinding_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelPolicybindingBinding -name <string>
        Get appfwpolicylabel_policybinding_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwpolicylabelPolicybindingBinding -Filter @{ 'name'='<value>' }
        Get appfwpolicylabel_policybinding_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwpolicylabelPolicybindingBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwpolicylabel_policybinding_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [string]$Labelname,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwpolicylabelPolicybindingBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwpolicylabel_policybinding_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_policybinding_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwpolicylabel_policybinding_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_policybinding_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwpolicylabel_policybinding_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_policybinding_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwpolicylabel_policybinding_binding configuration for property 'labelname'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_policybinding_binding -NitroPath nitro/v1/config -Resource $labelname -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwpolicylabel_policybinding_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwpolicylabel_policybinding_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwpolicylabelPolicybindingBinding: Ended"
    }
}

function Invoke-NSRestoreAppfwprofile {
    <#
    .SYNOPSIS
        Restore Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall profile resource.
    .PARAMETER Archivename
        Source for tar archive.
    .PARAMETER Relaxationrules
        Import all appfw relaxation rules.
    .PARAMETER Importprofilename
        Name of the profile which will be created/updated to associate the relaxation rules.
    .PARAMETER Matchurlstring
        Match this action url in archived Relaxation Rules to replace.
    .PARAMETER Replaceurlstring
        Replace matched url string with this action url string while restoring Relaxation Rules.
    .PARAMETER Overwrite
        Purge existing Relaxation Rules and replace during import.
    .PARAMETER Augment
        Augment Relaxation Rules during import.
    .EXAMPLE
        PS C:\>Invoke-NSRestoreAppfwprofile -archivename <string>
        An example how to restore appfwprofile config Object(s).
    .NOTES
        File Name : Invoke-NSRestoreAppfwprofile
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Archivename,

        [boolean]$Relaxationrules,

        [string]$Importprofilename,

        [string]$Matchurlstring,

        [string]$Replaceurlstring,

        [boolean]$Overwrite,

        [boolean]$Augment 

    )
    begin {
        Write-Verbose "Invoke-NSRestoreAppfwprofile: Starting"
    }
    process {
        try {
            $payload = @{ archivename = $archivename }
            if ( $PSBoundParameters.ContainsKey('relaxationrules') ) { $payload.Add('relaxationrules', $relaxationrules) }
            if ( $PSBoundParameters.ContainsKey('importprofilename') ) { $payload.Add('importprofilename', $importprofilename) }
            if ( $PSBoundParameters.ContainsKey('matchurlstring') ) { $payload.Add('matchurlstring', $matchurlstring) }
            if ( $PSBoundParameters.ContainsKey('replaceurlstring') ) { $payload.Add('replaceurlstring', $replaceurlstring) }
            if ( $PSBoundParameters.ContainsKey('overwrite') ) { $payload.Add('overwrite', $overwrite) }
            if ( $PSBoundParameters.ContainsKey('augment') ) { $payload.Add('augment', $augment) }
            if ( $PSCmdlet.ShouldProcess($Name, "Restore Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwprofile -Action restore -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSRestoreAppfwprofile: Finished"
    }
}

function Invoke-NSUnsetAppfwprofile {
    <#
    .SYNOPSIS
        Unset Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall profile resource.
    .PARAMETER Name
        Name for the profile. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.), pound (#), space ( ), at (@), equals (=), colon (:), and underscore (_) characters. Cannot be changed after the profile is added.
    .PARAMETER Starturlaction
        One or more Start URL actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -startURLaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -startURLaction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Infercontenttypexmlpayloadaction
        One or more infer content type payload actions. Available settings function as follows:
        * Block - Block connections that have mismatch in content-type header and payload.
        * Log - Log connections that have mismatch in content-type header and payload. The mismatched content-type in HTTP request header will be logged for the request.
        * Stats - Generate statistics when there is mismatch in content-type header and payload.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -inferContentTypeXMLPayloadAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -inferContentTypeXMLPayloadAction none". Please note "none" action cannot be used with any other action type.
        Possible values = block, log, stats, none
    .PARAMETER Contenttypeaction
        One or more Content-type actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -contentTypeaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -contentTypeaction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Inspectcontenttypes
        One or more InspectContentType lists.
        * application/x-www-form-urlencoded
        * multipart/form-data
        * text/x-gwt-rpc
          
        CLI users: To enable, type "set appfw profile -InspectContentTypes" followed by the content types to be inspected.
        Possible values = none, application/x-www-form-urlencoded, multipart/form-data, text/x-gwt-rpc, application/grpc, application/grpc-web+json, application/grpc-web-text
    .PARAMETER Starturlclosure
        Toggle the state of Start URL Closure.
          
        Possible values = ON, OFF
    .PARAMETER Denyurlaction
        One or more Deny URL actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        NOTE: The Deny URL check takes precedence over the Start URL check. If you enable blocking for the Deny URL check, the application firewall blocks any URL that is explicitly blocked by a Deny URL, even if the same URL would otherwise be allowed by the Start URL check.
          
        CLI users: To enable one or more actions, type "set appfw profile -denyURLaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -denyURLaction none".
        Possible values = none, block, log, stats
    .PARAMETER Refererheadercheck
        Enable validation of Referer headers.
        Referer validation ensures that a web form that a user sends to your web site originally came from your web site, not an outside attacker.
        Although this parameter is part of the Start URL check, referer validation protects against cross-site request forgery (CSRF) attacks, not Start URL attacks.
          
        Possible values = OFF, if_present, AlwaysExceptStartURLs, AlwaysExceptFirstRequest
    .PARAMETER Cookieconsistencyaction
        One or more Cookie Consistency actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -cookieConsistencyAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -cookieConsistencyAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Cookiehijackingaction
        One or more actions to prevent cookie hijacking. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
        NOTE: Cookie Hijacking feature is not supported for TLSv1.3
          
        CLI users: To enable one or more actions, type "set appfw profile -cookieHijackingAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -cookieHijackingAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER Cookietransforms
        Perform the specified type of cookie transformation.
        Available settings function as follows:
        * Encryption - Encrypt cookies.
        * Proxying - Mask contents of server cookies by sending proxy cookie to users.
        * Cookie flags - Flag cookies as HTTP only to prevent scripts on user's browser from accessing and possibly modifying them.
        CAUTION: Make sure that this parameter is set to ON if you are configuring any cookie transformations. If it is set to OFF, no cookie transformations are performed regardless of any other settings.
          
        Possible values = ON, OFF
    .PARAMETER Cookieencryption
        Type of cookie encryption. Available settings function as follows:
        * None - Do not encrypt cookies.
        * Decrypt Only - Decrypt encrypted cookies, but do not encrypt cookies.
        * Encrypt Session Only - Encrypt session cookies, but not permanent cookies.
        * Encrypt All - Encrypt all cookies.
          
        Possible values = none, decryptOnly, encryptSessionOnly, encryptAll
    .PARAMETER Cookieproxying
        Cookie proxy setting. Available settings function as follows:
        * None - Do not proxy cookies.
        * Session Only - Proxy session cookies by using the Citrix ADC session ID, but do not proxy permanent cookies.
          
        Possible values = none, sessionOnly
    .PARAMETER Addcookieflags
        Add the specified flags to cookies. Available settings function as follows:
        * None - Do not add flags to cookies.
        * HTTP Only - Add the HTTP Only flag to cookies, which prevents scripts from accessing cookies.
        * Secure - Add Secure flag to cookies.
        * All - Add both HTTPOnly and Secure flags to cookies.
          
        Possible values = none, httpOnly, secure, all
    .PARAMETER Fieldconsistencyaction
        One or more Form Field Consistency actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -fieldConsistencyaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -fieldConsistencyAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Csrftagaction
        One or more Cross-Site Request Forgery (CSRF) Tagging actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -CSRFTagAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -CSRFTagAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Crosssitescriptingaction
        One or more Cross-Site Scripting (XSS) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -crossSiteScriptingAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -crossSiteScriptingAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Crosssitescriptingtransformunsafehtml
        Transform cross-site scripts. This setting configures the application firewall to disable dangerous HTML instead of blocking the request.
        CAUTION: Make sure that this parameter is set to ON if you are configuring any cross-site scripting transformations. If it is set to OFF, no cross-site scripting transformations are performed regardless of any other settings.
          
        Possible values = ON, OFF
    .PARAMETER Crosssitescriptingcheckcompleteurls
        Check complete URLs for cross-site scripts, instead of just the query portions of URLs.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectionaction
        One or more HTML SQL Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -SQLInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -SQLInjectionAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Cmdinjectionaction
        Command injection action. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -cmdInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -cmdInjectionAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER Cmdinjectiontype
        Available CMD injection types.
        -CMDSplChar : Checks for CMD Special Chars
        -CMDKeyword : Checks for CMD Keywords
        -CMDSplCharANDKeyword : Checks for both and blocks if both are found
        -CMDSplCharORKeyword : Checks for both and blocks if anyone is found,
        -None : Disables checking using both CMD Special Char and Keyword.
          
        Possible values = CMDSplChar, CMDKeyword, CMDSplCharORKeyword, CMDSplCharANDKeyword, None
    .PARAMETER Sqlinjectiontransformspecialchars
        Transform injected SQL code. This setting configures the application firewall to disable SQL special strings instead of blocking the request. Since most SQL servers require a special string to activate an SQL keyword, in most cases a request that contains injected SQL code is safe if special strings are disabled.
        CAUTION: Make sure that this parameter is set to ON if you are configuring any SQL injection transformations. If it is set to OFF, no SQL injection transformations are performed regardless of any other settings.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectiononlycheckfieldswithsqlchars
        Check only form fields that contain SQL special strings (characters) for injected SQL code.
        Most SQL servers require a special string to activate an SQL request, so SQL code without a special string is harmless to most SQL servers.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectiontype
        Available SQL injection types.
        -SQLSplChar : Checks for SQL Special Chars
        -SQLKeyword : Checks for SQL Keywords
        -SQLSplCharANDKeyword : Checks for both and blocks if both are found
        -SQLSplCharORKeyword : Checks for both and blocks if anyone is found
        -None : Disables checking using both SQL Special Char and Keyword.
          
        Possible values = SQLSplChar, SQLKeyword, SQLSplCharORKeyword, SQLSplCharANDKeyword, None
    .PARAMETER Sqlinjectionchecksqlwildchars
        Check for form fields that contain SQL wild chars .
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectiongrammar
        Check for SQL injection using SQL grammar.
          
        Possible values = ON, OFF
    .PARAMETER Cmdinjectiongrammar
        Check for CMD injection using CMD grammar.
          
        Possible values = ON, OFF
    .PARAMETER Fieldformataction
        One or more Field Format actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of suggested web form fields and field format assignments.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -fieldFormatAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -fieldFormatAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Defaultfieldformattype
        Designate a default field type to be applied to web form fields that do not have a field type explicitly assigned to them.
    .PARAMETER Defaultfieldformatminlength
        Minimum length, in characters, for data entered into a field that is assigned the default field type.
        To disable the minimum and maximum length settings and allow data of any length to be entered into the field, set this parameter to zero (0).
          
          
        Maximum value = 2147483647
    .PARAMETER Defaultfieldformatmaxlength
        Maximum length, in characters, for data entered into a field that is assigned the default field type.
          
          
        Maximum value = 2147483647
    .PARAMETER Bufferoverflowaction
        One or more Buffer Overflow actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -bufferOverflowAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -bufferOverflowAction none".
        Possible values = none, block, log, stats
    .PARAMETER Grpcaction
        gRPC validation.
        Possible values = none, block, log, stats
    .PARAMETER Restaction
        rest validation.
        Possible values = none, block, log, stats
    .PARAMETER Bufferoverflowmaxurllength
        Maximum length, in characters, for URLs on your protected web sites. Requests with longer URLs are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxheaderlength
        Maximum length, in characters, for HTTP headers in requests sent to your protected web sites. Requests with longer headers are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxcookielength
        Maximum length, in characters, for cookies sent to your protected web sites. Requests with longer cookies are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxquerylength
        Maximum length, in bytes, for query string sent to your protected web sites. Requests with longer query strings are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxtotalheaderlength
        Maximum length, in bytes, for the total HTTP header length in requests sent to your protected web sites. The minimum value of this and maxHeaderLen in httpProfile will be used. Requests with longer length are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Creditcardaction
        One or more Credit Card actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -creditCardAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -creditCardAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Creditcard
        Credit card types that the application firewall should protect.
          
        Possible values = none, visa, mastercard, discover, amex, jcb, dinersclub
    .PARAMETER Creditcardmaxallowed
        This parameter value is used by the block action. It represents the maximum number of credit card numbers that can appear on a web page served by your protected web sites. Pages that contain more credit card numbers are blocked.
          
        Maximum value = 255
    .PARAMETER Creditcardxout
        Mask any credit card number detected in a response by replacing each digit, except the digits in the final group, with the letter "X.".
          
        Possible values = ON, OFF
    .PARAMETER Dosecurecreditcardlogging
        Setting this option logs credit card numbers in the response when the match is found.
          
        Possible values = ON, OFF
    .PARAMETER Streaming
        Setting this option converts content-length form submission requests (requests with content-type "application/x-www-form-urlencoded" or "multipart/form-data") to chunked requests when atleast one of the following protections : Signatures, SQL injection protection, XSS protection, form field consistency protection, starturl closure, CSRF tagging, JSON SQL, JSON XSS, JSON DOS is enabled. Please make sure that the backend server accepts chunked requests before enabling this option. Citrix recommends enabling this option for large request sizes(&gt;20MB).
          
        Possible values = ON, OFF
    .PARAMETER Trace
        Toggle the state of trace.
          
        Possible values = ON, OFF
    .PARAMETER Requestcontenttype
        Default Content-Type header for requests.
        A Content-Type header can contain 0-255 letters, numbers, and the hyphen (-) and underscore (_) characters.
    .PARAMETER Responsecontenttype
        Default Content-Type header for responses.
        A Content-Type header can contain 0-255 letters, numbers, and the hyphen (-) and underscore (_) characters.
    .PARAMETER Jsonerrorobject
        Name to the imported JSON Error Object to be set on application firewall profile.
    .PARAMETER Jsonerrorstatuscode
        Response status code associated with JSON error page. Non-empty JSON error object must be imported to the application firewall profile for the status code.
          
          
        Maximum value = 999
    .PARAMETER Jsonerrorstatusmessage
        Response status message associated with JSON error page.
    .PARAMETER Apispec
        Name of the API Specification.
    .PARAMETER Protofileobject
        Name of the imported proto file.
    .PARAMETER Jsondosaction
        One or more JSON Denial-of-Service (JsonDoS) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONDoSAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONDoSAction none".
        Possible values = none, block, log, stats
    .PARAMETER Jsonsqlinjectionaction
        One or more JSON SQL Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONSQLInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONSQLInjectionAction none".
        Possible values = none, block, log, stats
    .PARAMETER Jsonsqlinjectiontype
        Available SQL injection types.
        -SQLSplChar : Checks for SQL Special Chars
        -SQLKeyword : Checks for SQL Keywords
        -SQLSplCharANDKeyword : Checks for both and blocks if both are found
        -SQLSplCharORKeyword : Checks for both and blocks if anyone is found,
        -None : Disables checking using both SQL Special Char and Keyword.
          
        Possible values = SQLSplChar, SQLKeyword, SQLSplCharORKeyword, SQLSplCharANDKeyword, None
    .PARAMETER Jsonsqlinjectiongrammar
        Check for SQL injection using SQL grammar in JSON.
          
        Possible values = ON, OFF
    .PARAMETER Jsoncmdinjectionaction
        One or more JSON CMD Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONCMDInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONCMDInjectionAction none".
        Possible values = none, block, log, stats
    .PARAMETER Jsoncmdinjectiontype
        Available CMD injection types.
        -CMDSplChar : Checks for CMD Special Chars
        -CMDKeyword : Checks for CMD Keywords
        -CMDSplCharANDKeyword : Checks for both and blocks if both are found
        -CMDSplCharORKeyword : Checks for both and blocks if anyone is found,
        -None : Disables checking using both SQL Special Char and Keyword.
          
        Possible values = CMDSplChar, CMDKeyword, CMDSplCharORKeyword, CMDSplCharANDKeyword, None
    .PARAMETER Jsoncmdinjectiongrammar
        Check for CMD injection using CMD grammar in JSON.
          
        Possible values = ON, OFF
    .PARAMETER Jsonxssaction
        One or more JSON Cross-Site Scripting actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONXssAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONXssAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmldosaction
        One or more XML Denial-of-Service (XDoS) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLDoSAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLDoSAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlformataction
        One or more XML Format actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLFormatAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLFormatAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmlsqlinjectionaction
        One or more XML SQL Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLSQLInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLSQLInjectionAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmlsqlinjectiononlycheckfieldswithsqlchars
        Check only form fields that contain SQL special characters, which most SQL servers require before accepting an SQL command, for injected SQL.
          
        Possible values = ON, OFF
    .PARAMETER Xmlsqlinjectiontype
        Available SQL injection types.
        -SQLSplChar : Checks for SQL Special Chars
        -SQLKeyword : Checks for SQL Keywords
        -SQLSplCharANDKeyword : Checks for both and blocks if both are found
        -SQLSplCharORKeyword : Checks for both and blocks if anyone is found.
          
        Possible values = SQLSplChar, SQLKeyword, SQLSplCharORKeyword, SQLSplCharANDKeyword, None
    .PARAMETER Xmlsqlinjectionchecksqlwildchars
        Check for form fields that contain SQL wild chars .
          
        Possible values = ON, OFF
    .PARAMETER Xmlsqlinjectionparsecomments
        Parse comments in XML Data and exempt those sections of the request that are from the XML SQL Injection check. You must configure the type of comments that the application firewall is to detect and exempt from this security check. Available settings function as follows:
        * Check all - Check all content.
        * ANSI - Exempt content that is part of an ANSI (Mozilla-style) comment.
        * Nested - Exempt content that is part of a nested (Microsoft-style) comment.
        * ANSI Nested - Exempt content that is part of any type of comment.
          
        Possible values = checkall, ansi, nested, ansinested
    .PARAMETER Xmlxssaction
        One or more XML Cross-Site Scripting actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLXSSAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLXSSAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlwsiaction
        One or more Web Services Interoperability (WSI) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLWSIAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLWSIAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlattachmentaction
        One or more XML Attachment actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLAttachmentAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLAttachmentAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlvalidationaction
        One or more XML Validation actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLValidationAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLValidationAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmlerrorobject
        Name to assign to the XML Error Object, which the application firewall displays when a user request is blocked.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Cannot be changed after the XML error object is added.
    .PARAMETER Xmlerrorstatuscode
        Response status code associated with XML error page. Non-empty XML error object must be imported to the application firewall profile for the status code.
          
          
        Maximum value = 999
    .PARAMETER Xmlerrorstatusmessage
        Response status message associated with XML error page.
    .PARAMETER Customsettings
        Object name for custom settings.
        This check is applicable to Profile Type: HTML, XML. .
    .PARAMETER Signatures
        Object name for signatures.
        This check is applicable to Profile Type: HTML, XML. .
    .PARAMETER Xmlsoapfaultaction
        One or more XML SOAP Fault Filtering actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
        * Remove - Remove all violations for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLSOAPFaultAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLSOAPFaultAction none".
        Possible values = none, block, log, remove, stats
    .PARAMETER Usehtmlerrorobject
        Send an imported HTML Error object to a user when a request is blocked, instead of redirecting the user to the designated Error URL.
          
        Possible values = ON, OFF
    .PARAMETER Errorurl
        URL that application firewall uses as the Error URL.
    .PARAMETER Htmlerrorobject
        Name to assign to the HTML Error Object.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Cannot be changed after the HTML error object is added.
    .PARAMETER Htmlerrorstatuscode
        Response status code associated with HTML error page. Non-empty HTML error object must be imported to the application firewall profile for the status code.
          
          
        Maximum value = 999
    .PARAMETER Htmlerrorstatusmessage
        Response status message associated with HTML error page.
    .PARAMETER Logeverypolicyhit
        Log every profile match, regardless of security checks results.
          
        Possible values = ON, OFF
    .PARAMETER Stripcomments
        Strip HTML comments.
        This check is applicable to Profile Type: HTML. .
          
        Possible values = ON, OFF
    .PARAMETER Striphtmlcomments
        Strip HTML comments before forwarding a web page sent by a protected web site in response to a user request.
          
        Possible values = none, all, exclude_script_tag
    .PARAMETER Stripxmlcomments
        Strip XML comments before forwarding a web page sent by a protected web site in response to a user request.
          
        Possible values = none, all
    .PARAMETER Clientipexpression
        Expression to get the client IP.
    .PARAMETER Dynamiclearning
        One or more security checks. Available options are as follows:
        * SQLInjection - Enable dynamic learning for SQLInjection security check.
        * CrossSiteScripting - Enable dynamic learning for CrossSiteScripting security check.
        * fieldFormat - Enable dynamic learning for fieldFormat security check.
        * None - Disable security checks for all security checks.
          
        CLI users: To enable dynamic learning on one or more security checks, type "set appfw profile -dynamicLearning" followed by the security checks to be enabled. To turn off dynamic learning on all security checks, type "set appfw profile -dynamicLearning none".
        Possible values = none, SQLInjection, CrossSiteScripting, fieldFormat, startURL, cookieConsistency, fieldConsistency, CSRFtag, ContentType
    .PARAMETER Exemptclosureurlsfromsecuritychecks
        Exempt URLs that pass the Start URL closure check from SQL injection, cross-site script, field format and field consistency security checks at locations other than headers.
          
        Possible values = ON, OFF
    .PARAMETER Defaultcharset
        Default character set for protected web pages. Web pages sent by your protected web sites in response to user requests are assigned this character set if the page does not already specify a character set. The character sets supported by the application firewall are:
        * iso-8859-1 (English US)
        * big5 (Chinese Traditional)
        * gb2312 (Chinese Simplified)
        * sjis (Japanese Shift-JIS)
        * euc-jp (Japanese EUC-JP)
        * iso-8859-9 (Turkish)
        * utf-8 (Unicode)
        * euc-kr (Korean).
    .PARAMETER Postbodylimit
        Maximum allowed HTTP post body size, in bytes. Maximum supported value is 10GB. Citrix recommends enabling streaming option for large values of post body limit (&gt;20MB).
    .PARAMETER Postbodylimitaction
        One or more Post Body Limit actions. Available settings function as follows:
        * Block - Block connections that violate this security check. Must always be set.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -PostBodyLimitAction block" followed by the other actions to be enabled.
        Possible values = block, log, stats
    .PARAMETER Postbodylimitsignature
        Maximum allowed HTTP post body size for signature inspection for location HTTP_POST_BODY in the signatures, in bytes. Note that the changes in value could impact CPU and latency profile.
    .PARAMETER Fileuploadmaxnum
        Maximum allowed number of file uploads per form-submission request. The maximum setting (65535) allows an unlimited number of uploads.
          
          
        Maximum value = 65535
    .PARAMETER Canonicalizehtmlresponse
        Perform HTML entity encoding for any special characters in responses sent by your protected web sites.
          
        Possible values = ON, OFF
    .PARAMETER Enableformtagging
        Enable tagging of web form fields for use by the Form Field Consistency and CSRF Form Tagging checks.
          
        Possible values = ON, OFF
    .PARAMETER Sessionlessfieldconsistency
        Perform sessionless Field Consistency Checks.
          
        Possible values = OFF, ON, postOnly
    .PARAMETER Sessionlessurlclosure
        Enable session less URL Closure Checks.
        This check is applicable to Profile Type: HTML. .
          
        Possible values = ON, OFF
    .PARAMETER Semicolonfieldseparator
        Allow ';' as a form field separator in URL queries and POST form bodies. .
          
        Possible values = ON, OFF
    .PARAMETER Excludefileuploadfromchecks
        Exclude uploaded files from Form checks.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectionparsecomments
        Parse HTML comments and exempt them from the HTML SQL Injection check. You must specify the type of comments that the application firewall is to detect and exempt from this security check. Available settings function as follows:
        * Check all - Check all content.
        * ANSI - Exempt content that is part of an ANSI (Mozilla-style) comment.
        * Nested - Exempt content that is part of a nested (Microsoft-style) comment.
        * ANSI Nested - Exempt content that is part of any type of comment.
        Possible values = checkall, ansi, nested, ansinested
    .PARAMETER Invalidpercenthandling
        Configure the method that the application firewall uses to handle percent-encoded names and values. Available settings function as follows:
        * asp_mode - Microsoft ASP format.
        * secure_mode - Secure format.
          
        Possible values = asp_mode, secure_mode
    .PARAMETER Type
        Application firewall profile type, which controls which security checks and settings are applied to content that is filtered with the profile. Available settings function as follows:
        * HTML - HTML-based web sites.
        * XML - XML-based web sites and services.
        * JSON - JSON-based web sites and services.
        * HTML XML (Web 2.0) - Sites that contain both HTML and XML content, such as ATOM feeds, blogs, and RSS feeds.
        * HTML JSON - Sites that contain both HTML and JSON content.
        * XML JSON - Sites that contain both XML and JSON content.
        * HTML XML JSON - Sites that contain HTML, XML and JSON content.
          
        Possible values = HTML, XML, JSON
    .PARAMETER Checkrequestheaders
        Check request headers as well as web forms for injected SQL and cross-site scripts.
          
        Possible values = ON, OFF
    .PARAMETER Inspectquerycontenttypes
        Inspect request query as well as web forms for injected SQL and cross-site scripts for following content types.
        Possible values = HTML, XML, JSON, OTHER
    .PARAMETER Optimizepartialreqs
        Optimize handle of HTTP partial requests i.e. those with range headers.
        Available settings are as follows:
        * ON - Partial requests by the client result in partial requests to the backend server in most cases.
        * OFF - Partial requests by the client are changed to full requests to the backend server.
          
        Possible values = ON, OFF
    .PARAMETER Urldecoderequestcookies
        URL Decode request cookies before subjecting them to SQL and cross-site scripting checks.
          
        Possible values = ON, OFF
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER Percentdecoderecursively
        Configure whether the application firewall should use percentage recursive decoding.
          
        Possible values = ON, OFF
    .PARAMETER Multipleheaderaction
        One or more multiple header actions. Available settings function as follows:
        * Block - Block connections that have multiple headers.
        * Log - Log connections that have multiple headers.
        * KeepLast - Keep only last header when multiple headers are present.
          
        Request headers inspected:
        * Accept-Encoding
        * Content-Encoding
        * Content-Range
        * Content-Type
        * Host
        * Range
        * Referer
          
        CLI users: To enable one or more actions, type "set appfw profile -multipleHeaderAction" followed by the actions to be enabled.
        Possible values = block, keepLast, log, none
    .PARAMETER Rfcprofile
        Object name of the rfc profile.
    .PARAMETER Fileuploadtypesaction
        One or more file upload types actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -fileUploadTypeAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -fileUploadTypeAction none".
        Possible values = none, block, log, stats
    .PARAMETER Verboseloglevel
        Detailed Logging Verbose Log Level.
          
        Possible values = pattern, patternPayload, patternPayloadHeader
    .PARAMETER Insertcookiesamesiteattribute
        Configure whether application firewall should add samesite attribute for set-cookies.
          
        Possible values = ON, OFF
    .PARAMETER Cookiesamesiteattribute
        Cookie Samesite attribute added to support adding cookie SameSite attribute for all set-cookies including appfw session cookies. Default value will be "SameSite=Lax".
          
        Possible values = None, LAX, STRICT
    .PARAMETER Sqlinjectionruletype
        Specifies SQL Injection rule type: ALLOW/DENY. If ALLOW rule type is configured then allow list rules are used, if DENY rule type is configured then deny rules are used.
          
        Possible values = ALLOW, DENY
    .PARAMETER Fakeaccountdetection
        Fake account detection flag : ON/OFF. If set to ON fake account detection in enabled on ADC, if set to OFF fake account detection is disabled.
          
        Possible values = ON, OFF
    .PARAMETER Geolocationlogging
        Enable Geo-Location Logging in CEF format logs for the profile.
        Possible values = ON, OFF
    .PARAMETER Ceflogging
        Enable CEF format logs for the profile.
        Possible values = ON, OFF
    .PARAMETER Blockkeywordaction
        Block Keyword action. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -blockKeywordAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -blockKeywordAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER Jsonblockkeywordaction
        JSON Block Keyword action. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONBlockKeywordAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONBlockKeywordAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER As_prof_bypass_list_enable
        Enable bypass list for the profile.
          
        Possible values = ON, OFF
    .PARAMETER As_prof_deny_list_enable
        Enable deny list for the profile.
          
        Possible values = ON, OFF
    .PARAMETER Sessioncookiename
        Name of the session cookie that the application firewall uses to track user sessions.
        Must begin with a letter or number, and can consist of from 1 to 31 letters, numbers, and the hyphen (-) and underscore (_) symbols.
    .EXAMPLE
        PS C:\>Invoke-NSUnsetAppfwprofile -name <string>
        An example how to unset appfwprofile config Object(s).
    .NOTES
        File Name : Invoke-NSUnsetAppfwprofile
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Boolean]$starturlaction,

        [Boolean]$infercontenttypexmlpayloadaction,

        [Boolean]$contenttypeaction,

        [Boolean]$inspectcontenttypes,

        [Boolean]$starturlclosure,

        [Boolean]$denyurlaction,

        [Boolean]$refererheadercheck,

        [Boolean]$cookieconsistencyaction,

        [Boolean]$cookiehijackingaction,

        [Boolean]$cookietransforms,

        [Boolean]$cookieencryption,

        [Boolean]$cookieproxying,

        [Boolean]$addcookieflags,

        [Boolean]$fieldconsistencyaction,

        [Boolean]$csrftagaction,

        [Boolean]$crosssitescriptingaction,

        [Boolean]$crosssitescriptingtransformunsafehtml,

        [Boolean]$crosssitescriptingcheckcompleteurls,

        [Boolean]$sqlinjectionaction,

        [Boolean]$cmdinjectionaction,

        [Boolean]$cmdinjectiontype,

        [Boolean]$sqlinjectiontransformspecialchars,

        [Boolean]$sqlinjectiononlycheckfieldswithsqlchars,

        [Boolean]$sqlinjectiontype,

        [Boolean]$sqlinjectionchecksqlwildchars,

        [Boolean]$sqlinjectiongrammar,

        [Boolean]$cmdinjectiongrammar,

        [Boolean]$fieldformataction,

        [Boolean]$defaultfieldformattype,

        [Boolean]$defaultfieldformatminlength,

        [Boolean]$defaultfieldformatmaxlength,

        [Boolean]$bufferoverflowaction,

        [Boolean]$grpcaction,

        [Boolean]$restaction,

        [Boolean]$bufferoverflowmaxurllength,

        [Boolean]$bufferoverflowmaxheaderlength,

        [Boolean]$bufferoverflowmaxcookielength,

        [Boolean]$bufferoverflowmaxquerylength,

        [Boolean]$bufferoverflowmaxtotalheaderlength,

        [Boolean]$creditcardaction,

        [Boolean]$creditcard,

        [Boolean]$creditcardmaxallowed,

        [Boolean]$creditcardxout,

        [Boolean]$dosecurecreditcardlogging,

        [Boolean]$streaming,

        [Boolean]$trace,

        [Boolean]$requestcontenttype,

        [Boolean]$responsecontenttype,

        [Boolean]$jsonerrorobject,

        [Boolean]$jsonerrorstatuscode,

        [Boolean]$jsonerrorstatusmessage,

        [Boolean]$apispec,

        [Boolean]$protofileobject,

        [Boolean]$jsondosaction,

        [Boolean]$jsonsqlinjectionaction,

        [Boolean]$jsonsqlinjectiontype,

        [Boolean]$jsonsqlinjectiongrammar,

        [Boolean]$jsoncmdinjectionaction,

        [Boolean]$jsoncmdinjectiontype,

        [Boolean]$jsoncmdinjectiongrammar,

        [Boolean]$jsonxssaction,

        [Boolean]$xmldosaction,

        [Boolean]$xmlformataction,

        [Boolean]$xmlsqlinjectionaction,

        [Boolean]$xmlsqlinjectiononlycheckfieldswithsqlchars,

        [Boolean]$xmlsqlinjectiontype,

        [Boolean]$xmlsqlinjectionchecksqlwildchars,

        [Boolean]$xmlsqlinjectionparsecomments,

        [Boolean]$xmlxssaction,

        [Boolean]$xmlwsiaction,

        [Boolean]$xmlattachmentaction,

        [Boolean]$xmlvalidationaction,

        [Boolean]$xmlerrorobject,

        [Boolean]$xmlerrorstatuscode,

        [Boolean]$xmlerrorstatusmessage,

        [Boolean]$customsettings,

        [Boolean]$signatures,

        [Boolean]$xmlsoapfaultaction,

        [Boolean]$usehtmlerrorobject,

        [Boolean]$errorurl,

        [Boolean]$htmlerrorobject,

        [Boolean]$htmlerrorstatuscode,

        [Boolean]$htmlerrorstatusmessage,

        [Boolean]$logeverypolicyhit,

        [Boolean]$stripcomments,

        [Boolean]$striphtmlcomments,

        [Boolean]$stripxmlcomments,

        [Boolean]$clientipexpression,

        [Boolean]$dynamiclearning,

        [Boolean]$exemptclosureurlsfromsecuritychecks,

        [Boolean]$defaultcharset,

        [Boolean]$postbodylimit,

        [Boolean]$postbodylimitaction,

        [Boolean]$postbodylimitsignature,

        [Boolean]$fileuploadmaxnum,

        [Boolean]$canonicalizehtmlresponse,

        [Boolean]$enableformtagging,

        [Boolean]$sessionlessfieldconsistency,

        [Boolean]$sessionlessurlclosure,

        [Boolean]$semicolonfieldseparator,

        [Boolean]$excludefileuploadfromchecks,

        [Boolean]$sqlinjectionparsecomments,

        [Boolean]$invalidpercenthandling,

        [Boolean]$type,

        [Boolean]$checkrequestheaders,

        [Boolean]$inspectquerycontenttypes,

        [Boolean]$optimizepartialreqs,

        [Boolean]$urldecoderequestcookies,

        [Boolean]$comment,

        [Boolean]$percentdecoderecursively,

        [Boolean]$multipleheaderaction,

        [Boolean]$rfcprofile,

        [Boolean]$fileuploadtypesaction,

        [Boolean]$verboseloglevel,

        [Boolean]$insertcookiesamesiteattribute,

        [Boolean]$cookiesamesiteattribute,

        [Boolean]$sqlinjectionruletype,

        [Boolean]$fakeaccountdetection,

        [Boolean]$geolocationlogging,

        [Boolean]$ceflogging,

        [Boolean]$blockkeywordaction,

        [Boolean]$jsonblockkeywordaction,

        [Boolean]$as_prof_bypass_list_enable,

        [Boolean]$as_prof_deny_list_enable,

        [Boolean]$sessioncookiename 
    )
    begin {
        Write-Verbose "Invoke-NSUnsetAppfwprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('starturlaction') ) { $payload.Add('starturlaction', $starturlaction) }
            if ( $PSBoundParameters.ContainsKey('infercontenttypexmlpayloadaction') ) { $payload.Add('infercontenttypexmlpayloadaction', $infercontenttypexmlpayloadaction) }
            if ( $PSBoundParameters.ContainsKey('contenttypeaction') ) { $payload.Add('contenttypeaction', $contenttypeaction) }
            if ( $PSBoundParameters.ContainsKey('inspectcontenttypes') ) { $payload.Add('inspectcontenttypes', $inspectcontenttypes) }
            if ( $PSBoundParameters.ContainsKey('starturlclosure') ) { $payload.Add('starturlclosure', $starturlclosure) }
            if ( $PSBoundParameters.ContainsKey('denyurlaction') ) { $payload.Add('denyurlaction', $denyurlaction) }
            if ( $PSBoundParameters.ContainsKey('refererheadercheck') ) { $payload.Add('refererheadercheck', $refererheadercheck) }
            if ( $PSBoundParameters.ContainsKey('cookieconsistencyaction') ) { $payload.Add('cookieconsistencyaction', $cookieconsistencyaction) }
            if ( $PSBoundParameters.ContainsKey('cookiehijackingaction') ) { $payload.Add('cookiehijackingaction', $cookiehijackingaction) }
            if ( $PSBoundParameters.ContainsKey('cookietransforms') ) { $payload.Add('cookietransforms', $cookietransforms) }
            if ( $PSBoundParameters.ContainsKey('cookieencryption') ) { $payload.Add('cookieencryption', $cookieencryption) }
            if ( $PSBoundParameters.ContainsKey('cookieproxying') ) { $payload.Add('cookieproxying', $cookieproxying) }
            if ( $PSBoundParameters.ContainsKey('addcookieflags') ) { $payload.Add('addcookieflags', $addcookieflags) }
            if ( $PSBoundParameters.ContainsKey('fieldconsistencyaction') ) { $payload.Add('fieldconsistencyaction', $fieldconsistencyaction) }
            if ( $PSBoundParameters.ContainsKey('csrftagaction') ) { $payload.Add('csrftagaction', $csrftagaction) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingaction') ) { $payload.Add('crosssitescriptingaction', $crosssitescriptingaction) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingtransformunsafehtml') ) { $payload.Add('crosssitescriptingtransformunsafehtml', $crosssitescriptingtransformunsafehtml) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingcheckcompleteurls') ) { $payload.Add('crosssitescriptingcheckcompleteurls', $crosssitescriptingcheckcompleteurls) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionaction') ) { $payload.Add('sqlinjectionaction', $sqlinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('cmdinjectionaction') ) { $payload.Add('cmdinjectionaction', $cmdinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('cmdinjectiontype') ) { $payload.Add('cmdinjectiontype', $cmdinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiontransformspecialchars') ) { $payload.Add('sqlinjectiontransformspecialchars', $sqlinjectiontransformspecialchars) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiononlycheckfieldswithsqlchars') ) { $payload.Add('sqlinjectiononlycheckfieldswithsqlchars', $sqlinjectiononlycheckfieldswithsqlchars) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiontype') ) { $payload.Add('sqlinjectiontype', $sqlinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionchecksqlwildchars') ) { $payload.Add('sqlinjectionchecksqlwildchars', $sqlinjectionchecksqlwildchars) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiongrammar') ) { $payload.Add('sqlinjectiongrammar', $sqlinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('cmdinjectiongrammar') ) { $payload.Add('cmdinjectiongrammar', $cmdinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('fieldformataction') ) { $payload.Add('fieldformataction', $fieldformataction) }
            if ( $PSBoundParameters.ContainsKey('defaultfieldformattype') ) { $payload.Add('defaultfieldformattype', $defaultfieldformattype) }
            if ( $PSBoundParameters.ContainsKey('defaultfieldformatminlength') ) { $payload.Add('defaultfieldformatminlength', $defaultfieldformatminlength) }
            if ( $PSBoundParameters.ContainsKey('defaultfieldformatmaxlength') ) { $payload.Add('defaultfieldformatmaxlength', $defaultfieldformatmaxlength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowaction') ) { $payload.Add('bufferoverflowaction', $bufferoverflowaction) }
            if ( $PSBoundParameters.ContainsKey('grpcaction') ) { $payload.Add('grpcaction', $grpcaction) }
            if ( $PSBoundParameters.ContainsKey('restaction') ) { $payload.Add('restaction', $restaction) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxurllength') ) { $payload.Add('bufferoverflowmaxurllength', $bufferoverflowmaxurllength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxheaderlength') ) { $payload.Add('bufferoverflowmaxheaderlength', $bufferoverflowmaxheaderlength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxcookielength') ) { $payload.Add('bufferoverflowmaxcookielength', $bufferoverflowmaxcookielength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxquerylength') ) { $payload.Add('bufferoverflowmaxquerylength', $bufferoverflowmaxquerylength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxtotalheaderlength') ) { $payload.Add('bufferoverflowmaxtotalheaderlength', $bufferoverflowmaxtotalheaderlength) }
            if ( $PSBoundParameters.ContainsKey('creditcardaction') ) { $payload.Add('creditcardaction', $creditcardaction) }
            if ( $PSBoundParameters.ContainsKey('creditcard') ) { $payload.Add('creditcard', $creditcard) }
            if ( $PSBoundParameters.ContainsKey('creditcardmaxallowed') ) { $payload.Add('creditcardmaxallowed', $creditcardmaxallowed) }
            if ( $PSBoundParameters.ContainsKey('creditcardxout') ) { $payload.Add('creditcardxout', $creditcardxout) }
            if ( $PSBoundParameters.ContainsKey('dosecurecreditcardlogging') ) { $payload.Add('dosecurecreditcardlogging', $dosecurecreditcardlogging) }
            if ( $PSBoundParameters.ContainsKey('streaming') ) { $payload.Add('streaming', $streaming) }
            if ( $PSBoundParameters.ContainsKey('trace') ) { $payload.Add('trace', $trace) }
            if ( $PSBoundParameters.ContainsKey('requestcontenttype') ) { $payload.Add('requestcontenttype', $requestcontenttype) }
            if ( $PSBoundParameters.ContainsKey('responsecontenttype') ) { $payload.Add('responsecontenttype', $responsecontenttype) }
            if ( $PSBoundParameters.ContainsKey('jsonerrorobject') ) { $payload.Add('jsonerrorobject', $jsonerrorobject) }
            if ( $PSBoundParameters.ContainsKey('jsonerrorstatuscode') ) { $payload.Add('jsonerrorstatuscode', $jsonerrorstatuscode) }
            if ( $PSBoundParameters.ContainsKey('jsonerrorstatusmessage') ) { $payload.Add('jsonerrorstatusmessage', $jsonerrorstatusmessage) }
            if ( $PSBoundParameters.ContainsKey('apispec') ) { $payload.Add('apispec', $apispec) }
            if ( $PSBoundParameters.ContainsKey('protofileobject') ) { $payload.Add('protofileobject', $protofileobject) }
            if ( $PSBoundParameters.ContainsKey('jsondosaction') ) { $payload.Add('jsondosaction', $jsondosaction) }
            if ( $PSBoundParameters.ContainsKey('jsonsqlinjectionaction') ) { $payload.Add('jsonsqlinjectionaction', $jsonsqlinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('jsonsqlinjectiontype') ) { $payload.Add('jsonsqlinjectiontype', $jsonsqlinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('jsonsqlinjectiongrammar') ) { $payload.Add('jsonsqlinjectiongrammar', $jsonsqlinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('jsoncmdinjectionaction') ) { $payload.Add('jsoncmdinjectionaction', $jsoncmdinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('jsoncmdinjectiontype') ) { $payload.Add('jsoncmdinjectiontype', $jsoncmdinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('jsoncmdinjectiongrammar') ) { $payload.Add('jsoncmdinjectiongrammar', $jsoncmdinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('jsonxssaction') ) { $payload.Add('jsonxssaction', $jsonxssaction) }
            if ( $PSBoundParameters.ContainsKey('xmldosaction') ) { $payload.Add('xmldosaction', $xmldosaction) }
            if ( $PSBoundParameters.ContainsKey('xmlformataction') ) { $payload.Add('xmlformataction', $xmlformataction) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectionaction') ) { $payload.Add('xmlsqlinjectionaction', $xmlsqlinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectiononlycheckfieldswithsqlchars') ) { $payload.Add('xmlsqlinjectiononlycheckfieldswithsqlchars', $xmlsqlinjectiononlycheckfieldswithsqlchars) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectiontype') ) { $payload.Add('xmlsqlinjectiontype', $xmlsqlinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectionchecksqlwildchars') ) { $payload.Add('xmlsqlinjectionchecksqlwildchars', $xmlsqlinjectionchecksqlwildchars) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectionparsecomments') ) { $payload.Add('xmlsqlinjectionparsecomments', $xmlsqlinjectionparsecomments) }
            if ( $PSBoundParameters.ContainsKey('xmlxssaction') ) { $payload.Add('xmlxssaction', $xmlxssaction) }
            if ( $PSBoundParameters.ContainsKey('xmlwsiaction') ) { $payload.Add('xmlwsiaction', $xmlwsiaction) }
            if ( $PSBoundParameters.ContainsKey('xmlattachmentaction') ) { $payload.Add('xmlattachmentaction', $xmlattachmentaction) }
            if ( $PSBoundParameters.ContainsKey('xmlvalidationaction') ) { $payload.Add('xmlvalidationaction', $xmlvalidationaction) }
            if ( $PSBoundParameters.ContainsKey('xmlerrorobject') ) { $payload.Add('xmlerrorobject', $xmlerrorobject) }
            if ( $PSBoundParameters.ContainsKey('xmlerrorstatuscode') ) { $payload.Add('xmlerrorstatuscode', $xmlerrorstatuscode) }
            if ( $PSBoundParameters.ContainsKey('xmlerrorstatusmessage') ) { $payload.Add('xmlerrorstatusmessage', $xmlerrorstatusmessage) }
            if ( $PSBoundParameters.ContainsKey('customsettings') ) { $payload.Add('customsettings', $customsettings) }
            if ( $PSBoundParameters.ContainsKey('signatures') ) { $payload.Add('signatures', $signatures) }
            if ( $PSBoundParameters.ContainsKey('xmlsoapfaultaction') ) { $payload.Add('xmlsoapfaultaction', $xmlsoapfaultaction) }
            if ( $PSBoundParameters.ContainsKey('usehtmlerrorobject') ) { $payload.Add('usehtmlerrorobject', $usehtmlerrorobject) }
            if ( $PSBoundParameters.ContainsKey('errorurl') ) { $payload.Add('errorurl', $errorurl) }
            if ( $PSBoundParameters.ContainsKey('htmlerrorobject') ) { $payload.Add('htmlerrorobject', $htmlerrorobject) }
            if ( $PSBoundParameters.ContainsKey('htmlerrorstatuscode') ) { $payload.Add('htmlerrorstatuscode', $htmlerrorstatuscode) }
            if ( $PSBoundParameters.ContainsKey('htmlerrorstatusmessage') ) { $payload.Add('htmlerrorstatusmessage', $htmlerrorstatusmessage) }
            if ( $PSBoundParameters.ContainsKey('logeverypolicyhit') ) { $payload.Add('logeverypolicyhit', $logeverypolicyhit) }
            if ( $PSBoundParameters.ContainsKey('stripcomments') ) { $payload.Add('stripcomments', $stripcomments) }
            if ( $PSBoundParameters.ContainsKey('striphtmlcomments') ) { $payload.Add('striphtmlcomments', $striphtmlcomments) }
            if ( $PSBoundParameters.ContainsKey('stripxmlcomments') ) { $payload.Add('stripxmlcomments', $stripxmlcomments) }
            if ( $PSBoundParameters.ContainsKey('clientipexpression') ) { $payload.Add('clientipexpression', $clientipexpression) }
            if ( $PSBoundParameters.ContainsKey('dynamiclearning') ) { $payload.Add('dynamiclearning', $dynamiclearning) }
            if ( $PSBoundParameters.ContainsKey('exemptclosureurlsfromsecuritychecks') ) { $payload.Add('exemptclosureurlsfromsecuritychecks', $exemptclosureurlsfromsecuritychecks) }
            if ( $PSBoundParameters.ContainsKey('defaultcharset') ) { $payload.Add('defaultcharset', $defaultcharset) }
            if ( $PSBoundParameters.ContainsKey('postbodylimit') ) { $payload.Add('postbodylimit', $postbodylimit) }
            if ( $PSBoundParameters.ContainsKey('postbodylimitaction') ) { $payload.Add('postbodylimitaction', $postbodylimitaction) }
            if ( $PSBoundParameters.ContainsKey('postbodylimitsignature') ) { $payload.Add('postbodylimitsignature', $postbodylimitsignature) }
            if ( $PSBoundParameters.ContainsKey('fileuploadmaxnum') ) { $payload.Add('fileuploadmaxnum', $fileuploadmaxnum) }
            if ( $PSBoundParameters.ContainsKey('canonicalizehtmlresponse') ) { $payload.Add('canonicalizehtmlresponse', $canonicalizehtmlresponse) }
            if ( $PSBoundParameters.ContainsKey('enableformtagging') ) { $payload.Add('enableformtagging', $enableformtagging) }
            if ( $PSBoundParameters.ContainsKey('sessionlessfieldconsistency') ) { $payload.Add('sessionlessfieldconsistency', $sessionlessfieldconsistency) }
            if ( $PSBoundParameters.ContainsKey('sessionlessurlclosure') ) { $payload.Add('sessionlessurlclosure', $sessionlessurlclosure) }
            if ( $PSBoundParameters.ContainsKey('semicolonfieldseparator') ) { $payload.Add('semicolonfieldseparator', $semicolonfieldseparator) }
            if ( $PSBoundParameters.ContainsKey('excludefileuploadfromchecks') ) { $payload.Add('excludefileuploadfromchecks', $excludefileuploadfromchecks) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionparsecomments') ) { $payload.Add('sqlinjectionparsecomments', $sqlinjectionparsecomments) }
            if ( $PSBoundParameters.ContainsKey('invalidpercenthandling') ) { $payload.Add('invalidpercenthandling', $invalidpercenthandling) }
            if ( $PSBoundParameters.ContainsKey('type') ) { $payload.Add('type', $type) }
            if ( $PSBoundParameters.ContainsKey('checkrequestheaders') ) { $payload.Add('checkrequestheaders', $checkrequestheaders) }
            if ( $PSBoundParameters.ContainsKey('inspectquerycontenttypes') ) { $payload.Add('inspectquerycontenttypes', $inspectquerycontenttypes) }
            if ( $PSBoundParameters.ContainsKey('optimizepartialreqs') ) { $payload.Add('optimizepartialreqs', $optimizepartialreqs) }
            if ( $PSBoundParameters.ContainsKey('urldecoderequestcookies') ) { $payload.Add('urldecoderequestcookies', $urldecoderequestcookies) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('percentdecoderecursively') ) { $payload.Add('percentdecoderecursively', $percentdecoderecursively) }
            if ( $PSBoundParameters.ContainsKey('multipleheaderaction') ) { $payload.Add('multipleheaderaction', $multipleheaderaction) }
            if ( $PSBoundParameters.ContainsKey('rfcprofile') ) { $payload.Add('rfcprofile', $rfcprofile) }
            if ( $PSBoundParameters.ContainsKey('fileuploadtypesaction') ) { $payload.Add('fileuploadtypesaction', $fileuploadtypesaction) }
            if ( $PSBoundParameters.ContainsKey('verboseloglevel') ) { $payload.Add('verboseloglevel', $verboseloglevel) }
            if ( $PSBoundParameters.ContainsKey('insertcookiesamesiteattribute') ) { $payload.Add('insertcookiesamesiteattribute', $insertcookiesamesiteattribute) }
            if ( $PSBoundParameters.ContainsKey('cookiesamesiteattribute') ) { $payload.Add('cookiesamesiteattribute', $cookiesamesiteattribute) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionruletype') ) { $payload.Add('sqlinjectionruletype', $sqlinjectionruletype) }
            if ( $PSBoundParameters.ContainsKey('fakeaccountdetection') ) { $payload.Add('fakeaccountdetection', $fakeaccountdetection) }
            if ( $PSBoundParameters.ContainsKey('geolocationlogging') ) { $payload.Add('geolocationlogging', $geolocationlogging) }
            if ( $PSBoundParameters.ContainsKey('ceflogging') ) { $payload.Add('ceflogging', $ceflogging) }
            if ( $PSBoundParameters.ContainsKey('blockkeywordaction') ) { $payload.Add('blockkeywordaction', $blockkeywordaction) }
            if ( $PSBoundParameters.ContainsKey('jsonblockkeywordaction') ) { $payload.Add('jsonblockkeywordaction', $jsonblockkeywordaction) }
            if ( $PSBoundParameters.ContainsKey('as_prof_bypass_list_enable') ) { $payload.Add('as_prof_bypass_list_enable', $as_prof_bypass_list_enable) }
            if ( $PSBoundParameters.ContainsKey('as_prof_deny_list_enable') ) { $payload.Add('as_prof_deny_list_enable', $as_prof_deny_list_enable) }
            if ( $PSBoundParameters.ContainsKey('sessioncookiename') ) { $payload.Add('sessioncookiename', $sessioncookiename) }
            if ( $PSCmdlet.ShouldProcess("$name", "Unset Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type appfwprofile -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUnsetAppfwprofile: Finished"
    }
}

function Invoke-NSDeleteAppfwprofile {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall profile resource.
    .PARAMETER Name
        Name for the profile. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.), pound (#), space ( ), at (@), equals (=), colon (:), and underscore (_) characters. Cannot be changed after the profile is added.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofile -Name <string>
        An example how to delete appfwprofile config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofile
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofile: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofile: Finished"
    }
}

function Invoke-NSUpdateAppfwprofile {
    <#
    .SYNOPSIS
        Update Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall profile resource.
    .PARAMETER Name
        Name for the profile. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.), pound (#), space ( ), at (@), equals (=), colon (:), and underscore (_) characters. Cannot be changed after the profile is added.
    .PARAMETER Starturlaction
        One or more Start URL actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -startURLaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -startURLaction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Infercontenttypexmlpayloadaction
        One or more infer content type payload actions. Available settings function as follows:
        * Block - Block connections that have mismatch in content-type header and payload.
        * Log - Log connections that have mismatch in content-type header and payload. The mismatched content-type in HTTP request header will be logged for the request.
        * Stats - Generate statistics when there is mismatch in content-type header and payload.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -inferContentTypeXMLPayloadAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -inferContentTypeXMLPayloadAction none". Please note "none" action cannot be used with any other action type.
        Possible values = block, log, stats, none
    .PARAMETER Contenttypeaction
        One or more Content-type actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -contentTypeaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -contentTypeaction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Inspectcontenttypes
        One or more InspectContentType lists.
        * application/x-www-form-urlencoded
        * multipart/form-data
        * text/x-gwt-rpc
          
        CLI users: To enable, type "set appfw profile -InspectContentTypes" followed by the content types to be inspected.
        Possible values = none, application/x-www-form-urlencoded, multipart/form-data, text/x-gwt-rpc, application/grpc, application/grpc-web+json, application/grpc-web-text
    .PARAMETER Starturlclosure
        Toggle the state of Start URL Closure.
          
        Possible values = ON, OFF
    .PARAMETER Denyurlaction
        One or more Deny URL actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        NOTE: The Deny URL check takes precedence over the Start URL check. If you enable blocking for the Deny URL check, the application firewall blocks any URL that is explicitly blocked by a Deny URL, even if the same URL would otherwise be allowed by the Start URL check.
          
        CLI users: To enable one or more actions, type "set appfw profile -denyURLaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -denyURLaction none".
        Possible values = none, block, log, stats
    .PARAMETER Refererheadercheck
        Enable validation of Referer headers.
        Referer validation ensures that a web form that a user sends to your web site originally came from your web site, not an outside attacker.
        Although this parameter is part of the Start URL check, referer validation protects against cross-site request forgery (CSRF) attacks, not Start URL attacks.
          
        Possible values = OFF, if_present, AlwaysExceptStartURLs, AlwaysExceptFirstRequest
    .PARAMETER Cookieconsistencyaction
        One or more Cookie Consistency actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -cookieConsistencyAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -cookieConsistencyAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Cookiehijackingaction
        One or more actions to prevent cookie hijacking. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
        NOTE: Cookie Hijacking feature is not supported for TLSv1.3
          
        CLI users: To enable one or more actions, type "set appfw profile -cookieHijackingAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -cookieHijackingAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER Cookietransforms
        Perform the specified type of cookie transformation.
        Available settings function as follows:
        * Encryption - Encrypt cookies.
        * Proxying - Mask contents of server cookies by sending proxy cookie to users.
        * Cookie flags - Flag cookies as HTTP only to prevent scripts on user's browser from accessing and possibly modifying them.
        CAUTION: Make sure that this parameter is set to ON if you are configuring any cookie transformations. If it is set to OFF, no cookie transformations are performed regardless of any other settings.
          
        Possible values = ON, OFF
    .PARAMETER Cookieencryption
        Type of cookie encryption. Available settings function as follows:
        * None - Do not encrypt cookies.
        * Decrypt Only - Decrypt encrypted cookies, but do not encrypt cookies.
        * Encrypt Session Only - Encrypt session cookies, but not permanent cookies.
        * Encrypt All - Encrypt all cookies.
          
        Possible values = none, decryptOnly, encryptSessionOnly, encryptAll
    .PARAMETER Cookieproxying
        Cookie proxy setting. Available settings function as follows:
        * None - Do not proxy cookies.
        * Session Only - Proxy session cookies by using the Citrix ADC session ID, but do not proxy permanent cookies.
          
        Possible values = none, sessionOnly
    .PARAMETER Addcookieflags
        Add the specified flags to cookies. Available settings function as follows:
        * None - Do not add flags to cookies.
        * HTTP Only - Add the HTTP Only flag to cookies, which prevents scripts from accessing cookies.
        * Secure - Add Secure flag to cookies.
        * All - Add both HTTPOnly and Secure flags to cookies.
          
        Possible values = none, httpOnly, secure, all
    .PARAMETER Fieldconsistencyaction
        One or more Form Field Consistency actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -fieldConsistencyaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -fieldConsistencyAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Csrftagaction
        One or more Cross-Site Request Forgery (CSRF) Tagging actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -CSRFTagAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -CSRFTagAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Crosssitescriptingaction
        One or more Cross-Site Scripting (XSS) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -crossSiteScriptingAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -crossSiteScriptingAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Crosssitescriptingtransformunsafehtml
        Transform cross-site scripts. This setting configures the application firewall to disable dangerous HTML instead of blocking the request.
        CAUTION: Make sure that this parameter is set to ON if you are configuring any cross-site scripting transformations. If it is set to OFF, no cross-site scripting transformations are performed regardless of any other settings.
          
        Possible values = ON, OFF
    .PARAMETER Crosssitescriptingcheckcompleteurls
        Check complete URLs for cross-site scripts, instead of just the query portions of URLs.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectionaction
        One or more HTML SQL Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -SQLInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -SQLInjectionAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Cmdinjectionaction
        Command injection action. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -cmdInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -cmdInjectionAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER Cmdinjectiontype
        Available CMD injection types.
        -CMDSplChar : Checks for CMD Special Chars
        -CMDKeyword : Checks for CMD Keywords
        -CMDSplCharANDKeyword : Checks for both and blocks if both are found
        -CMDSplCharORKeyword : Checks for both and blocks if anyone is found,
        -None : Disables checking using both CMD Special Char and Keyword.
          
        Possible values = CMDSplChar, CMDKeyword, CMDSplCharORKeyword, CMDSplCharANDKeyword, None
    .PARAMETER Sqlinjectiontransformspecialchars
        Transform injected SQL code. This setting configures the application firewall to disable SQL special strings instead of blocking the request. Since most SQL servers require a special string to activate an SQL keyword, in most cases a request that contains injected SQL code is safe if special strings are disabled.
        CAUTION: Make sure that this parameter is set to ON if you are configuring any SQL injection transformations. If it is set to OFF, no SQL injection transformations are performed regardless of any other settings.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectiononlycheckfieldswithsqlchars
        Check only form fields that contain SQL special strings (characters) for injected SQL code.
        Most SQL servers require a special string to activate an SQL request, so SQL code without a special string is harmless to most SQL servers.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectiontype
        Available SQL injection types.
        -SQLSplChar : Checks for SQL Special Chars
        -SQLKeyword : Checks for SQL Keywords
        -SQLSplCharANDKeyword : Checks for both and blocks if both are found
        -SQLSplCharORKeyword : Checks for both and blocks if anyone is found
        -None : Disables checking using both SQL Special Char and Keyword.
          
        Possible values = SQLSplChar, SQLKeyword, SQLSplCharORKeyword, SQLSplCharANDKeyword, None
    .PARAMETER Sqlinjectionchecksqlwildchars
        Check for form fields that contain SQL wild chars .
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectiongrammar
        Check for SQL injection using SQL grammar.
          
        Possible values = ON, OFF
    .PARAMETER Cmdinjectiongrammar
        Check for CMD injection using CMD grammar.
          
        Possible values = ON, OFF
    .PARAMETER Fieldformataction
        One or more Field Format actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of suggested web form fields and field format assignments.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -fieldFormatAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -fieldFormatAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Defaultfieldformattype
        Designate a default field type to be applied to web form fields that do not have a field type explicitly assigned to them.
    .PARAMETER Defaultfieldformatminlength
        Minimum length, in characters, for data entered into a field that is assigned the default field type.
        To disable the minimum and maximum length settings and allow data of any length to be entered into the field, set this parameter to zero (0).
          
          
        Maximum value = 2147483647
    .PARAMETER Defaultfieldformatmaxlength
        Maximum length, in characters, for data entered into a field that is assigned the default field type.
          
          
        Maximum value = 2147483647
    .PARAMETER Bufferoverflowaction
        One or more Buffer Overflow actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -bufferOverflowAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -bufferOverflowAction none".
        Possible values = none, block, log, stats
    .PARAMETER Grpcaction
        gRPC validation.
        Possible values = none, block, log, stats
    .PARAMETER Restaction
        rest validation.
        Possible values = none, block, log, stats
    .PARAMETER Bufferoverflowmaxurllength
        Maximum length, in characters, for URLs on your protected web sites. Requests with longer URLs are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxheaderlength
        Maximum length, in characters, for HTTP headers in requests sent to your protected web sites. Requests with longer headers are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxcookielength
        Maximum length, in characters, for cookies sent to your protected web sites. Requests with longer cookies are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxquerylength
        Maximum length, in bytes, for query string sent to your protected web sites. Requests with longer query strings are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxtotalheaderlength
        Maximum length, in bytes, for the total HTTP header length in requests sent to your protected web sites. The minimum value of this and maxHeaderLen in httpProfile will be used. Requests with longer length are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Creditcardaction
        One or more Credit Card actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -creditCardAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -creditCardAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Creditcard
        Credit card types that the application firewall should protect.
          
        Possible values = none, visa, mastercard, discover, amex, jcb, dinersclub
    .PARAMETER Creditcardmaxallowed
        This parameter value is used by the block action. It represents the maximum number of credit card numbers that can appear on a web page served by your protected web sites. Pages that contain more credit card numbers are blocked.
          
        Maximum value = 255
    .PARAMETER Creditcardxout
        Mask any credit card number detected in a response by replacing each digit, except the digits in the final group, with the letter "X.".
          
        Possible values = ON, OFF
    .PARAMETER Dosecurecreditcardlogging
        Setting this option logs credit card numbers in the response when the match is found.
          
        Possible values = ON, OFF
    .PARAMETER Streaming
        Setting this option converts content-length form submission requests (requests with content-type "application/x-www-form-urlencoded" or "multipart/form-data") to chunked requests when atleast one of the following protections : Signatures, SQL injection protection, XSS protection, form field consistency protection, starturl closure, CSRF tagging, JSON SQL, JSON XSS, JSON DOS is enabled. Please make sure that the backend server accepts chunked requests before enabling this option. Citrix recommends enabling this option for large request sizes(&gt;20MB).
          
        Possible values = ON, OFF
    .PARAMETER Trace
        Toggle the state of trace.
          
        Possible values = ON, OFF
    .PARAMETER Requestcontenttype
        Default Content-Type header for requests.
        A Content-Type header can contain 0-255 letters, numbers, and the hyphen (-) and underscore (_) characters.
    .PARAMETER Responsecontenttype
        Default Content-Type header for responses.
        A Content-Type header can contain 0-255 letters, numbers, and the hyphen (-) and underscore (_) characters.
    .PARAMETER Jsonerrorobject
        Name to the imported JSON Error Object to be set on application firewall profile.
    .PARAMETER Jsonerrorstatuscode
        Response status code associated with JSON error page. Non-empty JSON error object must be imported to the application firewall profile for the status code.
          
          
        Maximum value = 999
    .PARAMETER Jsonerrorstatusmessage
        Response status message associated with JSON error page.
    .PARAMETER Apispec
        Name of the API Specification.
    .PARAMETER Protofileobject
        Name of the imported proto file.
    .PARAMETER Jsondosaction
        One or more JSON Denial-of-Service (JsonDoS) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONDoSAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONDoSAction none".
        Possible values = none, block, log, stats
    .PARAMETER Jsonsqlinjectionaction
        One or more JSON SQL Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONSQLInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONSQLInjectionAction none".
        Possible values = none, block, log, stats
    .PARAMETER Jsonsqlinjectiontype
        Available SQL injection types.
        -SQLSplChar : Checks for SQL Special Chars
        -SQLKeyword : Checks for SQL Keywords
        -SQLSplCharANDKeyword : Checks for both and blocks if both are found
        -SQLSplCharORKeyword : Checks for both and blocks if anyone is found,
        -None : Disables checking using both SQL Special Char and Keyword.
          
        Possible values = SQLSplChar, SQLKeyword, SQLSplCharORKeyword, SQLSplCharANDKeyword, None
    .PARAMETER Jsonsqlinjectiongrammar
        Check for SQL injection using SQL grammar in JSON.
          
        Possible values = ON, OFF
    .PARAMETER Jsoncmdinjectionaction
        One or more JSON CMD Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONCMDInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONCMDInjectionAction none".
        Possible values = none, block, log, stats
    .PARAMETER Jsoncmdinjectiontype
        Available CMD injection types.
        -CMDSplChar : Checks for CMD Special Chars
        -CMDKeyword : Checks for CMD Keywords
        -CMDSplCharANDKeyword : Checks for both and blocks if both are found
        -CMDSplCharORKeyword : Checks for both and blocks if anyone is found,
        -None : Disables checking using both SQL Special Char and Keyword.
          
        Possible values = CMDSplChar, CMDKeyword, CMDSplCharORKeyword, CMDSplCharANDKeyword, None
    .PARAMETER Jsoncmdinjectiongrammar
        Check for CMD injection using CMD grammar in JSON.
          
        Possible values = ON, OFF
    .PARAMETER Jsonxssaction
        One or more JSON Cross-Site Scripting actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONXssAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONXssAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmldosaction
        One or more XML Denial-of-Service (XDoS) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLDoSAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLDoSAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlformataction
        One or more XML Format actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLFormatAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLFormatAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmlsqlinjectionaction
        One or more XML SQL Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLSQLInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLSQLInjectionAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmlsqlinjectiononlycheckfieldswithsqlchars
        Check only form fields that contain SQL special characters, which most SQL servers require before accepting an SQL command, for injected SQL.
          
        Possible values = ON, OFF
    .PARAMETER Xmlsqlinjectiontype
        Available SQL injection types.
        -SQLSplChar : Checks for SQL Special Chars
        -SQLKeyword : Checks for SQL Keywords
        -SQLSplCharANDKeyword : Checks for both and blocks if both are found
        -SQLSplCharORKeyword : Checks for both and blocks if anyone is found.
          
        Possible values = SQLSplChar, SQLKeyword, SQLSplCharORKeyword, SQLSplCharANDKeyword, None
    .PARAMETER Xmlsqlinjectionchecksqlwildchars
        Check for form fields that contain SQL wild chars .
          
        Possible values = ON, OFF
    .PARAMETER Xmlsqlinjectionparsecomments
        Parse comments in XML Data and exempt those sections of the request that are from the XML SQL Injection check. You must configure the type of comments that the application firewall is to detect and exempt from this security check. Available settings function as follows:
        * Check all - Check all content.
        * ANSI - Exempt content that is part of an ANSI (Mozilla-style) comment.
        * Nested - Exempt content that is part of a nested (Microsoft-style) comment.
        * ANSI Nested - Exempt content that is part of any type of comment.
          
        Possible values = checkall, ansi, nested, ansinested
    .PARAMETER Xmlxssaction
        One or more XML Cross-Site Scripting actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLXSSAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLXSSAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlwsiaction
        One or more Web Services Interoperability (WSI) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLWSIAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLWSIAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlattachmentaction
        One or more XML Attachment actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLAttachmentAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLAttachmentAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlvalidationaction
        One or more XML Validation actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLValidationAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLValidationAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmlerrorobject
        Name to assign to the XML Error Object, which the application firewall displays when a user request is blocked.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Cannot be changed after the XML error object is added.
    .PARAMETER Xmlerrorstatuscode
        Response status code associated with XML error page. Non-empty XML error object must be imported to the application firewall profile for the status code.
          
          
        Maximum value = 999
    .PARAMETER Xmlerrorstatusmessage
        Response status message associated with XML error page.
    .PARAMETER Customsettings
        Object name for custom settings.
        This check is applicable to Profile Type: HTML, XML. .
    .PARAMETER Signatures
        Object name for signatures.
        This check is applicable to Profile Type: HTML, XML. .
    .PARAMETER Xmlsoapfaultaction
        One or more XML SOAP Fault Filtering actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
        * Remove - Remove all violations for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLSOAPFaultAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLSOAPFaultAction none".
        Possible values = none, block, log, remove, stats
    .PARAMETER Usehtmlerrorobject
        Send an imported HTML Error object to a user when a request is blocked, instead of redirecting the user to the designated Error URL.
          
        Possible values = ON, OFF
    .PARAMETER Errorurl
        URL that application firewall uses as the Error URL.
    .PARAMETER Htmlerrorobject
        Name to assign to the HTML Error Object.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Cannot be changed after the HTML error object is added.
    .PARAMETER Htmlerrorstatuscode
        Response status code associated with HTML error page. Non-empty HTML error object must be imported to the application firewall profile for the status code.
          
          
        Maximum value = 999
    .PARAMETER Htmlerrorstatusmessage
        Response status message associated with HTML error page.
    .PARAMETER Logeverypolicyhit
        Log every profile match, regardless of security checks results.
          
        Possible values = ON, OFF
    .PARAMETER Stripcomments
        Strip HTML comments.
        This check is applicable to Profile Type: HTML. .
          
        Possible values = ON, OFF
    .PARAMETER Striphtmlcomments
        Strip HTML comments before forwarding a web page sent by a protected web site in response to a user request.
          
        Possible values = none, all, exclude_script_tag
    .PARAMETER Stripxmlcomments
        Strip XML comments before forwarding a web page sent by a protected web site in response to a user request.
          
        Possible values = none, all
    .PARAMETER Clientipexpression
        Expression to get the client IP.
    .PARAMETER Dynamiclearning
        One or more security checks. Available options are as follows:
        * SQLInjection - Enable dynamic learning for SQLInjection security check.
        * CrossSiteScripting - Enable dynamic learning for CrossSiteScripting security check.
        * fieldFormat - Enable dynamic learning for fieldFormat security check.
        * None - Disable security checks for all security checks.
          
        CLI users: To enable dynamic learning on one or more security checks, type "set appfw profile -dynamicLearning" followed by the security checks to be enabled. To turn off dynamic learning on all security checks, type "set appfw profile -dynamicLearning none".
        Possible values = none, SQLInjection, CrossSiteScripting, fieldFormat, startURL, cookieConsistency, fieldConsistency, CSRFtag, ContentType
    .PARAMETER Exemptclosureurlsfromsecuritychecks
        Exempt URLs that pass the Start URL closure check from SQL injection, cross-site script, field format and field consistency security checks at locations other than headers.
          
        Possible values = ON, OFF
    .PARAMETER Defaultcharset
        Default character set for protected web pages. Web pages sent by your protected web sites in response to user requests are assigned this character set if the page does not already specify a character set. The character sets supported by the application firewall are:
        * iso-8859-1 (English US)
        * big5 (Chinese Traditional)
        * gb2312 (Chinese Simplified)
        * sjis (Japanese Shift-JIS)
        * euc-jp (Japanese EUC-JP)
        * iso-8859-9 (Turkish)
        * utf-8 (Unicode)
        * euc-kr (Korean).
    .PARAMETER Postbodylimit
        Maximum allowed HTTP post body size, in bytes. Maximum supported value is 10GB. Citrix recommends enabling streaming option for large values of post body limit (&gt;20MB).
    .PARAMETER Postbodylimitaction
        One or more Post Body Limit actions. Available settings function as follows:
        * Block - Block connections that violate this security check. Must always be set.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -PostBodyLimitAction block" followed by the other actions to be enabled.
        Possible values = block, log, stats
    .PARAMETER Postbodylimitsignature
        Maximum allowed HTTP post body size for signature inspection for location HTTP_POST_BODY in the signatures, in bytes. Note that the changes in value could impact CPU and latency profile.
    .PARAMETER Fileuploadmaxnum
        Maximum allowed number of file uploads per form-submission request. The maximum setting (65535) allows an unlimited number of uploads.
          
          
        Maximum value = 65535
    .PARAMETER Canonicalizehtmlresponse
        Perform HTML entity encoding for any special characters in responses sent by your protected web sites.
          
        Possible values = ON, OFF
    .PARAMETER Enableformtagging
        Enable tagging of web form fields for use by the Form Field Consistency and CSRF Form Tagging checks.
          
        Possible values = ON, OFF
    .PARAMETER Sessionlessfieldconsistency
        Perform sessionless Field Consistency Checks.
          
        Possible values = OFF, ON, postOnly
    .PARAMETER Sessionlessurlclosure
        Enable session less URL Closure Checks.
        This check is applicable to Profile Type: HTML. .
          
        Possible values = ON, OFF
    .PARAMETER Semicolonfieldseparator
        Allow ';' as a form field separator in URL queries and POST form bodies. .
          
        Possible values = ON, OFF
    .PARAMETER Excludefileuploadfromchecks
        Exclude uploaded files from Form checks.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectionparsecomments
        Parse HTML comments and exempt them from the HTML SQL Injection check. You must specify the type of comments that the application firewall is to detect and exempt from this security check. Available settings function as follows:
        * Check all - Check all content.
        * ANSI - Exempt content that is part of an ANSI (Mozilla-style) comment.
        * Nested - Exempt content that is part of a nested (Microsoft-style) comment.
        * ANSI Nested - Exempt content that is part of any type of comment.
        Possible values = checkall, ansi, nested, ansinested
    .PARAMETER Invalidpercenthandling
        Configure the method that the application firewall uses to handle percent-encoded names and values. Available settings function as follows:
        * asp_mode - Microsoft ASP format.
        * secure_mode - Secure format.
          
        Possible values = asp_mode, secure_mode
    .PARAMETER Type
        Application firewall profile type, which controls which security checks and settings are applied to content that is filtered with the profile. Available settings function as follows:
        * HTML - HTML-based web sites.
        * XML - XML-based web sites and services.
        * JSON - JSON-based web sites and services.
        * HTML XML (Web 2.0) - Sites that contain both HTML and XML content, such as ATOM feeds, blogs, and RSS feeds.
        * HTML JSON - Sites that contain both HTML and JSON content.
        * XML JSON - Sites that contain both XML and JSON content.
        * HTML XML JSON - Sites that contain HTML, XML and JSON content.
          
        Possible values = HTML, XML, JSON
    .PARAMETER Checkrequestheaders
        Check request headers as well as web forms for injected SQL and cross-site scripts.
          
        Possible values = ON, OFF
    .PARAMETER Inspectquerycontenttypes
        Inspect request query as well as web forms for injected SQL and cross-site scripts for following content types.
        Possible values = HTML, XML, JSON, OTHER
    .PARAMETER Optimizepartialreqs
        Optimize handle of HTTP partial requests i.e. those with range headers.
        Available settings are as follows:
        * ON - Partial requests by the client result in partial requests to the backend server in most cases.
        * OFF - Partial requests by the client are changed to full requests to the backend server.
          
        Possible values = ON, OFF
    .PARAMETER Urldecoderequestcookies
        URL Decode request cookies before subjecting them to SQL and cross-site scripting checks.
          
        Possible values = ON, OFF
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER Percentdecoderecursively
        Configure whether the application firewall should use percentage recursive decoding.
          
        Possible values = ON, OFF
    .PARAMETER Multipleheaderaction
        One or more multiple header actions. Available settings function as follows:
        * Block - Block connections that have multiple headers.
        * Log - Log connections that have multiple headers.
        * KeepLast - Keep only last header when multiple headers are present.
          
        Request headers inspected:
        * Accept-Encoding
        * Content-Encoding
        * Content-Range
        * Content-Type
        * Host
        * Range
        * Referer
          
        CLI users: To enable one or more actions, type "set appfw profile -multipleHeaderAction" followed by the actions to be enabled.
        Possible values = block, keepLast, log, none
    .PARAMETER Rfcprofile
        Object name of the rfc profile.
    .PARAMETER Fileuploadtypesaction
        One or more file upload types actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -fileUploadTypeAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -fileUploadTypeAction none".
        Possible values = none, block, log, stats
    .PARAMETER Verboseloglevel
        Detailed Logging Verbose Log Level.
          
        Possible values = pattern, patternPayload, patternPayloadHeader
    .PARAMETER Insertcookiesamesiteattribute
        Configure whether application firewall should add samesite attribute for set-cookies.
          
        Possible values = ON, OFF
    .PARAMETER Cookiesamesiteattribute
        Cookie Samesite attribute added to support adding cookie SameSite attribute for all set-cookies including appfw session cookies. Default value will be "SameSite=Lax".
          
        Possible values = None, LAX, STRICT
    .PARAMETER Sqlinjectionruletype
        Specifies SQL Injection rule type: ALLOW/DENY. If ALLOW rule type is configured then allow list rules are used, if DENY rule type is configured then deny rules are used.
          
        Possible values = ALLOW, DENY
    .PARAMETER Fakeaccountdetection
        Fake account detection flag : ON/OFF. If set to ON fake account detection in enabled on ADC, if set to OFF fake account detection is disabled.
          
        Possible values = ON, OFF
    .PARAMETER Geolocationlogging
        Enable Geo-Location Logging in CEF format logs for the profile.
        Possible values = ON, OFF
    .PARAMETER Ceflogging
        Enable CEF format logs for the profile.
        Possible values = ON, OFF
    .PARAMETER Blockkeywordaction
        Block Keyword action. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -blockKeywordAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -blockKeywordAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER Jsonblockkeywordaction
        JSON Block Keyword action. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONBlockKeywordAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONBlockKeywordAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER As_prof_bypass_list_enable
        Enable bypass list for the profile.
          
        Possible values = ON, OFF
    .PARAMETER As_prof_deny_list_enable
        Enable deny list for the profile.
          
        Possible values = ON, OFF
    .PARAMETER Sessioncookiename
        Name of the session cookie that the application firewall uses to track user sessions.
        Must begin with a letter or number, and can consist of from 1 to 31 letters, numbers, and the hyphen (-) and underscore (_) symbols.
    .PARAMETER PassThru
        Return details about the created appfwprofile item.
    .EXAMPLE
        PS C:\>Invoke-NSUpdateAppfwprofile -name <string>
        An example how to update appfwprofile config Object(s).
    .NOTES
        File Name : Invoke-NSUpdateAppfwprofile
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Starturlaction,

        [ValidateSet('block', 'log', 'stats', 'none')]
        [string[]]$Infercontenttypexmlpayloadaction,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Contenttypeaction,

        [ValidateSet('none', 'application/x-www-form-urlencoded', 'multipart/form-data', 'text/x-gwt-rpc', 'application/grpc', 'application/grpc-web+json', 'application/grpc-web-text')]
        [string[]]$Inspectcontenttypes,

        [ValidateSet('ON', 'OFF')]
        [string]$Starturlclosure,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Denyurlaction,

        [ValidateSet('OFF', 'if_present', 'AlwaysExceptStartURLs', 'AlwaysExceptFirstRequest')]
        [string]$Refererheadercheck,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Cookieconsistencyaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Cookiehijackingaction,

        [ValidateSet('ON', 'OFF')]
        [string]$Cookietransforms,

        [ValidateSet('none', 'decryptOnly', 'encryptSessionOnly', 'encryptAll')]
        [string]$Cookieencryption,

        [ValidateSet('none', 'sessionOnly')]
        [string]$Cookieproxying,

        [ValidateSet('none', 'httpOnly', 'secure', 'all')]
        [string]$Addcookieflags,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Fieldconsistencyaction,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Csrftagaction,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Crosssitescriptingaction,

        [ValidateSet('ON', 'OFF')]
        [string]$Crosssitescriptingtransformunsafehtml,

        [ValidateSet('ON', 'OFF')]
        [string]$Crosssitescriptingcheckcompleteurls,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Sqlinjectionaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Cmdinjectionaction,

        [ValidateSet('CMDSplChar', 'CMDKeyword', 'CMDSplCharORKeyword', 'CMDSplCharANDKeyword', 'None')]
        [string]$Cmdinjectiontype,

        [ValidateSet('ON', 'OFF')]
        [string]$Sqlinjectiontransformspecialchars,

        [ValidateSet('ON', 'OFF')]
        [string]$Sqlinjectiononlycheckfieldswithsqlchars,

        [ValidateSet('SQLSplChar', 'SQLKeyword', 'SQLSplCharORKeyword', 'SQLSplCharANDKeyword', 'None')]
        [string]$Sqlinjectiontype,

        [ValidateSet('ON', 'OFF')]
        [string]$Sqlinjectionchecksqlwildchars,

        [ValidateSet('ON', 'OFF')]
        [string]$Sqlinjectiongrammar,

        [ValidateSet('ON', 'OFF')]
        [string]$Cmdinjectiongrammar,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Fieldformataction,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Defaultfieldformattype,

        [double]$Defaultfieldformatminlength,

        [double]$Defaultfieldformatmaxlength,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Bufferoverflowaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Grpcaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Restaction,

        [double]$Bufferoverflowmaxurllength,

        [double]$Bufferoverflowmaxheaderlength,

        [double]$Bufferoverflowmaxcookielength,

        [double]$Bufferoverflowmaxquerylength,

        [double]$Bufferoverflowmaxtotalheaderlength,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Creditcardaction,

        [ValidateSet('none', 'visa', 'mastercard', 'discover', 'amex', 'jcb', 'dinersclub')]
        [string[]]$Creditcard,

        [double]$Creditcardmaxallowed,

        [ValidateSet('ON', 'OFF')]
        [string]$Creditcardxout,

        [ValidateSet('ON', 'OFF')]
        [string]$Dosecurecreditcardlogging,

        [ValidateSet('ON', 'OFF')]
        [string]$Streaming,

        [ValidateSet('ON', 'OFF')]
        [string]$Trace,

        [ValidateLength(1, 255)]
        [string]$Requestcontenttype,

        [ValidateLength(1, 255)]
        [string]$Responsecontenttype,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Jsonerrorobject,

        [double]$Jsonerrorstatuscode,

        [string]$Jsonerrorstatusmessage,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Apispec,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Protofileobject,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Jsondosaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Jsonsqlinjectionaction,

        [ValidateSet('SQLSplChar', 'SQLKeyword', 'SQLSplCharORKeyword', 'SQLSplCharANDKeyword', 'None')]
        [string]$Jsonsqlinjectiontype,

        [ValidateSet('ON', 'OFF')]
        [string]$Jsonsqlinjectiongrammar,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Jsoncmdinjectionaction,

        [ValidateSet('CMDSplChar', 'CMDKeyword', 'CMDSplCharORKeyword', 'CMDSplCharANDKeyword', 'None')]
        [string]$Jsoncmdinjectiontype,

        [ValidateSet('ON', 'OFF')]
        [string]$Jsoncmdinjectiongrammar,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Jsonxssaction,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Xmldosaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Xmlformataction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Xmlsqlinjectionaction,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlsqlinjectiononlycheckfieldswithsqlchars,

        [ValidateSet('SQLSplChar', 'SQLKeyword', 'SQLSplCharORKeyword', 'SQLSplCharANDKeyword', 'None')]
        [string]$Xmlsqlinjectiontype,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlsqlinjectionchecksqlwildchars,

        [ValidateSet('checkall', 'ansi', 'nested', 'ansinested')]
        [string]$Xmlsqlinjectionparsecomments,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Xmlxssaction,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Xmlwsiaction,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Xmlattachmentaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Xmlvalidationaction,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Xmlerrorobject,

        [double]$Xmlerrorstatuscode,

        [string]$Xmlerrorstatusmessage,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Customsettings,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Signatures,

        [ValidateSet('none', 'block', 'log', 'remove', 'stats')]
        [string[]]$Xmlsoapfaultaction,

        [ValidateSet('ON', 'OFF')]
        [string]$Usehtmlerrorobject,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Errorurl,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Htmlerrorobject,

        [double]$Htmlerrorstatuscode,

        [string]$Htmlerrorstatusmessage,

        [ValidateSet('ON', 'OFF')]
        [string]$Logeverypolicyhit,

        [ValidateSet('ON', 'OFF')]
        [string]$Stripcomments,

        [ValidateSet('none', 'all', 'exclude_script_tag')]
        [string]$Striphtmlcomments,

        [ValidateSet('none', 'all')]
        [string]$Stripxmlcomments,

        [string]$Clientipexpression,

        [ValidateSet('none', 'SQLInjection', 'CrossSiteScripting', 'fieldFormat', 'startURL', 'cookieConsistency', 'fieldConsistency', 'CSRFtag', 'ContentType')]
        [string[]]$Dynamiclearning,

        [ValidateSet('ON', 'OFF')]
        [string]$Exemptclosureurlsfromsecuritychecks,

        [ValidateLength(1, 31)]
        [string]$Defaultcharset,

        [double]$Postbodylimit,

        [ValidateSet('block', 'log', 'stats')]
        [string[]]$Postbodylimitaction,

        [double]$Postbodylimitsignature,

        [double]$Fileuploadmaxnum,

        [ValidateSet('ON', 'OFF')]
        [string]$Canonicalizehtmlresponse,

        [ValidateSet('ON', 'OFF')]
        [string]$Enableformtagging,

        [ValidateSet('OFF', 'ON', 'postOnly')]
        [string]$Sessionlessfieldconsistency,

        [ValidateSet('ON', 'OFF')]
        [string]$Sessionlessurlclosure,

        [ValidateSet('ON', 'OFF')]
        [string]$Semicolonfieldseparator,

        [ValidateSet('ON', 'OFF')]
        [string]$Excludefileuploadfromchecks,

        [ValidateSet('checkall', 'ansi', 'nested', 'ansinested')]
        [string]$Sqlinjectionparsecomments,

        [ValidateSet('asp_mode', 'secure_mode')]
        [string]$Invalidpercenthandling,

        [ValidateSet('HTML', 'XML', 'JSON')]
        [string[]]$Type,

        [ValidateSet('ON', 'OFF')]
        [string]$Checkrequestheaders,

        [ValidateSet('HTML', 'XML', 'JSON', 'OTHER')]
        [string[]]$Inspectquerycontenttypes,

        [ValidateSet('ON', 'OFF')]
        [string]$Optimizepartialreqs,

        [ValidateSet('ON', 'OFF')]
        [string]$Urldecoderequestcookies,

        [string]$Comment,

        [ValidateSet('ON', 'OFF')]
        [string]$Percentdecoderecursively,

        [ValidateSet('block', 'keepLast', 'log', 'none')]
        [string[]]$Multipleheaderaction,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Rfcprofile,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Fileuploadtypesaction,

        [ValidateSet('pattern', 'patternPayload', 'patternPayloadHeader')]
        [string]$Verboseloglevel,

        [ValidateSet('ON', 'OFF')]
        [string]$Insertcookiesamesiteattribute,

        [ValidateSet('None', 'LAX', 'STRICT')]
        [string]$Cookiesamesiteattribute,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Sqlinjectionruletype,

        [ValidateSet('ON', 'OFF')]
        [string]$Fakeaccountdetection,

        [ValidateSet('ON', 'OFF')]
        [string]$Geolocationlogging,

        [ValidateSet('ON', 'OFF')]
        [string]$Ceflogging,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Blockkeywordaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Jsonblockkeywordaction,

        [ValidateSet('ON', 'OFF')]
        [string]$As_prof_bypass_list_enable,

        [ValidateSet('ON', 'OFF')]
        [string]$As_prof_deny_list_enable,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Sessioncookiename,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSUpdateAppfwprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('starturlaction') ) { $payload.Add('starturlaction', $starturlaction) }
            if ( $PSBoundParameters.ContainsKey('infercontenttypexmlpayloadaction') ) { $payload.Add('infercontenttypexmlpayloadaction', $infercontenttypexmlpayloadaction) }
            if ( $PSBoundParameters.ContainsKey('contenttypeaction') ) { $payload.Add('contenttypeaction', $contenttypeaction) }
            if ( $PSBoundParameters.ContainsKey('inspectcontenttypes') ) { $payload.Add('inspectcontenttypes', $inspectcontenttypes) }
            if ( $PSBoundParameters.ContainsKey('starturlclosure') ) { $payload.Add('starturlclosure', $starturlclosure) }
            if ( $PSBoundParameters.ContainsKey('denyurlaction') ) { $payload.Add('denyurlaction', $denyurlaction) }
            if ( $PSBoundParameters.ContainsKey('refererheadercheck') ) { $payload.Add('refererheadercheck', $refererheadercheck) }
            if ( $PSBoundParameters.ContainsKey('cookieconsistencyaction') ) { $payload.Add('cookieconsistencyaction', $cookieconsistencyaction) }
            if ( $PSBoundParameters.ContainsKey('cookiehijackingaction') ) { $payload.Add('cookiehijackingaction', $cookiehijackingaction) }
            if ( $PSBoundParameters.ContainsKey('cookietransforms') ) { $payload.Add('cookietransforms', $cookietransforms) }
            if ( $PSBoundParameters.ContainsKey('cookieencryption') ) { $payload.Add('cookieencryption', $cookieencryption) }
            if ( $PSBoundParameters.ContainsKey('cookieproxying') ) { $payload.Add('cookieproxying', $cookieproxying) }
            if ( $PSBoundParameters.ContainsKey('addcookieflags') ) { $payload.Add('addcookieflags', $addcookieflags) }
            if ( $PSBoundParameters.ContainsKey('fieldconsistencyaction') ) { $payload.Add('fieldconsistencyaction', $fieldconsistencyaction) }
            if ( $PSBoundParameters.ContainsKey('csrftagaction') ) { $payload.Add('csrftagaction', $csrftagaction) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingaction') ) { $payload.Add('crosssitescriptingaction', $crosssitescriptingaction) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingtransformunsafehtml') ) { $payload.Add('crosssitescriptingtransformunsafehtml', $crosssitescriptingtransformunsafehtml) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingcheckcompleteurls') ) { $payload.Add('crosssitescriptingcheckcompleteurls', $crosssitescriptingcheckcompleteurls) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionaction') ) { $payload.Add('sqlinjectionaction', $sqlinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('cmdinjectionaction') ) { $payload.Add('cmdinjectionaction', $cmdinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('cmdinjectiontype') ) { $payload.Add('cmdinjectiontype', $cmdinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiontransformspecialchars') ) { $payload.Add('sqlinjectiontransformspecialchars', $sqlinjectiontransformspecialchars) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiononlycheckfieldswithsqlchars') ) { $payload.Add('sqlinjectiononlycheckfieldswithsqlchars', $sqlinjectiononlycheckfieldswithsqlchars) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiontype') ) { $payload.Add('sqlinjectiontype', $sqlinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionchecksqlwildchars') ) { $payload.Add('sqlinjectionchecksqlwildchars', $sqlinjectionchecksqlwildchars) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiongrammar') ) { $payload.Add('sqlinjectiongrammar', $sqlinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('cmdinjectiongrammar') ) { $payload.Add('cmdinjectiongrammar', $cmdinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('fieldformataction') ) { $payload.Add('fieldformataction', $fieldformataction) }
            if ( $PSBoundParameters.ContainsKey('defaultfieldformattype') ) { $payload.Add('defaultfieldformattype', $defaultfieldformattype) }
            if ( $PSBoundParameters.ContainsKey('defaultfieldformatminlength') ) { $payload.Add('defaultfieldformatminlength', $defaultfieldformatminlength) }
            if ( $PSBoundParameters.ContainsKey('defaultfieldformatmaxlength') ) { $payload.Add('defaultfieldformatmaxlength', $defaultfieldformatmaxlength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowaction') ) { $payload.Add('bufferoverflowaction', $bufferoverflowaction) }
            if ( $PSBoundParameters.ContainsKey('grpcaction') ) { $payload.Add('grpcaction', $grpcaction) }
            if ( $PSBoundParameters.ContainsKey('restaction') ) { $payload.Add('restaction', $restaction) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxurllength') ) { $payload.Add('bufferoverflowmaxurllength', $bufferoverflowmaxurllength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxheaderlength') ) { $payload.Add('bufferoverflowmaxheaderlength', $bufferoverflowmaxheaderlength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxcookielength') ) { $payload.Add('bufferoverflowmaxcookielength', $bufferoverflowmaxcookielength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxquerylength') ) { $payload.Add('bufferoverflowmaxquerylength', $bufferoverflowmaxquerylength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxtotalheaderlength') ) { $payload.Add('bufferoverflowmaxtotalheaderlength', $bufferoverflowmaxtotalheaderlength) }
            if ( $PSBoundParameters.ContainsKey('creditcardaction') ) { $payload.Add('creditcardaction', $creditcardaction) }
            if ( $PSBoundParameters.ContainsKey('creditcard') ) { $payload.Add('creditcard', $creditcard) }
            if ( $PSBoundParameters.ContainsKey('creditcardmaxallowed') ) { $payload.Add('creditcardmaxallowed', $creditcardmaxallowed) }
            if ( $PSBoundParameters.ContainsKey('creditcardxout') ) { $payload.Add('creditcardxout', $creditcardxout) }
            if ( $PSBoundParameters.ContainsKey('dosecurecreditcardlogging') ) { $payload.Add('dosecurecreditcardlogging', $dosecurecreditcardlogging) }
            if ( $PSBoundParameters.ContainsKey('streaming') ) { $payload.Add('streaming', $streaming) }
            if ( $PSBoundParameters.ContainsKey('trace') ) { $payload.Add('trace', $trace) }
            if ( $PSBoundParameters.ContainsKey('requestcontenttype') ) { $payload.Add('requestcontenttype', $requestcontenttype) }
            if ( $PSBoundParameters.ContainsKey('responsecontenttype') ) { $payload.Add('responsecontenttype', $responsecontenttype) }
            if ( $PSBoundParameters.ContainsKey('jsonerrorobject') ) { $payload.Add('jsonerrorobject', $jsonerrorobject) }
            if ( $PSBoundParameters.ContainsKey('jsonerrorstatuscode') ) { $payload.Add('jsonerrorstatuscode', $jsonerrorstatuscode) }
            if ( $PSBoundParameters.ContainsKey('jsonerrorstatusmessage') ) { $payload.Add('jsonerrorstatusmessage', $jsonerrorstatusmessage) }
            if ( $PSBoundParameters.ContainsKey('apispec') ) { $payload.Add('apispec', $apispec) }
            if ( $PSBoundParameters.ContainsKey('protofileobject') ) { $payload.Add('protofileobject', $protofileobject) }
            if ( $PSBoundParameters.ContainsKey('jsondosaction') ) { $payload.Add('jsondosaction', $jsondosaction) }
            if ( $PSBoundParameters.ContainsKey('jsonsqlinjectionaction') ) { $payload.Add('jsonsqlinjectionaction', $jsonsqlinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('jsonsqlinjectiontype') ) { $payload.Add('jsonsqlinjectiontype', $jsonsqlinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('jsonsqlinjectiongrammar') ) { $payload.Add('jsonsqlinjectiongrammar', $jsonsqlinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('jsoncmdinjectionaction') ) { $payload.Add('jsoncmdinjectionaction', $jsoncmdinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('jsoncmdinjectiontype') ) { $payload.Add('jsoncmdinjectiontype', $jsoncmdinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('jsoncmdinjectiongrammar') ) { $payload.Add('jsoncmdinjectiongrammar', $jsoncmdinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('jsonxssaction') ) { $payload.Add('jsonxssaction', $jsonxssaction) }
            if ( $PSBoundParameters.ContainsKey('xmldosaction') ) { $payload.Add('xmldosaction', $xmldosaction) }
            if ( $PSBoundParameters.ContainsKey('xmlformataction') ) { $payload.Add('xmlformataction', $xmlformataction) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectionaction') ) { $payload.Add('xmlsqlinjectionaction', $xmlsqlinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectiononlycheckfieldswithsqlchars') ) { $payload.Add('xmlsqlinjectiononlycheckfieldswithsqlchars', $xmlsqlinjectiononlycheckfieldswithsqlchars) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectiontype') ) { $payload.Add('xmlsqlinjectiontype', $xmlsqlinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectionchecksqlwildchars') ) { $payload.Add('xmlsqlinjectionchecksqlwildchars', $xmlsqlinjectionchecksqlwildchars) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectionparsecomments') ) { $payload.Add('xmlsqlinjectionparsecomments', $xmlsqlinjectionparsecomments) }
            if ( $PSBoundParameters.ContainsKey('xmlxssaction') ) { $payload.Add('xmlxssaction', $xmlxssaction) }
            if ( $PSBoundParameters.ContainsKey('xmlwsiaction') ) { $payload.Add('xmlwsiaction', $xmlwsiaction) }
            if ( $PSBoundParameters.ContainsKey('xmlattachmentaction') ) { $payload.Add('xmlattachmentaction', $xmlattachmentaction) }
            if ( $PSBoundParameters.ContainsKey('xmlvalidationaction') ) { $payload.Add('xmlvalidationaction', $xmlvalidationaction) }
            if ( $PSBoundParameters.ContainsKey('xmlerrorobject') ) { $payload.Add('xmlerrorobject', $xmlerrorobject) }
            if ( $PSBoundParameters.ContainsKey('xmlerrorstatuscode') ) { $payload.Add('xmlerrorstatuscode', $xmlerrorstatuscode) }
            if ( $PSBoundParameters.ContainsKey('xmlerrorstatusmessage') ) { $payload.Add('xmlerrorstatusmessage', $xmlerrorstatusmessage) }
            if ( $PSBoundParameters.ContainsKey('customsettings') ) { $payload.Add('customsettings', $customsettings) }
            if ( $PSBoundParameters.ContainsKey('signatures') ) { $payload.Add('signatures', $signatures) }
            if ( $PSBoundParameters.ContainsKey('xmlsoapfaultaction') ) { $payload.Add('xmlsoapfaultaction', $xmlsoapfaultaction) }
            if ( $PSBoundParameters.ContainsKey('usehtmlerrorobject') ) { $payload.Add('usehtmlerrorobject', $usehtmlerrorobject) }
            if ( $PSBoundParameters.ContainsKey('errorurl') ) { $payload.Add('errorurl', $errorurl) }
            if ( $PSBoundParameters.ContainsKey('htmlerrorobject') ) { $payload.Add('htmlerrorobject', $htmlerrorobject) }
            if ( $PSBoundParameters.ContainsKey('htmlerrorstatuscode') ) { $payload.Add('htmlerrorstatuscode', $htmlerrorstatuscode) }
            if ( $PSBoundParameters.ContainsKey('htmlerrorstatusmessage') ) { $payload.Add('htmlerrorstatusmessage', $htmlerrorstatusmessage) }
            if ( $PSBoundParameters.ContainsKey('logeverypolicyhit') ) { $payload.Add('logeverypolicyhit', $logeverypolicyhit) }
            if ( $PSBoundParameters.ContainsKey('stripcomments') ) { $payload.Add('stripcomments', $stripcomments) }
            if ( $PSBoundParameters.ContainsKey('striphtmlcomments') ) { $payload.Add('striphtmlcomments', $striphtmlcomments) }
            if ( $PSBoundParameters.ContainsKey('stripxmlcomments') ) { $payload.Add('stripxmlcomments', $stripxmlcomments) }
            if ( $PSBoundParameters.ContainsKey('clientipexpression') ) { $payload.Add('clientipexpression', $clientipexpression) }
            if ( $PSBoundParameters.ContainsKey('dynamiclearning') ) { $payload.Add('dynamiclearning', $dynamiclearning) }
            if ( $PSBoundParameters.ContainsKey('exemptclosureurlsfromsecuritychecks') ) { $payload.Add('exemptclosureurlsfromsecuritychecks', $exemptclosureurlsfromsecuritychecks) }
            if ( $PSBoundParameters.ContainsKey('defaultcharset') ) { $payload.Add('defaultcharset', $defaultcharset) }
            if ( $PSBoundParameters.ContainsKey('postbodylimit') ) { $payload.Add('postbodylimit', $postbodylimit) }
            if ( $PSBoundParameters.ContainsKey('postbodylimitaction') ) { $payload.Add('postbodylimitaction', $postbodylimitaction) }
            if ( $PSBoundParameters.ContainsKey('postbodylimitsignature') ) { $payload.Add('postbodylimitsignature', $postbodylimitsignature) }
            if ( $PSBoundParameters.ContainsKey('fileuploadmaxnum') ) { $payload.Add('fileuploadmaxnum', $fileuploadmaxnum) }
            if ( $PSBoundParameters.ContainsKey('canonicalizehtmlresponse') ) { $payload.Add('canonicalizehtmlresponse', $canonicalizehtmlresponse) }
            if ( $PSBoundParameters.ContainsKey('enableformtagging') ) { $payload.Add('enableformtagging', $enableformtagging) }
            if ( $PSBoundParameters.ContainsKey('sessionlessfieldconsistency') ) { $payload.Add('sessionlessfieldconsistency', $sessionlessfieldconsistency) }
            if ( $PSBoundParameters.ContainsKey('sessionlessurlclosure') ) { $payload.Add('sessionlessurlclosure', $sessionlessurlclosure) }
            if ( $PSBoundParameters.ContainsKey('semicolonfieldseparator') ) { $payload.Add('semicolonfieldseparator', $semicolonfieldseparator) }
            if ( $PSBoundParameters.ContainsKey('excludefileuploadfromchecks') ) { $payload.Add('excludefileuploadfromchecks', $excludefileuploadfromchecks) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionparsecomments') ) { $payload.Add('sqlinjectionparsecomments', $sqlinjectionparsecomments) }
            if ( $PSBoundParameters.ContainsKey('invalidpercenthandling') ) { $payload.Add('invalidpercenthandling', $invalidpercenthandling) }
            if ( $PSBoundParameters.ContainsKey('type') ) { $payload.Add('type', $type) }
            if ( $PSBoundParameters.ContainsKey('checkrequestheaders') ) { $payload.Add('checkrequestheaders', $checkrequestheaders) }
            if ( $PSBoundParameters.ContainsKey('inspectquerycontenttypes') ) { $payload.Add('inspectquerycontenttypes', $inspectquerycontenttypes) }
            if ( $PSBoundParameters.ContainsKey('optimizepartialreqs') ) { $payload.Add('optimizepartialreqs', $optimizepartialreqs) }
            if ( $PSBoundParameters.ContainsKey('urldecoderequestcookies') ) { $payload.Add('urldecoderequestcookies', $urldecoderequestcookies) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('percentdecoderecursively') ) { $payload.Add('percentdecoderecursively', $percentdecoderecursively) }
            if ( $PSBoundParameters.ContainsKey('multipleheaderaction') ) { $payload.Add('multipleheaderaction', $multipleheaderaction) }
            if ( $PSBoundParameters.ContainsKey('rfcprofile') ) { $payload.Add('rfcprofile', $rfcprofile) }
            if ( $PSBoundParameters.ContainsKey('fileuploadtypesaction') ) { $payload.Add('fileuploadtypesaction', $fileuploadtypesaction) }
            if ( $PSBoundParameters.ContainsKey('verboseloglevel') ) { $payload.Add('verboseloglevel', $verboseloglevel) }
            if ( $PSBoundParameters.ContainsKey('insertcookiesamesiteattribute') ) { $payload.Add('insertcookiesamesiteattribute', $insertcookiesamesiteattribute) }
            if ( $PSBoundParameters.ContainsKey('cookiesamesiteattribute') ) { $payload.Add('cookiesamesiteattribute', $cookiesamesiteattribute) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionruletype') ) { $payload.Add('sqlinjectionruletype', $sqlinjectionruletype) }
            if ( $PSBoundParameters.ContainsKey('fakeaccountdetection') ) { $payload.Add('fakeaccountdetection', $fakeaccountdetection) }
            if ( $PSBoundParameters.ContainsKey('geolocationlogging') ) { $payload.Add('geolocationlogging', $geolocationlogging) }
            if ( $PSBoundParameters.ContainsKey('ceflogging') ) { $payload.Add('ceflogging', $ceflogging) }
            if ( $PSBoundParameters.ContainsKey('blockkeywordaction') ) { $payload.Add('blockkeywordaction', $blockkeywordaction) }
            if ( $PSBoundParameters.ContainsKey('jsonblockkeywordaction') ) { $payload.Add('jsonblockkeywordaction', $jsonblockkeywordaction) }
            if ( $PSBoundParameters.ContainsKey('as_prof_bypass_list_enable') ) { $payload.Add('as_prof_bypass_list_enable', $as_prof_bypass_list_enable) }
            if ( $PSBoundParameters.ContainsKey('as_prof_deny_list_enable') ) { $payload.Add('as_prof_deny_list_enable', $as_prof_deny_list_enable) }
            if ( $PSBoundParameters.ContainsKey('sessioncookiename') ) { $payload.Add('sessioncookiename', $sessioncookiename) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile", "Update Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUpdateAppfwprofile: Finished"
    }
}

function Invoke-NSAddAppfwprofile {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall profile resource.
    .PARAMETER Name
        Name for the profile. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.), pound (#), space ( ), at (@), equals (=), colon (:), and underscore (_) characters. Cannot be changed after the profile is added.
    .PARAMETER Defaults
        Default configuration to apply to the profile. Basic defaults are intended for standard content that requires little further configuration, such as static web site content. Advanced defaults are intended for specialized content that requires significant specialized configuration, such as heavily scripted or dynamic content.
          
        CLI users: When adding an application firewall profile, you can set either the defaults or the type, but not both. To set both options, create the profile by using the add appfw profile command, and then use the set appfw profile command to configure the other option.
        Possible values = basic, advanced, core, cve
    .PARAMETER Starturlaction
        One or more Start URL actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -startURLaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -startURLaction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Infercontenttypexmlpayloadaction
        One or more infer content type payload actions. Available settings function as follows:
        * Block - Block connections that have mismatch in content-type header and payload.
        * Log - Log connections that have mismatch in content-type header and payload. The mismatched content-type in HTTP request header will be logged for the request.
        * Stats - Generate statistics when there is mismatch in content-type header and payload.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -inferContentTypeXMLPayloadAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -inferContentTypeXMLPayloadAction none". Please note "none" action cannot be used with any other action type.
        Possible values = block, log, stats, none
    .PARAMETER Contenttypeaction
        One or more Content-type actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -contentTypeaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -contentTypeaction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Inspectcontenttypes
        One or more InspectContentType lists.
        * application/x-www-form-urlencoded
        * multipart/form-data
        * text/x-gwt-rpc
          
        CLI users: To enable, type "set appfw profile -InspectContentTypes" followed by the content types to be inspected.
        Possible values = none, application/x-www-form-urlencoded, multipart/form-data, text/x-gwt-rpc, application/grpc, application/grpc-web+json, application/grpc-web-text
    .PARAMETER Starturlclosure
        Toggle the state of Start URL Closure.
          
        Possible values = ON, OFF
    .PARAMETER Denyurlaction
        One or more Deny URL actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        NOTE: The Deny URL check takes precedence over the Start URL check. If you enable blocking for the Deny URL check, the application firewall blocks any URL that is explicitly blocked by a Deny URL, even if the same URL would otherwise be allowed by the Start URL check.
          
        CLI users: To enable one or more actions, type "set appfw profile -denyURLaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -denyURLaction none".
        Possible values = none, block, log, stats
    .PARAMETER Refererheadercheck
        Enable validation of Referer headers.
        Referer validation ensures that a web form that a user sends to your web site originally came from your web site, not an outside attacker.
        Although this parameter is part of the Start URL check, referer validation protects against cross-site request forgery (CSRF) attacks, not Start URL attacks.
          
        Possible values = OFF, if_present, AlwaysExceptStartURLs, AlwaysExceptFirstRequest
    .PARAMETER Cookieconsistencyaction
        One or more Cookie Consistency actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -cookieConsistencyAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -cookieConsistencyAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Cookiehijackingaction
        One or more actions to prevent cookie hijacking. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
        NOTE: Cookie Hijacking feature is not supported for TLSv1.3
          
        CLI users: To enable one or more actions, type "set appfw profile -cookieHijackingAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -cookieHijackingAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER Cookietransforms
        Perform the specified type of cookie transformation.
        Available settings function as follows:
        * Encryption - Encrypt cookies.
        * Proxying - Mask contents of server cookies by sending proxy cookie to users.
        * Cookie flags - Flag cookies as HTTP only to prevent scripts on user's browser from accessing and possibly modifying them.
        CAUTION: Make sure that this parameter is set to ON if you are configuring any cookie transformations. If it is set to OFF, no cookie transformations are performed regardless of any other settings.
          
        Possible values = ON, OFF
    .PARAMETER Cookieencryption
        Type of cookie encryption. Available settings function as follows:
        * None - Do not encrypt cookies.
        * Decrypt Only - Decrypt encrypted cookies, but do not encrypt cookies.
        * Encrypt Session Only - Encrypt session cookies, but not permanent cookies.
        * Encrypt All - Encrypt all cookies.
          
        Possible values = none, decryptOnly, encryptSessionOnly, encryptAll
    .PARAMETER Cookieproxying
        Cookie proxy setting. Available settings function as follows:
        * None - Do not proxy cookies.
        * Session Only - Proxy session cookies by using the Citrix ADC session ID, but do not proxy permanent cookies.
          
        Possible values = none, sessionOnly
    .PARAMETER Addcookieflags
        Add the specified flags to cookies. Available settings function as follows:
        * None - Do not add flags to cookies.
        * HTTP Only - Add the HTTP Only flag to cookies, which prevents scripts from accessing cookies.
        * Secure - Add Secure flag to cookies.
        * All - Add both HTTPOnly and Secure flags to cookies.
          
        Possible values = none, httpOnly, secure, all
    .PARAMETER Fieldconsistencyaction
        One or more Form Field Consistency actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -fieldConsistencyaction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -fieldConsistencyAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Csrftagaction
        One or more Cross-Site Request Forgery (CSRF) Tagging actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -CSRFTagAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -CSRFTagAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Crosssitescriptingaction
        One or more Cross-Site Scripting (XSS) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -crossSiteScriptingAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -crossSiteScriptingAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Crosssitescriptingtransformunsafehtml
        Transform cross-site scripts. This setting configures the application firewall to disable dangerous HTML instead of blocking the request.
        CAUTION: Make sure that this parameter is set to ON if you are configuring any cross-site scripting transformations. If it is set to OFF, no cross-site scripting transformations are performed regardless of any other settings.
          
        Possible values = ON, OFF
    .PARAMETER Crosssitescriptingcheckcompleteurls
        Check complete URLs for cross-site scripts, instead of just the query portions of URLs.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectionaction
        One or more HTML SQL Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -SQLInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -SQLInjectionAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Cmdinjectionaction
        Command injection action. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -cmdInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -cmdInjectionAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER Cmdinjectiontype
        Available CMD injection types.
        -CMDSplChar : Checks for CMD Special Chars
        -CMDKeyword : Checks for CMD Keywords
        -CMDSplCharANDKeyword : Checks for both and blocks if both are found
        -CMDSplCharORKeyword : Checks for both and blocks if anyone is found,
        -None : Disables checking using both CMD Special Char and Keyword.
          
        Possible values = CMDSplChar, CMDKeyword, CMDSplCharORKeyword, CMDSplCharANDKeyword, None
    .PARAMETER Sqlinjectiongrammar
        Check for SQL injection using SQL grammar.
          
        Possible values = ON, OFF
    .PARAMETER Cmdinjectiongrammar
        Check for CMD injection using CMD grammar.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectiontransformspecialchars
        Transform injected SQL code. This setting configures the application firewall to disable SQL special strings instead of blocking the request. Since most SQL servers require a special string to activate an SQL keyword, in most cases a request that contains injected SQL code is safe if special strings are disabled.
        CAUTION: Make sure that this parameter is set to ON if you are configuring any SQL injection transformations. If it is set to OFF, no SQL injection transformations are performed regardless of any other settings.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectiononlycheckfieldswithsqlchars
        Check only form fields that contain SQL special strings (characters) for injected SQL code.
        Most SQL servers require a special string to activate an SQL request, so SQL code without a special string is harmless to most SQL servers.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectiontype
        Available SQL injection types.
        -SQLSplChar : Checks for SQL Special Chars
        -SQLKeyword : Checks for SQL Keywords
        -SQLSplCharANDKeyword : Checks for both and blocks if both are found
        -SQLSplCharORKeyword : Checks for both and blocks if anyone is found
        -None : Disables checking using both SQL Special Char and Keyword.
          
        Possible values = SQLSplChar, SQLKeyword, SQLSplCharORKeyword, SQLSplCharANDKeyword, None
    .PARAMETER Sqlinjectionchecksqlwildchars
        Check for form fields that contain SQL wild chars .
          
        Possible values = ON, OFF
    .PARAMETER Fieldformataction
        One or more Field Format actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of suggested web form fields and field format assignments.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -fieldFormatAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -fieldFormatAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Defaultfieldformattype
        Designate a default field type to be applied to web form fields that do not have a field type explicitly assigned to them.
    .PARAMETER Defaultfieldformatminlength
        Minimum length, in characters, for data entered into a field that is assigned the default field type.
        To disable the minimum and maximum length settings and allow data of any length to be entered into the field, set this parameter to zero (0).
          
          
        Maximum value = 2147483647
    .PARAMETER Defaultfieldformatmaxlength
        Maximum length, in characters, for data entered into a field that is assigned the default field type.
          
          
        Maximum value = 2147483647
    .PARAMETER Bufferoverflowaction
        One or more Buffer Overflow actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -bufferOverflowAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -bufferOverflowAction none".
        Possible values = none, block, log, stats
    .PARAMETER Grpcaction
        gRPC validation.
        Possible values = none, block, log, stats
    .PARAMETER Restaction
        rest validation.
        Possible values = none, block, log, stats
    .PARAMETER Bufferoverflowmaxurllength
        Maximum length, in characters, for URLs on your protected web sites. Requests with longer URLs are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxheaderlength
        Maximum length, in characters, for HTTP headers in requests sent to your protected web sites. Requests with longer headers are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxcookielength
        Maximum length, in characters, for cookies sent to your protected web sites. Requests with longer cookies are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxquerylength
        Maximum length, in bytes, for query string sent to your protected web sites. Requests with longer query strings are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Bufferoverflowmaxtotalheaderlength
        Maximum length, in bytes, for the total HTTP header length in requests sent to your protected web sites. The minimum value of this and maxHeaderLen in httpProfile will be used. Requests with longer length are blocked.
          
          
        Maximum value = 65535
    .PARAMETER Creditcardaction
        One or more Credit Card actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -creditCardAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -creditCardAction none".
          
        Possible values = none, block, learn, log, stats
    .PARAMETER Creditcard
        Credit card types that the application firewall should protect.
          
        Possible values = none, visa, mastercard, discover, amex, jcb, dinersclub
    .PARAMETER Creditcardmaxallowed
        This parameter value is used by the block action. It represents the maximum number of credit card numbers that can appear on a web page served by your protected web sites. Pages that contain more credit card numbers are blocked.
          
        Maximum value = 255
    .PARAMETER Creditcardxout
        Mask any credit card number detected in a response by replacing each digit, except the digits in the final group, with the letter "X.".
          
        Possible values = ON, OFF
    .PARAMETER Dosecurecreditcardlogging
        Setting this option logs credit card numbers in the response when the match is found.
          
        Possible values = ON, OFF
    .PARAMETER Streaming
        Setting this option converts content-length form submission requests (requests with content-type "application/x-www-form-urlencoded" or "multipart/form-data") to chunked requests when atleast one of the following protections : Signatures, SQL injection protection, XSS protection, form field consistency protection, starturl closure, CSRF tagging, JSON SQL, JSON XSS, JSON DOS is enabled. Please make sure that the backend server accepts chunked requests before enabling this option. Citrix recommends enabling this option for large request sizes(&gt;20MB).
          
        Possible values = ON, OFF
    .PARAMETER Trace
        Toggle the state of trace.
          
        Possible values = ON, OFF
    .PARAMETER Requestcontenttype
        Default Content-Type header for requests.
        A Content-Type header can contain 0-255 letters, numbers, and the hyphen (-) and underscore (_) characters.
    .PARAMETER Responsecontenttype
        Default Content-Type header for responses.
        A Content-Type header can contain 0-255 letters, numbers, and the hyphen (-) and underscore (_) characters.
    .PARAMETER Jsonerrorobject
        Name to the imported JSON Error Object to be set on application firewall profile.
    .PARAMETER Apispec
        Name of the API Specification.
    .PARAMETER Protofileobject
        Name of the imported proto file.
    .PARAMETER Jsonerrorstatuscode
        Response status code associated with JSON error page. Non-empty JSON error object must be imported to the application firewall profile for the status code.
          
          
        Maximum value = 999
    .PARAMETER Jsonerrorstatusmessage
        Response status message associated with JSON error page.
    .PARAMETER Jsondosaction
        One or more JSON Denial-of-Service (JsonDoS) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONDoSAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONDoSAction none".
        Possible values = none, block, log, stats
    .PARAMETER Jsonsqlinjectionaction
        One or more JSON SQL Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONSQLInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONSQLInjectionAction none".
        Possible values = none, block, log, stats
    .PARAMETER Jsonsqlinjectiontype
        Available SQL injection types.
        -SQLSplChar : Checks for SQL Special Chars
        -SQLKeyword : Checks for SQL Keywords
        -SQLSplCharANDKeyword : Checks for both and blocks if both are found
        -SQLSplCharORKeyword : Checks for both and blocks if anyone is found,
        -None : Disables checking using both SQL Special Char and Keyword.
          
        Possible values = SQLSplChar, SQLKeyword, SQLSplCharORKeyword, SQLSplCharANDKeyword, None
    .PARAMETER Jsonsqlinjectiongrammar
        Check for SQL injection using SQL grammar in JSON.
          
        Possible values = ON, OFF
    .PARAMETER Jsoncmdinjectionaction
        One or more JSON CMD Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONCMDInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONCMDInjectionAction none".
        Possible values = none, block, log, stats
    .PARAMETER Jsoncmdinjectiontype
        Available CMD injection types.
        -CMDSplChar : Checks for CMD Special Chars
        -CMDKeyword : Checks for CMD Keywords
        -CMDSplCharANDKeyword : Checks for both and blocks if both are found
        -CMDSplCharORKeyword : Checks for both and blocks if anyone is found,
        -None : Disables checking using both SQL Special Char and Keyword.
          
        Possible values = CMDSplChar, CMDKeyword, CMDSplCharORKeyword, CMDSplCharANDKeyword, None
    .PARAMETER Jsoncmdinjectiongrammar
        Check for CMD injection using CMD grammar in JSON.
          
        Possible values = ON, OFF
    .PARAMETER Jsonxssaction
        One or more JSON Cross-Site Scripting actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONXssAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONXssAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmldosaction
        One or more XML Denial-of-Service (XDoS) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLDoSAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLDoSAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlformataction
        One or more XML Format actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLFormatAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLFormatAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmlsqlinjectionaction
        One or more XML SQL Injection actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLSQLInjectionAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLSQLInjectionAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmlsqlinjectiononlycheckfieldswithsqlchars
        Check only form fields that contain SQL special characters, which most SQL servers require before accepting an SQL command, for injected SQL.
          
        Possible values = ON, OFF
    .PARAMETER Xmlsqlinjectiontype
        Available SQL injection types.
        -SQLSplChar : Checks for SQL Special Chars
        -SQLKeyword : Checks for SQL Keywords
        -SQLSplCharANDKeyword : Checks for both and blocks if both are found
        -SQLSplCharORKeyword : Checks for both and blocks if anyone is found.
          
        Possible values = SQLSplChar, SQLKeyword, SQLSplCharORKeyword, SQLSplCharANDKeyword, None
    .PARAMETER Xmlsqlinjectionchecksqlwildchars
        Check for form fields that contain SQL wild chars .
          
        Possible values = ON, OFF
    .PARAMETER Xmlsqlinjectionparsecomments
        Parse comments in XML Data and exempt those sections of the request that are from the XML SQL Injection check. You must configure the type of comments that the application firewall is to detect and exempt from this security check. Available settings function as follows:
        * Check all - Check all content.
        * ANSI - Exempt content that is part of an ANSI (Mozilla-style) comment.
        * Nested - Exempt content that is part of a nested (Microsoft-style) comment.
        * ANSI Nested - Exempt content that is part of any type of comment.
          
        Possible values = checkall, ansi, nested, ansinested
    .PARAMETER Xmlxssaction
        One or more XML Cross-Site Scripting actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLXSSAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLXSSAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlwsiaction
        One or more Web Services Interoperability (WSI) actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLWSIAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLWSIAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlattachmentaction
        One or more XML Attachment actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Learn - Use the learning engine to generate a list of exceptions to this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLAttachmentAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLAttachmentAction none".
        Possible values = none, block, learn, log, stats
    .PARAMETER Xmlvalidationaction
        One or more XML Validation actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLValidationAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLValidationAction none".
        Possible values = none, block, log, stats
    .PARAMETER Xmlerrorobject
        Name to assign to the XML Error Object, which the application firewall displays when a user request is blocked.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Cannot be changed after the XML error object is added.
    .PARAMETER Xmlerrorstatuscode
        Response status code associated with XML error page. Non-empty XML error object must be imported to the application firewall profile for the status code.
          
          
        Maximum value = 999
    .PARAMETER Xmlerrorstatusmessage
        Response status message associated with XML error page.
    .PARAMETER Customsettings
        Object name for custom settings.
        This check is applicable to Profile Type: HTML, XML. .
    .PARAMETER Signatures
        Object name for signatures.
        This check is applicable to Profile Type: HTML, XML. .
    .PARAMETER Xmlsoapfaultaction
        One or more XML SOAP Fault Filtering actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
        * Remove - Remove all violations for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -XMLSOAPFaultAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -XMLSOAPFaultAction none".
        Possible values = none, block, log, remove, stats
    .PARAMETER Usehtmlerrorobject
        Send an imported HTML Error object to a user when a request is blocked, instead of redirecting the user to the designated Error URL.
          
        Possible values = ON, OFF
    .PARAMETER Errorurl
        URL that application firewall uses as the Error URL.
    .PARAMETER Htmlerrorobject
        Name to assign to the HTML Error Object.
        Must begin with a letter, number, or the underscore character \(_\), and must contain only letters, numbers, and the hyphen \(-\), period \(.\) pound \(\#\), space \( \), at (@), equals \(=\), colon \(:\), and underscore characters. Cannot be changed after the HTML error object is added.
    .PARAMETER Htmlerrorstatuscode
        Response status code associated with HTML error page. Non-empty HTML error object must be imported to the application firewall profile for the status code.
          
          
        Maximum value = 999
    .PARAMETER Htmlerrorstatusmessage
        Response status message associated with HTML error page.
    .PARAMETER Logeverypolicyhit
        Log every profile match, regardless of security checks results.
          
        Possible values = ON, OFF
    .PARAMETER Stripcomments
        Strip HTML comments.
        This check is applicable to Profile Type: HTML. .
          
        Possible values = ON, OFF
    .PARAMETER Striphtmlcomments
        Strip HTML comments before forwarding a web page sent by a protected web site in response to a user request.
          
        Possible values = none, all, exclude_script_tag
    .PARAMETER Stripxmlcomments
        Strip XML comments before forwarding a web page sent by a protected web site in response to a user request.
          
        Possible values = none, all
    .PARAMETER Exemptclosureurlsfromsecuritychecks
        Exempt URLs that pass the Start URL closure check from SQL injection, cross-site script, field format and field consistency security checks at locations other than headers.
          
        Possible values = ON, OFF
    .PARAMETER Defaultcharset
        Default character set for protected web pages. Web pages sent by your protected web sites in response to user requests are assigned this character set if the page does not already specify a character set. The character sets supported by the application firewall are:
        * iso-8859-1 (English US)
        * big5 (Chinese Traditional)
        * gb2312 (Chinese Simplified)
        * sjis (Japanese Shift-JIS)
        * euc-jp (Japanese EUC-JP)
        * iso-8859-9 (Turkish)
        * utf-8 (Unicode)
        * euc-kr (Korean).
    .PARAMETER Clientipexpression
        Expression to get the client IP.
    .PARAMETER Dynamiclearning
        One or more security checks. Available options are as follows:
        * SQLInjection - Enable dynamic learning for SQLInjection security check.
        * CrossSiteScripting - Enable dynamic learning for CrossSiteScripting security check.
        * fieldFormat - Enable dynamic learning for fieldFormat security check.
        * None - Disable security checks for all security checks.
          
        CLI users: To enable dynamic learning on one or more security checks, type "set appfw profile -dynamicLearning" followed by the security checks to be enabled. To turn off dynamic learning on all security checks, type "set appfw profile -dynamicLearning none".
        Possible values = none, SQLInjection, CrossSiteScripting, fieldFormat, startURL, cookieConsistency, fieldConsistency, CSRFtag, ContentType
    .PARAMETER Postbodylimit
        Maximum allowed HTTP post body size, in bytes. Maximum supported value is 10GB. Citrix recommends enabling streaming option for large values of post body limit (&gt;20MB).
    .PARAMETER Postbodylimitaction
        One or more Post Body Limit actions. Available settings function as follows:
        * Block - Block connections that violate this security check. Must always be set.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -PostBodyLimitAction block" followed by the other actions to be enabled.
        Possible values = block, log, stats
    .PARAMETER Postbodylimitsignature
        Maximum allowed HTTP post body size for signature inspection for location HTTP_POST_BODY in the signatures, in bytes. Note that the changes in value could impact CPU and latency profile.
    .PARAMETER Fileuploadmaxnum
        Maximum allowed number of file uploads per form-submission request. The maximum setting (65535) allows an unlimited number of uploads.
          
          
        Maximum value = 65535
    .PARAMETER Canonicalizehtmlresponse
        Perform HTML entity encoding for any special characters in responses sent by your protected web sites.
          
        Possible values = ON, OFF
    .PARAMETER Enableformtagging
        Enable tagging of web form fields for use by the Form Field Consistency and CSRF Form Tagging checks.
          
        Possible values = ON, OFF
    .PARAMETER Sessionlessfieldconsistency
        Perform sessionless Field Consistency Checks.
          
        Possible values = OFF, ON, postOnly
    .PARAMETER Sessionlessurlclosure
        Enable session less URL Closure Checks.
        This check is applicable to Profile Type: HTML. .
          
        Possible values = ON, OFF
    .PARAMETER Semicolonfieldseparator
        Allow ';' as a form field separator in URL queries and POST form bodies. .
          
        Possible values = ON, OFF
    .PARAMETER Excludefileuploadfromchecks
        Exclude uploaded files from Form checks.
          
        Possible values = ON, OFF
    .PARAMETER Sqlinjectionparsecomments
        Parse HTML comments and exempt them from the HTML SQL Injection check. You must specify the type of comments that the application firewall is to detect and exempt from this security check. Available settings function as follows:
        * Check all - Check all content.
        * ANSI - Exempt content that is part of an ANSI (Mozilla-style) comment.
        * Nested - Exempt content that is part of a nested (Microsoft-style) comment.
        * ANSI Nested - Exempt content that is part of any type of comment.
        Possible values = checkall, ansi, nested, ansinested
    .PARAMETER Invalidpercenthandling
        Configure the method that the application firewall uses to handle percent-encoded names and values. Available settings function as follows:
        * asp_mode - Microsoft ASP format.
        * secure_mode - Secure format.
          
        Possible values = asp_mode, secure_mode
    .PARAMETER Type
        Application firewall profile type, which controls which security checks and settings are applied to content that is filtered with the profile. Available settings function as follows:
        * HTML - HTML-based web sites.
        * XML - XML-based web sites and services.
        * JSON - JSON-based web sites and services.
        * HTML XML (Web 2.0) - Sites that contain both HTML and XML content, such as ATOM feeds, blogs, and RSS feeds.
        * HTML JSON - Sites that contain both HTML and JSON content.
        * XML JSON - Sites that contain both XML and JSON content.
        * HTML XML JSON - Sites that contain HTML, XML and JSON content.
          
        Possible values = HTML, XML, JSON
    .PARAMETER Checkrequestheaders
        Check request headers as well as web forms for injected SQL and cross-site scripts.
          
        Possible values = ON, OFF
    .PARAMETER Inspectquerycontenttypes
        Inspect request query as well as web forms for injected SQL and cross-site scripts for following content types.
        Possible values = HTML, XML, JSON, OTHER
    .PARAMETER Optimizepartialreqs
        Optimize handle of HTTP partial requests i.e. those with range headers.
        Available settings are as follows:
        * ON - Partial requests by the client result in partial requests to the backend server in most cases.
        * OFF - Partial requests by the client are changed to full requests to the backend server.
          
        Possible values = ON, OFF
    .PARAMETER Urldecoderequestcookies
        URL Decode request cookies before subjecting them to SQL and cross-site scripting checks.
          
        Possible values = ON, OFF
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER Percentdecoderecursively
        Configure whether the application firewall should use percentage recursive decoding.
          
        Possible values = ON, OFF
    .PARAMETER Multipleheaderaction
        One or more multiple header actions. Available settings function as follows:
        * Block - Block connections that have multiple headers.
        * Log - Log connections that have multiple headers.
        * KeepLast - Keep only last header when multiple headers are present.
          
        Request headers inspected:
        * Accept-Encoding
        * Content-Encoding
        * Content-Range
        * Content-Type
        * Host
        * Range
        * Referer
          
        CLI users: To enable one or more actions, type "set appfw profile -multipleHeaderAction" followed by the actions to be enabled.
        Possible values = block, keepLast, log, none
    .PARAMETER Rfcprofile
        Object name of the rfc profile.
    .PARAMETER Fileuploadtypesaction
        One or more file upload types actions. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -fileUploadTypeAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -fileUploadTypeAction none".
        Possible values = none, block, log, stats
    .PARAMETER Verboseloglevel
        Detailed Logging Verbose Log Level.
          
        Possible values = pattern, patternPayload, patternPayloadHeader
    .PARAMETER Insertcookiesamesiteattribute
        Configure whether application firewall should add samesite attribute for set-cookies.
          
        Possible values = ON, OFF
    .PARAMETER Cookiesamesiteattribute
        Cookie Samesite attribute added to support adding cookie SameSite attribute for all set-cookies including appfw session cookies. Default value will be "SameSite=Lax".
          
        Possible values = None, LAX, STRICT
    .PARAMETER Sqlinjectionruletype
        Specifies SQL Injection rule type: ALLOW/DENY. If ALLOW rule type is configured then allow list rules are used, if DENY rule type is configured then deny rules are used.
          
        Possible values = ALLOW, DENY
    .PARAMETER Fakeaccountdetection
        Fake account detection flag : ON/OFF. If set to ON fake account detection in enabled on ADC, if set to OFF fake account detection is disabled.
          
        Possible values = ON, OFF
    .PARAMETER Geolocationlogging
        Enable Geo-Location Logging in CEF format logs for the profile.
        Possible values = ON, OFF
    .PARAMETER Ceflogging
        Enable CEF format logs for the profile.
        Possible values = ON, OFF
    .PARAMETER Blockkeywordaction
        Block Keyword action. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -blockKeywordAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -blockKeywordAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER Jsonblockkeywordaction
        JSON Block Keyword action. Available settings function as follows:
        * Block - Block connections that violate this security check.
        * Log - Log violations of this security check.
        * Stats - Generate statistics for this security check.
        * None - Disable all actions for this security check.
          
        CLI users: To enable one or more actions, type "set appfw profile -JSONBlockKeywordAction" followed by the actions to be enabled. To turn off all actions, type "set appfw profile -JSONBlockKeywordAction none".
          
        Possible values = none, block, log, stats
    .PARAMETER As_prof_bypass_list_enable
        Enable bypass list for the profile.
          
        Possible values = ON, OFF
    .PARAMETER As_prof_deny_list_enable
        Enable deny list for the profile.
          
        Possible values = ON, OFF
    .PARAMETER Sessioncookiename
        Name of the session cookie that the application firewall uses to track user sessions.
        Must begin with a letter or number, and can consist of from 1 to 31 letters, numbers, and the hyphen (-) and underscore (_) symbols.
    .PARAMETER PassThru
        Return details about the created appfwprofile item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofile -name <string>
        An example how to add appfwprofile config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofile
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [ValidateSet('basic', 'advanced', 'core', 'cve')]
        [string]$Defaults,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Starturlaction,

        [ValidateSet('block', 'log', 'stats', 'none')]
        [string[]]$Infercontenttypexmlpayloadaction,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Contenttypeaction,

        [ValidateSet('none', 'application/x-www-form-urlencoded', 'multipart/form-data', 'text/x-gwt-rpc', 'application/grpc', 'application/grpc-web+json', 'application/grpc-web-text')]
        [string[]]$Inspectcontenttypes,

        [ValidateSet('ON', 'OFF')]
        [string]$Starturlclosure = 'OFF',

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Denyurlaction,

        [ValidateSet('OFF', 'if_present', 'AlwaysExceptStartURLs', 'AlwaysExceptFirstRequest')]
        [string]$Refererheadercheck = 'OFF',

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Cookieconsistencyaction = 'none',

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Cookiehijackingaction = 'none',

        [ValidateSet('ON', 'OFF')]
        [string]$Cookietransforms = 'OFF',

        [ValidateSet('none', 'decryptOnly', 'encryptSessionOnly', 'encryptAll')]
        [string]$Cookieencryption = 'none',

        [ValidateSet('none', 'sessionOnly')]
        [string]$Cookieproxying = 'none',

        [ValidateSet('none', 'httpOnly', 'secure', 'all')]
        [string]$Addcookieflags = 'none',

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Fieldconsistencyaction = 'none',

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Csrftagaction = 'none',

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Crosssitescriptingaction,

        [ValidateSet('ON', 'OFF')]
        [string]$Crosssitescriptingtransformunsafehtml = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Crosssitescriptingcheckcompleteurls = 'OFF',

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Sqlinjectionaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Cmdinjectionaction = 'none',

        [ValidateSet('CMDSplChar', 'CMDKeyword', 'CMDSplCharORKeyword', 'CMDSplCharANDKeyword', 'None')]
        [string]$Cmdinjectiontype = 'CMDSplCharANDKeyword',

        [ValidateSet('ON', 'OFF')]
        [string]$Sqlinjectiongrammar = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Cmdinjectiongrammar = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Sqlinjectiontransformspecialchars = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Sqlinjectiononlycheckfieldswithsqlchars = 'ON',

        [ValidateSet('SQLSplChar', 'SQLKeyword', 'SQLSplCharORKeyword', 'SQLSplCharANDKeyword', 'None')]
        [string]$Sqlinjectiontype = 'SQLSplCharANDKeyword',

        [ValidateSet('ON', 'OFF')]
        [string]$Sqlinjectionchecksqlwildchars = 'OFF',

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Fieldformataction,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Defaultfieldformattype,

        [double]$Defaultfieldformatminlength = '0',

        [double]$Defaultfieldformatmaxlength = '65535',

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Bufferoverflowaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Grpcaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Restaction,

        [double]$Bufferoverflowmaxurllength = '1024',

        [double]$Bufferoverflowmaxheaderlength = '4096',

        [double]$Bufferoverflowmaxcookielength = '4096',

        [double]$Bufferoverflowmaxquerylength = '65535',

        [double]$Bufferoverflowmaxtotalheaderlength = '65535',

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Creditcardaction = 'none',

        [ValidateSet('none', 'visa', 'mastercard', 'discover', 'amex', 'jcb', 'dinersclub')]
        [string[]]$Creditcard = 'none',

        [double]$Creditcardmaxallowed,

        [ValidateSet('ON', 'OFF')]
        [string]$Creditcardxout = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Dosecurecreditcardlogging = 'ON',

        [ValidateSet('ON', 'OFF')]
        [string]$Streaming = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Trace = 'OFF',

        [ValidateLength(1, 255)]
        [string]$Requestcontenttype,

        [ValidateLength(1, 255)]
        [string]$Responsecontenttype,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Jsonerrorobject,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Apispec,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Protofileobject,

        [double]$Jsonerrorstatuscode = '200',

        [string]$Jsonerrorstatusmessage,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Jsondosaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Jsonsqlinjectionaction,

        [ValidateSet('SQLSplChar', 'SQLKeyword', 'SQLSplCharORKeyword', 'SQLSplCharANDKeyword', 'None')]
        [string]$Jsonsqlinjectiontype = 'SQLSplCharANDKeyword',

        [ValidateSet('ON', 'OFF')]
        [string]$Jsonsqlinjectiongrammar = 'OFF',

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Jsoncmdinjectionaction,

        [ValidateSet('CMDSplChar', 'CMDKeyword', 'CMDSplCharORKeyword', 'CMDSplCharANDKeyword', 'None')]
        [string]$Jsoncmdinjectiontype = 'CMDSplCharANDKeyword',

        [ValidateSet('ON', 'OFF')]
        [string]$Jsoncmdinjectiongrammar = 'OFF',

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Jsonxssaction,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Xmldosaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Xmlformataction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Xmlsqlinjectionaction,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlsqlinjectiononlycheckfieldswithsqlchars = 'ON',

        [ValidateSet('SQLSplChar', 'SQLKeyword', 'SQLSplCharORKeyword', 'SQLSplCharANDKeyword', 'None')]
        [string]$Xmlsqlinjectiontype = 'SQLSplCharANDKeyword',

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlsqlinjectionchecksqlwildchars = 'OFF',

        [ValidateSet('checkall', 'ansi', 'nested', 'ansinested')]
        [string]$Xmlsqlinjectionparsecomments = 'checkall',

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Xmlxssaction,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Xmlwsiaction,

        [ValidateSet('none', 'block', 'learn', 'log', 'stats')]
        [string[]]$Xmlattachmentaction,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Xmlvalidationaction,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Xmlerrorobject,

        [double]$Xmlerrorstatuscode = '200',

        [string]$Xmlerrorstatusmessage,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Customsettings,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Signatures,

        [ValidateSet('none', 'block', 'log', 'remove', 'stats')]
        [string[]]$Xmlsoapfaultaction,

        [ValidateSet('ON', 'OFF')]
        [string]$Usehtmlerrorobject = 'OFF',

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Errorurl,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Htmlerrorobject,

        [double]$Htmlerrorstatuscode = '200',

        [string]$Htmlerrorstatusmessage,

        [ValidateSet('ON', 'OFF')]
        [string]$Logeverypolicyhit = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Stripcomments = 'OFF',

        [ValidateSet('none', 'all', 'exclude_script_tag')]
        [string]$Striphtmlcomments = 'none',

        [ValidateSet('none', 'all')]
        [string]$Stripxmlcomments = 'none',

        [ValidateSet('ON', 'OFF')]
        [string]$Exemptclosureurlsfromsecuritychecks = 'ON',

        [ValidateLength(1, 31)]
        [string]$Defaultcharset,

        [string]$Clientipexpression,

        [ValidateSet('none', 'SQLInjection', 'CrossSiteScripting', 'fieldFormat', 'startURL', 'cookieConsistency', 'fieldConsistency', 'CSRFtag', 'ContentType')]
        [string[]]$Dynamiclearning,

        [double]$Postbodylimit = '20000000',

        [ValidateSet('block', 'log', 'stats')]
        [string[]]$Postbodylimitaction,

        [double]$Postbodylimitsignature = '2048',

        [double]$Fileuploadmaxnum = '65535',

        [ValidateSet('ON', 'OFF')]
        [string]$Canonicalizehtmlresponse = 'ON',

        [ValidateSet('ON', 'OFF')]
        [string]$Enableformtagging = 'ON',

        [ValidateSet('OFF', 'ON', 'postOnly')]
        [string]$Sessionlessfieldconsistency = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Sessionlessurlclosure = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Semicolonfieldseparator = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Excludefileuploadfromchecks = 'OFF',

        [ValidateSet('checkall', 'ansi', 'nested', 'ansinested')]
        [string]$Sqlinjectionparsecomments,

        [ValidateSet('asp_mode', 'secure_mode')]
        [string]$Invalidpercenthandling = 'secure_mode',

        [ValidateSet('HTML', 'XML', 'JSON')]
        [string[]]$Type = 'HTML',

        [ValidateSet('ON', 'OFF')]
        [string]$Checkrequestheaders = 'OFF',

        [ValidateSet('HTML', 'XML', 'JSON', 'OTHER')]
        [string[]]$Inspectquerycontenttypes,

        [ValidateSet('ON', 'OFF')]
        [string]$Optimizepartialreqs = 'ON',

        [ValidateSet('ON', 'OFF')]
        [string]$Urldecoderequestcookies = 'OFF',

        [string]$Comment,

        [ValidateSet('ON', 'OFF')]
        [string]$Percentdecoderecursively = 'ON',

        [ValidateSet('block', 'keepLast', 'log', 'none')]
        [string[]]$Multipleheaderaction,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Rfcprofile,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Fileuploadtypesaction,

        [ValidateSet('pattern', 'patternPayload', 'patternPayloadHeader')]
        [string]$Verboseloglevel = 'pattern',

        [ValidateSet('ON', 'OFF')]
        [string]$Insertcookiesamesiteattribute = 'OFF',

        [ValidateSet('None', 'LAX', 'STRICT')]
        [string]$Cookiesamesiteattribute = 'LAX',

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Sqlinjectionruletype = 'ALLOW',

        [ValidateSet('ON', 'OFF')]
        [string]$Fakeaccountdetection = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$Geolocationlogging,

        [ValidateSet('ON', 'OFF')]
        [string]$Ceflogging,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Blockkeywordaction = 'none',

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Jsonblockkeywordaction = 'none',

        [ValidateSet('ON', 'OFF')]
        [string]$As_prof_bypass_list_enable = 'OFF',

        [ValidateSet('ON', 'OFF')]
        [string]$As_prof_deny_list_enable = 'OFF',

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Sessioncookiename,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('defaults') ) { $payload.Add('defaults', $defaults) }
            if ( $PSBoundParameters.ContainsKey('starturlaction') ) { $payload.Add('starturlaction', $starturlaction) }
            if ( $PSBoundParameters.ContainsKey('infercontenttypexmlpayloadaction') ) { $payload.Add('infercontenttypexmlpayloadaction', $infercontenttypexmlpayloadaction) }
            if ( $PSBoundParameters.ContainsKey('contenttypeaction') ) { $payload.Add('contenttypeaction', $contenttypeaction) }
            if ( $PSBoundParameters.ContainsKey('inspectcontenttypes') ) { $payload.Add('inspectcontenttypes', $inspectcontenttypes) }
            if ( $PSBoundParameters.ContainsKey('starturlclosure') ) { $payload.Add('starturlclosure', $starturlclosure) }
            if ( $PSBoundParameters.ContainsKey('denyurlaction') ) { $payload.Add('denyurlaction', $denyurlaction) }
            if ( $PSBoundParameters.ContainsKey('refererheadercheck') ) { $payload.Add('refererheadercheck', $refererheadercheck) }
            if ( $PSBoundParameters.ContainsKey('cookieconsistencyaction') ) { $payload.Add('cookieconsistencyaction', $cookieconsistencyaction) }
            if ( $PSBoundParameters.ContainsKey('cookiehijackingaction') ) { $payload.Add('cookiehijackingaction', $cookiehijackingaction) }
            if ( $PSBoundParameters.ContainsKey('cookietransforms') ) { $payload.Add('cookietransforms', $cookietransforms) }
            if ( $PSBoundParameters.ContainsKey('cookieencryption') ) { $payload.Add('cookieencryption', $cookieencryption) }
            if ( $PSBoundParameters.ContainsKey('cookieproxying') ) { $payload.Add('cookieproxying', $cookieproxying) }
            if ( $PSBoundParameters.ContainsKey('addcookieflags') ) { $payload.Add('addcookieflags', $addcookieflags) }
            if ( $PSBoundParameters.ContainsKey('fieldconsistencyaction') ) { $payload.Add('fieldconsistencyaction', $fieldconsistencyaction) }
            if ( $PSBoundParameters.ContainsKey('csrftagaction') ) { $payload.Add('csrftagaction', $csrftagaction) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingaction') ) { $payload.Add('crosssitescriptingaction', $crosssitescriptingaction) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingtransformunsafehtml') ) { $payload.Add('crosssitescriptingtransformunsafehtml', $crosssitescriptingtransformunsafehtml) }
            if ( $PSBoundParameters.ContainsKey('crosssitescriptingcheckcompleteurls') ) { $payload.Add('crosssitescriptingcheckcompleteurls', $crosssitescriptingcheckcompleteurls) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionaction') ) { $payload.Add('sqlinjectionaction', $sqlinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('cmdinjectionaction') ) { $payload.Add('cmdinjectionaction', $cmdinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('cmdinjectiontype') ) { $payload.Add('cmdinjectiontype', $cmdinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiongrammar') ) { $payload.Add('sqlinjectiongrammar', $sqlinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('cmdinjectiongrammar') ) { $payload.Add('cmdinjectiongrammar', $cmdinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiontransformspecialchars') ) { $payload.Add('sqlinjectiontransformspecialchars', $sqlinjectiontransformspecialchars) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiononlycheckfieldswithsqlchars') ) { $payload.Add('sqlinjectiononlycheckfieldswithsqlchars', $sqlinjectiononlycheckfieldswithsqlchars) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectiontype') ) { $payload.Add('sqlinjectiontype', $sqlinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionchecksqlwildchars') ) { $payload.Add('sqlinjectionchecksqlwildchars', $sqlinjectionchecksqlwildchars) }
            if ( $PSBoundParameters.ContainsKey('fieldformataction') ) { $payload.Add('fieldformataction', $fieldformataction) }
            if ( $PSBoundParameters.ContainsKey('defaultfieldformattype') ) { $payload.Add('defaultfieldformattype', $defaultfieldformattype) }
            if ( $PSBoundParameters.ContainsKey('defaultfieldformatminlength') ) { $payload.Add('defaultfieldformatminlength', $defaultfieldformatminlength) }
            if ( $PSBoundParameters.ContainsKey('defaultfieldformatmaxlength') ) { $payload.Add('defaultfieldformatmaxlength', $defaultfieldformatmaxlength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowaction') ) { $payload.Add('bufferoverflowaction', $bufferoverflowaction) }
            if ( $PSBoundParameters.ContainsKey('grpcaction') ) { $payload.Add('grpcaction', $grpcaction) }
            if ( $PSBoundParameters.ContainsKey('restaction') ) { $payload.Add('restaction', $restaction) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxurllength') ) { $payload.Add('bufferoverflowmaxurllength', $bufferoverflowmaxurllength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxheaderlength') ) { $payload.Add('bufferoverflowmaxheaderlength', $bufferoverflowmaxheaderlength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxcookielength') ) { $payload.Add('bufferoverflowmaxcookielength', $bufferoverflowmaxcookielength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxquerylength') ) { $payload.Add('bufferoverflowmaxquerylength', $bufferoverflowmaxquerylength) }
            if ( $PSBoundParameters.ContainsKey('bufferoverflowmaxtotalheaderlength') ) { $payload.Add('bufferoverflowmaxtotalheaderlength', $bufferoverflowmaxtotalheaderlength) }
            if ( $PSBoundParameters.ContainsKey('creditcardaction') ) { $payload.Add('creditcardaction', $creditcardaction) }
            if ( $PSBoundParameters.ContainsKey('creditcard') ) { $payload.Add('creditcard', $creditcard) }
            if ( $PSBoundParameters.ContainsKey('creditcardmaxallowed') ) { $payload.Add('creditcardmaxallowed', $creditcardmaxallowed) }
            if ( $PSBoundParameters.ContainsKey('creditcardxout') ) { $payload.Add('creditcardxout', $creditcardxout) }
            if ( $PSBoundParameters.ContainsKey('dosecurecreditcardlogging') ) { $payload.Add('dosecurecreditcardlogging', $dosecurecreditcardlogging) }
            if ( $PSBoundParameters.ContainsKey('streaming') ) { $payload.Add('streaming', $streaming) }
            if ( $PSBoundParameters.ContainsKey('trace') ) { $payload.Add('trace', $trace) }
            if ( $PSBoundParameters.ContainsKey('requestcontenttype') ) { $payload.Add('requestcontenttype', $requestcontenttype) }
            if ( $PSBoundParameters.ContainsKey('responsecontenttype') ) { $payload.Add('responsecontenttype', $responsecontenttype) }
            if ( $PSBoundParameters.ContainsKey('jsonerrorobject') ) { $payload.Add('jsonerrorobject', $jsonerrorobject) }
            if ( $PSBoundParameters.ContainsKey('apispec') ) { $payload.Add('apispec', $apispec) }
            if ( $PSBoundParameters.ContainsKey('protofileobject') ) { $payload.Add('protofileobject', $protofileobject) }
            if ( $PSBoundParameters.ContainsKey('jsonerrorstatuscode') ) { $payload.Add('jsonerrorstatuscode', $jsonerrorstatuscode) }
            if ( $PSBoundParameters.ContainsKey('jsonerrorstatusmessage') ) { $payload.Add('jsonerrorstatusmessage', $jsonerrorstatusmessage) }
            if ( $PSBoundParameters.ContainsKey('jsondosaction') ) { $payload.Add('jsondosaction', $jsondosaction) }
            if ( $PSBoundParameters.ContainsKey('jsonsqlinjectionaction') ) { $payload.Add('jsonsqlinjectionaction', $jsonsqlinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('jsonsqlinjectiontype') ) { $payload.Add('jsonsqlinjectiontype', $jsonsqlinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('jsonsqlinjectiongrammar') ) { $payload.Add('jsonsqlinjectiongrammar', $jsonsqlinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('jsoncmdinjectionaction') ) { $payload.Add('jsoncmdinjectionaction', $jsoncmdinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('jsoncmdinjectiontype') ) { $payload.Add('jsoncmdinjectiontype', $jsoncmdinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('jsoncmdinjectiongrammar') ) { $payload.Add('jsoncmdinjectiongrammar', $jsoncmdinjectiongrammar) }
            if ( $PSBoundParameters.ContainsKey('jsonxssaction') ) { $payload.Add('jsonxssaction', $jsonxssaction) }
            if ( $PSBoundParameters.ContainsKey('xmldosaction') ) { $payload.Add('xmldosaction', $xmldosaction) }
            if ( $PSBoundParameters.ContainsKey('xmlformataction') ) { $payload.Add('xmlformataction', $xmlformataction) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectionaction') ) { $payload.Add('xmlsqlinjectionaction', $xmlsqlinjectionaction) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectiononlycheckfieldswithsqlchars') ) { $payload.Add('xmlsqlinjectiononlycheckfieldswithsqlchars', $xmlsqlinjectiononlycheckfieldswithsqlchars) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectiontype') ) { $payload.Add('xmlsqlinjectiontype', $xmlsqlinjectiontype) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectionchecksqlwildchars') ) { $payload.Add('xmlsqlinjectionchecksqlwildchars', $xmlsqlinjectionchecksqlwildchars) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjectionparsecomments') ) { $payload.Add('xmlsqlinjectionparsecomments', $xmlsqlinjectionparsecomments) }
            if ( $PSBoundParameters.ContainsKey('xmlxssaction') ) { $payload.Add('xmlxssaction', $xmlxssaction) }
            if ( $PSBoundParameters.ContainsKey('xmlwsiaction') ) { $payload.Add('xmlwsiaction', $xmlwsiaction) }
            if ( $PSBoundParameters.ContainsKey('xmlattachmentaction') ) { $payload.Add('xmlattachmentaction', $xmlattachmentaction) }
            if ( $PSBoundParameters.ContainsKey('xmlvalidationaction') ) { $payload.Add('xmlvalidationaction', $xmlvalidationaction) }
            if ( $PSBoundParameters.ContainsKey('xmlerrorobject') ) { $payload.Add('xmlerrorobject', $xmlerrorobject) }
            if ( $PSBoundParameters.ContainsKey('xmlerrorstatuscode') ) { $payload.Add('xmlerrorstatuscode', $xmlerrorstatuscode) }
            if ( $PSBoundParameters.ContainsKey('xmlerrorstatusmessage') ) { $payload.Add('xmlerrorstatusmessage', $xmlerrorstatusmessage) }
            if ( $PSBoundParameters.ContainsKey('customsettings') ) { $payload.Add('customsettings', $customsettings) }
            if ( $PSBoundParameters.ContainsKey('signatures') ) { $payload.Add('signatures', $signatures) }
            if ( $PSBoundParameters.ContainsKey('xmlsoapfaultaction') ) { $payload.Add('xmlsoapfaultaction', $xmlsoapfaultaction) }
            if ( $PSBoundParameters.ContainsKey('usehtmlerrorobject') ) { $payload.Add('usehtmlerrorobject', $usehtmlerrorobject) }
            if ( $PSBoundParameters.ContainsKey('errorurl') ) { $payload.Add('errorurl', $errorurl) }
            if ( $PSBoundParameters.ContainsKey('htmlerrorobject') ) { $payload.Add('htmlerrorobject', $htmlerrorobject) }
            if ( $PSBoundParameters.ContainsKey('htmlerrorstatuscode') ) { $payload.Add('htmlerrorstatuscode', $htmlerrorstatuscode) }
            if ( $PSBoundParameters.ContainsKey('htmlerrorstatusmessage') ) { $payload.Add('htmlerrorstatusmessage', $htmlerrorstatusmessage) }
            if ( $PSBoundParameters.ContainsKey('logeverypolicyhit') ) { $payload.Add('logeverypolicyhit', $logeverypolicyhit) }
            if ( $PSBoundParameters.ContainsKey('stripcomments') ) { $payload.Add('stripcomments', $stripcomments) }
            if ( $PSBoundParameters.ContainsKey('striphtmlcomments') ) { $payload.Add('striphtmlcomments', $striphtmlcomments) }
            if ( $PSBoundParameters.ContainsKey('stripxmlcomments') ) { $payload.Add('stripxmlcomments', $stripxmlcomments) }
            if ( $PSBoundParameters.ContainsKey('exemptclosureurlsfromsecuritychecks') ) { $payload.Add('exemptclosureurlsfromsecuritychecks', $exemptclosureurlsfromsecuritychecks) }
            if ( $PSBoundParameters.ContainsKey('defaultcharset') ) { $payload.Add('defaultcharset', $defaultcharset) }
            if ( $PSBoundParameters.ContainsKey('clientipexpression') ) { $payload.Add('clientipexpression', $clientipexpression) }
            if ( $PSBoundParameters.ContainsKey('dynamiclearning') ) { $payload.Add('dynamiclearning', $dynamiclearning) }
            if ( $PSBoundParameters.ContainsKey('postbodylimit') ) { $payload.Add('postbodylimit', $postbodylimit) }
            if ( $PSBoundParameters.ContainsKey('postbodylimitaction') ) { $payload.Add('postbodylimitaction', $postbodylimitaction) }
            if ( $PSBoundParameters.ContainsKey('postbodylimitsignature') ) { $payload.Add('postbodylimitsignature', $postbodylimitsignature) }
            if ( $PSBoundParameters.ContainsKey('fileuploadmaxnum') ) { $payload.Add('fileuploadmaxnum', $fileuploadmaxnum) }
            if ( $PSBoundParameters.ContainsKey('canonicalizehtmlresponse') ) { $payload.Add('canonicalizehtmlresponse', $canonicalizehtmlresponse) }
            if ( $PSBoundParameters.ContainsKey('enableformtagging') ) { $payload.Add('enableformtagging', $enableformtagging) }
            if ( $PSBoundParameters.ContainsKey('sessionlessfieldconsistency') ) { $payload.Add('sessionlessfieldconsistency', $sessionlessfieldconsistency) }
            if ( $PSBoundParameters.ContainsKey('sessionlessurlclosure') ) { $payload.Add('sessionlessurlclosure', $sessionlessurlclosure) }
            if ( $PSBoundParameters.ContainsKey('semicolonfieldseparator') ) { $payload.Add('semicolonfieldseparator', $semicolonfieldseparator) }
            if ( $PSBoundParameters.ContainsKey('excludefileuploadfromchecks') ) { $payload.Add('excludefileuploadfromchecks', $excludefileuploadfromchecks) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionparsecomments') ) { $payload.Add('sqlinjectionparsecomments', $sqlinjectionparsecomments) }
            if ( $PSBoundParameters.ContainsKey('invalidpercenthandling') ) { $payload.Add('invalidpercenthandling', $invalidpercenthandling) }
            if ( $PSBoundParameters.ContainsKey('type') ) { $payload.Add('type', $type) }
            if ( $PSBoundParameters.ContainsKey('checkrequestheaders') ) { $payload.Add('checkrequestheaders', $checkrequestheaders) }
            if ( $PSBoundParameters.ContainsKey('inspectquerycontenttypes') ) { $payload.Add('inspectquerycontenttypes', $inspectquerycontenttypes) }
            if ( $PSBoundParameters.ContainsKey('optimizepartialreqs') ) { $payload.Add('optimizepartialreqs', $optimizepartialreqs) }
            if ( $PSBoundParameters.ContainsKey('urldecoderequestcookies') ) { $payload.Add('urldecoderequestcookies', $urldecoderequestcookies) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('percentdecoderecursively') ) { $payload.Add('percentdecoderecursively', $percentdecoderecursively) }
            if ( $PSBoundParameters.ContainsKey('multipleheaderaction') ) { $payload.Add('multipleheaderaction', $multipleheaderaction) }
            if ( $PSBoundParameters.ContainsKey('rfcprofile') ) { $payload.Add('rfcprofile', $rfcprofile) }
            if ( $PSBoundParameters.ContainsKey('fileuploadtypesaction') ) { $payload.Add('fileuploadtypesaction', $fileuploadtypesaction) }
            if ( $PSBoundParameters.ContainsKey('verboseloglevel') ) { $payload.Add('verboseloglevel', $verboseloglevel) }
            if ( $PSBoundParameters.ContainsKey('insertcookiesamesiteattribute') ) { $payload.Add('insertcookiesamesiteattribute', $insertcookiesamesiteattribute) }
            if ( $PSBoundParameters.ContainsKey('cookiesamesiteattribute') ) { $payload.Add('cookiesamesiteattribute', $cookiesamesiteattribute) }
            if ( $PSBoundParameters.ContainsKey('sqlinjectionruletype') ) { $payload.Add('sqlinjectionruletype', $sqlinjectionruletype) }
            if ( $PSBoundParameters.ContainsKey('fakeaccountdetection') ) { $payload.Add('fakeaccountdetection', $fakeaccountdetection) }
            if ( $PSBoundParameters.ContainsKey('geolocationlogging') ) { $payload.Add('geolocationlogging', $geolocationlogging) }
            if ( $PSBoundParameters.ContainsKey('ceflogging') ) { $payload.Add('ceflogging', $ceflogging) }
            if ( $PSBoundParameters.ContainsKey('blockkeywordaction') ) { $payload.Add('blockkeywordaction', $blockkeywordaction) }
            if ( $PSBoundParameters.ContainsKey('jsonblockkeywordaction') ) { $payload.Add('jsonblockkeywordaction', $jsonblockkeywordaction) }
            if ( $PSBoundParameters.ContainsKey('as_prof_bypass_list_enable') ) { $payload.Add('as_prof_bypass_list_enable', $as_prof_bypass_list_enable) }
            if ( $PSBoundParameters.ContainsKey('as_prof_deny_list_enable') ) { $payload.Add('as_prof_deny_list_enable', $as_prof_deny_list_enable) }
            if ( $PSBoundParameters.ContainsKey('sessioncookiename') ) { $payload.Add('sessioncookiename', $sessioncookiename) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwprofile -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofile: Finished"
    }
}

function Invoke-NSGetAppfwprofile {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for application firewall profile resource.
    .PARAMETER Name
        Name for the profile. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.), pound (#), space ( ), at (@), equals (=), colon (:), and underscore (_) characters. Cannot be changed after the profile is added.
    .PARAMETER GetAll
        Retrieve all appfwprofile object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofile
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofile -GetAll
        Get all appfwprofile data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofile -Count
        Get the number of appfwprofile objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofile -name <string>
        Get appfwprofile object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofile -Filter @{ 'name'='<value>' }
        Get appfwprofile data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofile
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofile: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwprofile objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofile: Ended"
    }
}

function Invoke-NSAddAppfwprofileAppfwconfidfieldBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the appfwconfidfield that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Confidfield
        Name of the form field to designate as confidential.
    .PARAMETER Cffield_url
        URL of the web page that contains the web form.
    .PARAMETER Isregex_cffield
        Is Fake Account Detection field name regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_appfwconfidfield_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileAppfwconfidfieldBinding -name <string>
        An example how to add appfwprofile_appfwconfidfield_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileAppfwconfidfieldBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_appfwconfidfield_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Confidfield,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Cffield_url,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex_cffield,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileAppfwconfidfieldBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('confidfield') ) { $payload.Add('confidfield', $confidfield) }
            if ( $PSBoundParameters.ContainsKey('cffield_url') ) { $payload.Add('cffield_url', $cffield_url) }
            if ( $PSBoundParameters.ContainsKey('isregex_cffield') ) { $payload.Add('isregex_cffield', $isregex_cffield) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_appfwconfidfield_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_appfwconfidfield_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileAppfwconfidfieldBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileAppfwconfidfieldBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileAppfwconfidfieldBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the appfwconfidfield that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Confidfield
        Name of the form field to designate as confidential.
    .PARAMETER Cffield_url
        URL of the web page that contains the web form.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileAppfwconfidfieldBinding -Name <string>
        An example how to delete appfwprofile_appfwconfidfield_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileAppfwconfidfieldBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_appfwconfidfield_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Confidfield,

        [string]$Cffield_url,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileAppfwconfidfieldBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Confidfield') ) { $arguments.Add('confidfield', $Confidfield) }
            if ( $PSBoundParameters.ContainsKey('Cffield_url') ) { $arguments.Add('cffield_url', $Cffield_url) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_appfwconfidfield_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileAppfwconfidfieldBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileAppfwconfidfieldBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the appfwconfidfield that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_appfwconfidfield_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_appfwconfidfield_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileAppfwconfidfieldBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileAppfwconfidfieldBinding -GetAll
        Get all appfwprofile_appfwconfidfield_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileAppfwconfidfieldBinding -Count
        Get the number of appfwprofile_appfwconfidfield_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileAppfwconfidfieldBinding -name <string>
        Get appfwprofile_appfwconfidfield_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileAppfwconfidfieldBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_appfwconfidfield_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileAppfwconfidfieldBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_appfwconfidfield_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileAppfwconfidfieldBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_appfwconfidfield_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_appfwconfidfield_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_appfwconfidfield_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_appfwconfidfield_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_appfwconfidfield_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_appfwconfidfield_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_appfwconfidfield_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_appfwconfidfield_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_appfwconfidfield_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_appfwconfidfield_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileAppfwconfidfieldBinding: Ended"
    }
}

function Invoke-NSGetAppfwprofileBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object which returns the resources bound to appfwprofile.
    .PARAMETER Name
        Name of the application firewall profile.
    .PARAMETER GetAll
        Retrieve all appfwprofile_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBinding -GetAll
        Get all appfwprofile_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBinding -name <string>
        Get appfwprofile_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileBlockkeywordBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the blockkeyword that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Blockkeyword
        Field name of the block keyword binding.
    .PARAMETER Fieldname
        A block keyword field name.
    .PARAMETER As_blockkeyword_formurl
        The blockkeyword form action URL.
    .PARAMETER As_fieldname_isregex_blockkeyword
        Is block keyword field name regular expression?.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER Blockkeywordtype
        block keyword type(literal|PCRE).
        Possible values = literal, PCRE
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_blockkeyword_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileBlockkeywordBinding -name <string>
        An example how to add appfwprofile_blockkeyword_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileBlockkeywordBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_blockkeyword_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [string]$Blockkeyword,

        [string]$Fieldname,

        [string]$As_blockkeyword_formurl,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$As_fieldname_isregex_blockkeyword = 'NOTREGEX',

        [ValidateSet('literal', 'PCRE')]
        [string]$Blockkeywordtype,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileBlockkeywordBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('blockkeyword') ) { $payload.Add('blockkeyword', $blockkeyword) }
            if ( $PSBoundParameters.ContainsKey('fieldname') ) { $payload.Add('fieldname', $fieldname) }
            if ( $PSBoundParameters.ContainsKey('as_blockkeyword_formurl') ) { $payload.Add('as_blockkeyword_formurl', $as_blockkeyword_formurl) }
            if ( $PSBoundParameters.ContainsKey('as_fieldname_isregex_blockkeyword') ) { $payload.Add('as_fieldname_isregex_blockkeyword', $as_fieldname_isregex_blockkeyword) }
            if ( $PSBoundParameters.ContainsKey('blockkeywordtype') ) { $payload.Add('blockkeywordtype', $blockkeywordtype) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_blockkeyword_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_blockkeyword_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileBlockkeywordBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileBlockkeywordBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileBlockkeywordBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the blockkeyword that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Blockkeyword
        Field name of the block keyword binding.
    .PARAMETER Fieldname
        A block keyword field name.
    .PARAMETER As_blockkeyword_formurl
        The blockkeyword form action URL.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileBlockkeywordBinding -Name <string>
        An example how to delete appfwprofile_blockkeyword_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileBlockkeywordBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_blockkeyword_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Blockkeyword,

        [string]$Fieldname,

        [string]$As_blockkeyword_formurl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileBlockkeywordBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Blockkeyword') ) { $arguments.Add('blockkeyword', $Blockkeyword) }
            if ( $PSBoundParameters.ContainsKey('Fieldname') ) { $arguments.Add('fieldname', $Fieldname) }
            if ( $PSBoundParameters.ContainsKey('As_blockkeyword_formurl') ) { $arguments.Add('as_blockkeyword_formurl', $As_blockkeyword_formurl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_blockkeyword_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileBlockkeywordBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileBlockkeywordBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the blockkeyword that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_blockkeyword_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_blockkeyword_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBlockkeywordBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBlockkeywordBinding -GetAll
        Get all appfwprofile_blockkeyword_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBlockkeywordBinding -Count
        Get the number of appfwprofile_blockkeyword_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBlockkeywordBinding -name <string>
        Get appfwprofile_blockkeyword_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBlockkeywordBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_blockkeyword_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileBlockkeywordBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_blockkeyword_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileBlockkeywordBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_blockkeyword_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_blockkeyword_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_blockkeyword_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_blockkeyword_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_blockkeyword_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_blockkeyword_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_blockkeyword_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_blockkeyword_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_blockkeyword_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_blockkeyword_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileBlockkeywordBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileBypasslistBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the bypasslist that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER As_bypass_list
        Bypass List Value.
    .PARAMETER As_bypass_list_value_type
        Bypass List value type.
          
        Possible values = literal, PCRE, Expression
    .PARAMETER As_bypass_list_action
        Bypass List Action.
        Possible values = none, log
    .PARAMETER As_bypass_list_location
        Bypass List scan location.
        Possible values = IPv4, IPv6, URL
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_bypasslist_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileBypasslistBinding -name <string>
        An example how to add appfwprofile_bypasslist_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileBypasslistBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_bypasslist_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [string]$As_bypass_list,

        [ValidateSet('literal', 'PCRE', 'Expression')]
        [string]$As_bypass_list_value_type = 'literal',

        [ValidateSet('none', 'log')]
        [string]$As_bypass_list_action,

        [ValidateSet('IPv4', 'IPv6', 'URL')]
        [string]$As_bypass_list_location,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileBypasslistBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('as_bypass_list') ) { $payload.Add('as_bypass_list', $as_bypass_list) }
            if ( $PSBoundParameters.ContainsKey('as_bypass_list_value_type') ) { $payload.Add('as_bypass_list_value_type', $as_bypass_list_value_type) }
            if ( $PSBoundParameters.ContainsKey('as_bypass_list_action') ) { $payload.Add('as_bypass_list_action', $as_bypass_list_action) }
            if ( $PSBoundParameters.ContainsKey('as_bypass_list_location') ) { $payload.Add('as_bypass_list_location', $as_bypass_list_location) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_bypasslist_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_bypasslist_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileBypasslistBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileBypasslistBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileBypasslistBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the bypasslist that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER As_bypass_list
        Bypass List Value.
    .PARAMETER As_bypass_list_value_type
        Bypass List value type.
          
        Possible values = literal, PCRE, Expression
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileBypasslistBinding -Name <string>
        An example how to delete appfwprofile_bypasslist_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileBypasslistBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_bypasslist_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$As_bypass_list,

        [string]$As_bypass_list_value_type,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileBypasslistBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('As_bypass_list') ) { $arguments.Add('as_bypass_list', $As_bypass_list) }
            if ( $PSBoundParameters.ContainsKey('As_bypass_list_value_type') ) { $arguments.Add('as_bypass_list_value_type', $As_bypass_list_value_type) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_bypasslist_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileBypasslistBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileBypasslistBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the bypasslist that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_bypasslist_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_bypasslist_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBypasslistBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBypasslistBinding -GetAll
        Get all appfwprofile_bypasslist_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBypasslistBinding -Count
        Get the number of appfwprofile_bypasslist_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBypasslistBinding -name <string>
        Get appfwprofile_bypasslist_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileBypasslistBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_bypasslist_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileBypasslistBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_bypasslist_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileBypasslistBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_bypasslist_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_bypasslist_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_bypasslist_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_bypasslist_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_bypasslist_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_bypasslist_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_bypasslist_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_bypasslist_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_bypasslist_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_bypasslist_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileBypasslistBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileCmdinjectionBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the cmdinjection that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Cmdinjection
        Name of the relaxed web form field/header/cookie.
    .PARAMETER Formactionurl_cmd
        The web form action URL.
    .PARAMETER Isregex_cmd
        Is the relaxed web form field name/header/cookie a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER As_scan_location_cmd
        Location of command injection exception - form field, header or cookie.
        Possible values = FORMFIELD, HEADER, COOKIE
    .PARAMETER As_value_type_cmd
        Type of the relaxed web form value.
        Possible values = Keyword, SpecialString
    .PARAMETER As_value_expr_cmd
        The web form/header/cookie value expression.
    .PARAMETER Isvalueregex_cmd
        Is the web form field/header/cookie value a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_cmdinjection_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileCmdinjectionBinding -name <string>
        An example how to add appfwprofile_cmdinjection_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileCmdinjectionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_cmdinjection_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Cmdinjection,

        [string]$Formactionurl_cmd,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex_cmd,

        [ValidateSet('FORMFIELD', 'HEADER', 'COOKIE')]
        [string]$As_scan_location_cmd,

        [ValidateSet('Keyword', 'SpecialString')]
        [string]$As_value_type_cmd,

        [string]$As_value_expr_cmd,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isvalueregex_cmd,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileCmdinjectionBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('cmdinjection') ) { $payload.Add('cmdinjection', $cmdinjection) }
            if ( $PSBoundParameters.ContainsKey('formactionurl_cmd') ) { $payload.Add('formactionurl_cmd', $formactionurl_cmd) }
            if ( $PSBoundParameters.ContainsKey('isregex_cmd') ) { $payload.Add('isregex_cmd', $isregex_cmd) }
            if ( $PSBoundParameters.ContainsKey('as_scan_location_cmd') ) { $payload.Add('as_scan_location_cmd', $as_scan_location_cmd) }
            if ( $PSBoundParameters.ContainsKey('as_value_type_cmd') ) { $payload.Add('as_value_type_cmd', $as_value_type_cmd) }
            if ( $PSBoundParameters.ContainsKey('as_value_expr_cmd') ) { $payload.Add('as_value_expr_cmd', $as_value_expr_cmd) }
            if ( $PSBoundParameters.ContainsKey('isvalueregex_cmd') ) { $payload.Add('isvalueregex_cmd', $isvalueregex_cmd) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_cmdinjection_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_cmdinjection_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileCmdinjectionBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileCmdinjectionBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileCmdinjectionBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the cmdinjection that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Cmdinjection
        Name of the relaxed web form field/header/cookie.
    .PARAMETER Formactionurl_cmd
        The web form action URL.
    .PARAMETER As_scan_location_cmd
        Location of command injection exception - form field, header or cookie.
        Possible values = FORMFIELD, HEADER, COOKIE
    .PARAMETER As_value_type_cmd
        Type of the relaxed web form value.
        Possible values = Keyword, SpecialString
    .PARAMETER As_value_expr_cmd
        The web form/header/cookie value expression.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileCmdinjectionBinding -Name <string>
        An example how to delete appfwprofile_cmdinjection_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileCmdinjectionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_cmdinjection_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Cmdinjection,

        [string]$Formactionurl_cmd,

        [string]$As_scan_location_cmd,

        [string]$As_value_type_cmd,

        [string]$As_value_expr_cmd,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileCmdinjectionBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Cmdinjection') ) { $arguments.Add('cmdinjection', $Cmdinjection) }
            if ( $PSBoundParameters.ContainsKey('Formactionurl_cmd') ) { $arguments.Add('formactionurl_cmd', $Formactionurl_cmd) }
            if ( $PSBoundParameters.ContainsKey('As_scan_location_cmd') ) { $arguments.Add('as_scan_location_cmd', $As_scan_location_cmd) }
            if ( $PSBoundParameters.ContainsKey('As_value_type_cmd') ) { $arguments.Add('as_value_type_cmd', $As_value_type_cmd) }
            if ( $PSBoundParameters.ContainsKey('As_value_expr_cmd') ) { $arguments.Add('as_value_expr_cmd', $As_value_expr_cmd) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_cmdinjection_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileCmdinjectionBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileCmdinjectionBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the cmdinjection that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_cmdinjection_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_cmdinjection_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCmdinjectionBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCmdinjectionBinding -GetAll
        Get all appfwprofile_cmdinjection_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCmdinjectionBinding -Count
        Get the number of appfwprofile_cmdinjection_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCmdinjectionBinding -name <string>
        Get appfwprofile_cmdinjection_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCmdinjectionBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_cmdinjection_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileCmdinjectionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_cmdinjection_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileCmdinjectionBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_cmdinjection_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_cmdinjection_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_cmdinjection_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_cmdinjection_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_cmdinjection_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_cmdinjection_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_cmdinjection_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_cmdinjection_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_cmdinjection_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_cmdinjection_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileCmdinjectionBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileContenttypeBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the contenttype that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Contenttype
        A regular expression that designates a content-type on the content-types list.
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_contenttype_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileContenttypeBinding -name <string>
        An example how to add appfwprofile_contenttype_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileContenttypeBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_contenttype_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Contenttype,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileContenttypeBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('contenttype') ) { $payload.Add('contenttype', $contenttype) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_contenttype_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_contenttype_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileContenttypeBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileContenttypeBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileContenttypeBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the contenttype that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Contenttype
        A regular expression that designates a content-type on the content-types list.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileContenttypeBinding -Name <string>
        An example how to delete appfwprofile_contenttype_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileContenttypeBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_contenttype_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Contenttype,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileContenttypeBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Contenttype') ) { $arguments.Add('contenttype', $Contenttype) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_contenttype_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileContenttypeBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileContenttypeBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the contenttype that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_contenttype_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_contenttype_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileContenttypeBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileContenttypeBinding -GetAll
        Get all appfwprofile_contenttype_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileContenttypeBinding -Count
        Get the number of appfwprofile_contenttype_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileContenttypeBinding -name <string>
        Get appfwprofile_contenttype_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileContenttypeBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_contenttype_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileContenttypeBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_contenttype_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileContenttypeBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_contenttype_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_contenttype_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_contenttype_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_contenttype_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_contenttype_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_contenttype_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_contenttype_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_contenttype_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_contenttype_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_contenttype_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileContenttypeBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileCookieconsistencyBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the cookieconsistency that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Cookieconsistency
        The name of the cookie to be checked.
    .PARAMETER Isregex
        Is the cookie name a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_cookieconsistency_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileCookieconsistencyBinding -name <string>
        An example how to add appfwprofile_cookieconsistency_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileCookieconsistencyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_cookieconsistency_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Cookieconsistency,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileCookieconsistencyBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('cookieconsistency') ) { $payload.Add('cookieconsistency', $cookieconsistency) }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_cookieconsistency_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_cookieconsistency_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileCookieconsistencyBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileCookieconsistencyBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileCookieconsistencyBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the cookieconsistency that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Cookieconsistency
        The name of the cookie to be checked.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileCookieconsistencyBinding -Name <string>
        An example how to delete appfwprofile_cookieconsistency_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileCookieconsistencyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_cookieconsistency_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Cookieconsistency,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileCookieconsistencyBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Cookieconsistency') ) { $arguments.Add('cookieconsistency', $Cookieconsistency) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_cookieconsistency_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileCookieconsistencyBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileCookieconsistencyBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the cookieconsistency that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_cookieconsistency_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_cookieconsistency_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCookieconsistencyBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCookieconsistencyBinding -GetAll
        Get all appfwprofile_cookieconsistency_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCookieconsistencyBinding -Count
        Get the number of appfwprofile_cookieconsistency_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCookieconsistencyBinding -name <string>
        Get appfwprofile_cookieconsistency_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCookieconsistencyBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_cookieconsistency_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileCookieconsistencyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_cookieconsistency_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileCookieconsistencyBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_cookieconsistency_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_cookieconsistency_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_cookieconsistency_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_cookieconsistency_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_cookieconsistency_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_cookieconsistency_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_cookieconsistency_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_cookieconsistency_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_cookieconsistency_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_cookieconsistency_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileCookieconsistencyBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileCreditcardnumberBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the creditcardnumber that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Creditcardnumber
        The object expression that is to be excluded from safe commerce check.
    .PARAMETER Creditcardnumberurl
        The url for which the list of credit card numbers are needed to be bypassed from inspection.
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_creditcardnumber_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileCreditcardnumberBinding -name <string>
        An example how to add appfwprofile_creditcardnumber_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileCreditcardnumberBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_creditcardnumber_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Creditcardnumber,

        [string]$Creditcardnumberurl,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileCreditcardnumberBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('creditcardnumber') ) { $payload.Add('creditcardnumber', $creditcardnumber) }
            if ( $PSBoundParameters.ContainsKey('creditcardnumberurl') ) { $payload.Add('creditcardnumberurl', $creditcardnumberurl) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_creditcardnumber_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_creditcardnumber_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileCreditcardnumberBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileCreditcardnumberBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileCreditcardnumberBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the creditcardnumber that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Creditcardnumber
        The object expression that is to be excluded from safe commerce check.
    .PARAMETER Creditcardnumberurl
        The url for which the list of credit card numbers are needed to be bypassed from inspection.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileCreditcardnumberBinding -Name <string>
        An example how to delete appfwprofile_creditcardnumber_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileCreditcardnumberBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_creditcardnumber_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Creditcardnumber,

        [string]$Creditcardnumberurl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileCreditcardnumberBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Creditcardnumber') ) { $arguments.Add('creditcardnumber', $Creditcardnumber) }
            if ( $PSBoundParameters.ContainsKey('Creditcardnumberurl') ) { $arguments.Add('creditcardnumberurl', $Creditcardnumberurl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_creditcardnumber_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileCreditcardnumberBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileCreditcardnumberBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the creditcardnumber that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_creditcardnumber_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_creditcardnumber_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCreditcardnumberBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCreditcardnumberBinding -GetAll
        Get all appfwprofile_creditcardnumber_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCreditcardnumberBinding -Count
        Get the number of appfwprofile_creditcardnumber_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCreditcardnumberBinding -name <string>
        Get appfwprofile_creditcardnumber_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCreditcardnumberBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_creditcardnumber_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileCreditcardnumberBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_creditcardnumber_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileCreditcardnumberBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_creditcardnumber_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_creditcardnumber_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_creditcardnumber_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_creditcardnumber_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_creditcardnumber_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_creditcardnumber_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_creditcardnumber_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_creditcardnumber_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_creditcardnumber_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_creditcardnumber_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileCreditcardnumberBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileCrosssitescriptingBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the crosssitescripting that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Crosssitescripting
        The web form field name.
    .PARAMETER Formactionurl_xss
        The web form action URL.
    .PARAMETER Isregex_xss
        Is the web form field name a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER As_scan_location_xss
        Location of cross-site scripting exception - form field, header, cookie or URL.
        Possible values = FORMFIELD, HEADER, COOKIE, URL
    .PARAMETER As_value_type_xss
        The web form value type.
        Possible values = Tag, Attribute, Pattern
    .PARAMETER As_value_expr_xss
        The web form value expression.
    .PARAMETER Isvalueregex_xss
        Is the web form field value a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_crosssitescripting_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileCrosssitescriptingBinding -name <string>
        An example how to add appfwprofile_crosssitescripting_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileCrosssitescriptingBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_crosssitescripting_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Crosssitescripting,

        [string]$Formactionurl_xss,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex_xss,

        [ValidateSet('FORMFIELD', 'HEADER', 'COOKIE', 'URL')]
        [string]$As_scan_location_xss,

        [ValidateSet('Tag', 'Attribute', 'Pattern')]
        [string]$As_value_type_xss,

        [string]$As_value_expr_xss,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isvalueregex_xss,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileCrosssitescriptingBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('crosssitescripting') ) { $payload.Add('crosssitescripting', $crosssitescripting) }
            if ( $PSBoundParameters.ContainsKey('formactionurl_xss') ) { $payload.Add('formactionurl_xss', $formactionurl_xss) }
            if ( $PSBoundParameters.ContainsKey('isregex_xss') ) { $payload.Add('isregex_xss', $isregex_xss) }
            if ( $PSBoundParameters.ContainsKey('as_scan_location_xss') ) { $payload.Add('as_scan_location_xss', $as_scan_location_xss) }
            if ( $PSBoundParameters.ContainsKey('as_value_type_xss') ) { $payload.Add('as_value_type_xss', $as_value_type_xss) }
            if ( $PSBoundParameters.ContainsKey('as_value_expr_xss') ) { $payload.Add('as_value_expr_xss', $as_value_expr_xss) }
            if ( $PSBoundParameters.ContainsKey('isvalueregex_xss') ) { $payload.Add('isvalueregex_xss', $isvalueregex_xss) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_crosssitescripting_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_crosssitescripting_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileCrosssitescriptingBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileCrosssitescriptingBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileCrosssitescriptingBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the crosssitescripting that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Crosssitescripting
        The web form field name.
    .PARAMETER Formactionurl_xss
        The web form action URL.
    .PARAMETER As_scan_location_xss
        Location of cross-site scripting exception - form field, header, cookie or URL.
        Possible values = FORMFIELD, HEADER, COOKIE, URL
    .PARAMETER As_value_type_xss
        The web form value type.
        Possible values = Tag, Attribute, Pattern
    .PARAMETER As_value_expr_xss
        The web form value expression.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileCrosssitescriptingBinding -Name <string>
        An example how to delete appfwprofile_crosssitescripting_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileCrosssitescriptingBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_crosssitescripting_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Crosssitescripting,

        [string]$Formactionurl_xss,

        [string]$As_scan_location_xss,

        [string]$As_value_type_xss,

        [string]$As_value_expr_xss,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileCrosssitescriptingBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Crosssitescripting') ) { $arguments.Add('crosssitescripting', $Crosssitescripting) }
            if ( $PSBoundParameters.ContainsKey('Formactionurl_xss') ) { $arguments.Add('formactionurl_xss', $Formactionurl_xss) }
            if ( $PSBoundParameters.ContainsKey('As_scan_location_xss') ) { $arguments.Add('as_scan_location_xss', $As_scan_location_xss) }
            if ( $PSBoundParameters.ContainsKey('As_value_type_xss') ) { $arguments.Add('as_value_type_xss', $As_value_type_xss) }
            if ( $PSBoundParameters.ContainsKey('As_value_expr_xss') ) { $arguments.Add('as_value_expr_xss', $As_value_expr_xss) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_crosssitescripting_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileCrosssitescriptingBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileCrosssitescriptingBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the crosssitescripting that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_crosssitescripting_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_crosssitescripting_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCrosssitescriptingBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCrosssitescriptingBinding -GetAll
        Get all appfwprofile_crosssitescripting_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCrosssitescriptingBinding -Count
        Get the number of appfwprofile_crosssitescripting_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCrosssitescriptingBinding -name <string>
        Get appfwprofile_crosssitescripting_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCrosssitescriptingBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_crosssitescripting_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileCrosssitescriptingBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_crosssitescripting_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileCrosssitescriptingBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_crosssitescripting_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_crosssitescripting_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_crosssitescripting_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_crosssitescripting_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_crosssitescripting_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_crosssitescripting_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_crosssitescripting_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_crosssitescripting_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_crosssitescripting_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_crosssitescripting_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileCrosssitescriptingBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileCsrftagBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the csrftag that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Csrftag
        The web form originating URL.
    .PARAMETER Csrfformactionurl
        The web form action URL.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_csrftag_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileCsrftagBinding -name <string>
        An example how to add appfwprofile_csrftag_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileCsrftagBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_csrftag_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Csrftag,

        [string]$Csrfformactionurl,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileCsrftagBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('csrftag') ) { $payload.Add('csrftag', $csrftag) }
            if ( $PSBoundParameters.ContainsKey('csrfformactionurl') ) { $payload.Add('csrfformactionurl', $csrfformactionurl) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_csrftag_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_csrftag_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileCsrftagBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileCsrftagBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileCsrftagBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the csrftag that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Csrftag
        The web form originating URL.
    .PARAMETER Csrfformactionurl
        The web form action URL.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileCsrftagBinding -Name <string>
        An example how to delete appfwprofile_csrftag_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileCsrftagBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_csrftag_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Csrftag,

        [string]$Csrfformactionurl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileCsrftagBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Csrftag') ) { $arguments.Add('csrftag', $Csrftag) }
            if ( $PSBoundParameters.ContainsKey('Csrfformactionurl') ) { $arguments.Add('csrfformactionurl', $Csrfformactionurl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_csrftag_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileCsrftagBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileCsrftagBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the csrftag that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_csrftag_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_csrftag_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCsrftagBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCsrftagBinding -GetAll
        Get all appfwprofile_csrftag_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCsrftagBinding -Count
        Get the number of appfwprofile_csrftag_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCsrftagBinding -name <string>
        Get appfwprofile_csrftag_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileCsrftagBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_csrftag_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileCsrftagBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_csrftag_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileCsrftagBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_csrftag_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_csrftag_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_csrftag_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_csrftag_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_csrftag_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_csrftag_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_csrftag_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_csrftag_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_csrftag_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_csrftag_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileCsrftagBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileDenylistBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the denylist that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER As_deny_list
        Deny List Value.
    .PARAMETER As_deny_list_value_type
        Deny List value type.
          
        Possible values = literal, PCRE, Expression
    .PARAMETER As_deny_list_action
        Deny List Action. Default value = REDIRECT.
          
        Possible values = none, log, RESET, REDIRECT
    .PARAMETER As_deny_list_location
        Deny List scan location.
        Possible values = IPv4, IPv6, URL
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_denylist_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileDenylistBinding -name <string>
        An example how to add appfwprofile_denylist_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileDenylistBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_denylist_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [string]$As_deny_list,

        [ValidateSet('literal', 'PCRE', 'Expression')]
        [string]$As_deny_list_value_type = 'literal',

        [ValidateSet('none', 'log', 'RESET', 'REDIRECT')]
        [string[]]$As_deny_list_action = 'REDIRECT',

        [ValidateSet('IPv4', 'IPv6', 'URL')]
        [string]$As_deny_list_location,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileDenylistBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('as_deny_list') ) { $payload.Add('as_deny_list', $as_deny_list) }
            if ( $PSBoundParameters.ContainsKey('as_deny_list_value_type') ) { $payload.Add('as_deny_list_value_type', $as_deny_list_value_type) }
            if ( $PSBoundParameters.ContainsKey('as_deny_list_action') ) { $payload.Add('as_deny_list_action', $as_deny_list_action) }
            if ( $PSBoundParameters.ContainsKey('as_deny_list_location') ) { $payload.Add('as_deny_list_location', $as_deny_list_location) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_denylist_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_denylist_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileDenylistBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileDenylistBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileDenylistBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the denylist that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER As_deny_list
        Deny List Value.
    .PARAMETER As_deny_list_value_type
        Deny List value type.
          
        Possible values = literal, PCRE, Expression
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileDenylistBinding -Name <string>
        An example how to delete appfwprofile_denylist_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileDenylistBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_denylist_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$As_deny_list,

        [string]$As_deny_list_value_type,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileDenylistBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('As_deny_list') ) { $arguments.Add('as_deny_list', $As_deny_list) }
            if ( $PSBoundParameters.ContainsKey('As_deny_list_value_type') ) { $arguments.Add('as_deny_list_value_type', $As_deny_list_value_type) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_denylist_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileDenylistBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileDenylistBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the denylist that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_denylist_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_denylist_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileDenylistBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileDenylistBinding -GetAll
        Get all appfwprofile_denylist_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileDenylistBinding -Count
        Get the number of appfwprofile_denylist_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileDenylistBinding -name <string>
        Get appfwprofile_denylist_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileDenylistBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_denylist_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileDenylistBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_denylist_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileDenylistBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_denylist_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_denylist_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_denylist_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_denylist_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_denylist_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_denylist_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_denylist_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_denylist_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_denylist_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_denylist_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileDenylistBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileDenyurlBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the denyurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Denyurl
        A regular expression that designates a URL on the Deny URL list.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_denyurl_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileDenyurlBinding -name <string>
        An example how to add appfwprofile_denyurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileDenyurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_denyurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Denyurl,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileDenyurlBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('denyurl') ) { $payload.Add('denyurl', $denyurl) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_denyurl_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_denyurl_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileDenyurlBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileDenyurlBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileDenyurlBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the denyurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Denyurl
        A regular expression that designates a URL on the Deny URL list.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileDenyurlBinding -Name <string>
        An example how to delete appfwprofile_denyurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileDenyurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_denyurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Denyurl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileDenyurlBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Denyurl') ) { $arguments.Add('denyurl', $Denyurl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_denyurl_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileDenyurlBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileDenyurlBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the denyurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_denyurl_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_denyurl_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileDenyurlBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileDenyurlBinding -GetAll
        Get all appfwprofile_denyurl_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileDenyurlBinding -Count
        Get the number of appfwprofile_denyurl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileDenyurlBinding -name <string>
        Get appfwprofile_denyurl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileDenyurlBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_denyurl_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileDenyurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_denyurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileDenyurlBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_denyurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_denyurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_denyurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_denyurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_denyurl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_denyurl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_denyurl_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_denyurl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_denyurl_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_denyurl_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileDenyurlBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileExcluderescontenttypeBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the excluderescontenttype that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Excluderescontenttype
        A regular expression that represents the content type of the response that are to be excluded from inspection.
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_excluderescontenttype_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileExcluderescontenttypeBinding -name <string>
        An example how to add appfwprofile_excluderescontenttype_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileExcluderescontenttypeBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_excluderescontenttype_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Excluderescontenttype,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileExcluderescontenttypeBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('excluderescontenttype') ) { $payload.Add('excluderescontenttype', $excluderescontenttype) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_excluderescontenttype_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_excluderescontenttype_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileExcluderescontenttypeBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileExcluderescontenttypeBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileExcluderescontenttypeBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the excluderescontenttype that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Excluderescontenttype
        A regular expression that represents the content type of the response that are to be excluded from inspection.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileExcluderescontenttypeBinding -Name <string>
        An example how to delete appfwprofile_excluderescontenttype_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileExcluderescontenttypeBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_excluderescontenttype_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Excluderescontenttype,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileExcluderescontenttypeBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Excluderescontenttype') ) { $arguments.Add('excluderescontenttype', $Excluderescontenttype) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_excluderescontenttype_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileExcluderescontenttypeBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileExcluderescontenttypeBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the excluderescontenttype that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_excluderescontenttype_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_excluderescontenttype_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileExcluderescontenttypeBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileExcluderescontenttypeBinding -GetAll
        Get all appfwprofile_excluderescontenttype_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileExcluderescontenttypeBinding -Count
        Get the number of appfwprofile_excluderescontenttype_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileExcluderescontenttypeBinding -name <string>
        Get appfwprofile_excluderescontenttype_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileExcluderescontenttypeBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_excluderescontenttype_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileExcluderescontenttypeBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_excluderescontenttype_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileExcluderescontenttypeBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_excluderescontenttype_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_excluderescontenttype_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_excluderescontenttype_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_excluderescontenttype_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_excluderescontenttype_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_excluderescontenttype_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_excluderescontenttype_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_excluderescontenttype_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_excluderescontenttype_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_excluderescontenttype_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileExcluderescontenttypeBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileFakeaccountBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the fakeaccount that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Fakeaccount
        Field name of the fake account rule.
    .PARAMETER Tag
        A tag expression that defines the Fake Account.
    .PARAMETER Isfieldnameregex
        Is Fake Account Detection field name regex?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Formexpression
        A regular expression that defines the Fake Account.
    .PARAMETER Formurl_fad
        The fake account detection URL.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_fakeaccount_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileFakeaccountBinding -name <string>
        An example how to add appfwprofile_fakeaccount_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileFakeaccountBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fakeaccount_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [string]$Fakeaccount,

        [string]$Tag,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isfieldnameregex,

        [string]$Formexpression,

        [string]$Formurl_fad,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileFakeaccountBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('fakeaccount') ) { $payload.Add('fakeaccount', $fakeaccount) }
            if ( $PSBoundParameters.ContainsKey('tag') ) { $payload.Add('tag', $tag) }
            if ( $PSBoundParameters.ContainsKey('isfieldnameregex') ) { $payload.Add('isfieldnameregex', $isfieldnameregex) }
            if ( $PSBoundParameters.ContainsKey('formexpression') ) { $payload.Add('formexpression', $formexpression) }
            if ( $PSBoundParameters.ContainsKey('formurl_fad') ) { $payload.Add('formurl_fad', $formurl_fad) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_fakeaccount_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_fakeaccount_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileFakeaccountBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileFakeaccountBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileFakeaccountBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the fakeaccount that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Fakeaccount
        Field name of the fake account rule.
    .PARAMETER Tag
        A tag expression that defines the Fake Account.
    .PARAMETER Formexpression
        A regular expression that defines the Fake Account.
    .PARAMETER Formurl_fad
        The fake account detection URL.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileFakeaccountBinding -Name <string>
        An example how to delete appfwprofile_fakeaccount_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileFakeaccountBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fakeaccount_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Fakeaccount,

        [string]$Tag,

        [string]$Formexpression,

        [string]$Formurl_fad,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileFakeaccountBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Fakeaccount') ) { $arguments.Add('fakeaccount', $Fakeaccount) }
            if ( $PSBoundParameters.ContainsKey('Tag') ) { $arguments.Add('tag', $Tag) }
            if ( $PSBoundParameters.ContainsKey('Formexpression') ) { $arguments.Add('formexpression', $Formexpression) }
            if ( $PSBoundParameters.ContainsKey('Formurl_fad') ) { $arguments.Add('formurl_fad', $Formurl_fad) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_fakeaccount_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileFakeaccountBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileFakeaccountBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the fakeaccount that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_fakeaccount_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_fakeaccount_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFakeaccountBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFakeaccountBinding -GetAll
        Get all appfwprofile_fakeaccount_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFakeaccountBinding -Count
        Get the number of appfwprofile_fakeaccount_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFakeaccountBinding -name <string>
        Get appfwprofile_fakeaccount_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFakeaccountBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_fakeaccount_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileFakeaccountBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fakeaccount_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileFakeaccountBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_fakeaccount_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fakeaccount_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_fakeaccount_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fakeaccount_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_fakeaccount_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fakeaccount_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_fakeaccount_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fakeaccount_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_fakeaccount_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fakeaccount_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileFakeaccountBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileFieldconsistencyBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the fieldconsistency that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Fieldconsistency
        The web form field name.
    .PARAMETER Formactionurl_ffc
        The web form action URL.
    .PARAMETER Isregex_ffc
        Is the web form field name a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_fieldconsistency_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileFieldconsistencyBinding -name <string>
        An example how to add appfwprofile_fieldconsistency_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileFieldconsistencyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fieldconsistency_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Fieldconsistency,

        [string]$Formactionurl_ffc,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex_ffc,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileFieldconsistencyBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('fieldconsistency') ) { $payload.Add('fieldconsistency', $fieldconsistency) }
            if ( $PSBoundParameters.ContainsKey('formactionurl_ffc') ) { $payload.Add('formactionurl_ffc', $formactionurl_ffc) }
            if ( $PSBoundParameters.ContainsKey('isregex_ffc') ) { $payload.Add('isregex_ffc', $isregex_ffc) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_fieldconsistency_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_fieldconsistency_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileFieldconsistencyBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileFieldconsistencyBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileFieldconsistencyBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the fieldconsistency that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Fieldconsistency
        The web form field name.
    .PARAMETER Formactionurl_ffc
        The web form action URL.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileFieldconsistencyBinding -Name <string>
        An example how to delete appfwprofile_fieldconsistency_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileFieldconsistencyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fieldconsistency_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Fieldconsistency,

        [string]$Formactionurl_ffc,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileFieldconsistencyBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Fieldconsistency') ) { $arguments.Add('fieldconsistency', $Fieldconsistency) }
            if ( $PSBoundParameters.ContainsKey('Formactionurl_ffc') ) { $arguments.Add('formactionurl_ffc', $Formactionurl_ffc) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_fieldconsistency_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileFieldconsistencyBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileFieldconsistencyBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the fieldconsistency that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_fieldconsistency_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_fieldconsistency_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFieldconsistencyBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFieldconsistencyBinding -GetAll
        Get all appfwprofile_fieldconsistency_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFieldconsistencyBinding -Count
        Get the number of appfwprofile_fieldconsistency_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFieldconsistencyBinding -name <string>
        Get appfwprofile_fieldconsistency_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFieldconsistencyBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_fieldconsistency_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileFieldconsistencyBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fieldconsistency_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileFieldconsistencyBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_fieldconsistency_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fieldconsistency_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_fieldconsistency_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fieldconsistency_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_fieldconsistency_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fieldconsistency_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_fieldconsistency_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fieldconsistency_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_fieldconsistency_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fieldconsistency_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileFieldconsistencyBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileFieldformatBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the fieldformat that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Fieldformat
        Name of the form field to which a field format will be assigned.
    .PARAMETER Formactionurl_ff
        Action URL of the form field to which a field format will be assigned.
    .PARAMETER Fieldtype
        The field type you are assigning to this form field.
    .PARAMETER Fieldformatminlength
        The minimum allowed length for data in this form field.
    .PARAMETER Fieldformatmaxlength
        The maximum allowed length for data in this form field.
    .PARAMETER Isregex_ff
        Is the form field name a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_fieldformat_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileFieldformatBinding -name <string>
        An example how to add appfwprofile_fieldformat_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileFieldformatBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fieldformat_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Fieldformat,

        [string]$Formactionurl_ff,

        [string]$Fieldtype,

        [double]$Fieldformatminlength,

        [double]$Fieldformatmaxlength,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex_ff,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileFieldformatBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('fieldformat') ) { $payload.Add('fieldformat', $fieldformat) }
            if ( $PSBoundParameters.ContainsKey('formactionurl_ff') ) { $payload.Add('formactionurl_ff', $formactionurl_ff) }
            if ( $PSBoundParameters.ContainsKey('fieldtype') ) { $payload.Add('fieldtype', $fieldtype) }
            if ( $PSBoundParameters.ContainsKey('fieldformatminlength') ) { $payload.Add('fieldformatminlength', $fieldformatminlength) }
            if ( $PSBoundParameters.ContainsKey('fieldformatmaxlength') ) { $payload.Add('fieldformatmaxlength', $fieldformatmaxlength) }
            if ( $PSBoundParameters.ContainsKey('isregex_ff') ) { $payload.Add('isregex_ff', $isregex_ff) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_fieldformat_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_fieldformat_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileFieldformatBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileFieldformatBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileFieldformatBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the fieldformat that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Fieldformat
        Name of the form field to which a field format will be assigned.
    .PARAMETER Formactionurl_ff
        Action URL of the form field to which a field format will be assigned.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileFieldformatBinding -Name <string>
        An example how to delete appfwprofile_fieldformat_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileFieldformatBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fieldformat_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Fieldformat,

        [string]$Formactionurl_ff,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileFieldformatBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Fieldformat') ) { $arguments.Add('fieldformat', $Fieldformat) }
            if ( $PSBoundParameters.ContainsKey('Formactionurl_ff') ) { $arguments.Add('formactionurl_ff', $Formactionurl_ff) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_fieldformat_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileFieldformatBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileFieldformatBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the fieldformat that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_fieldformat_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_fieldformat_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFieldformatBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFieldformatBinding -GetAll
        Get all appfwprofile_fieldformat_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFieldformatBinding -Count
        Get the number of appfwprofile_fieldformat_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFieldformatBinding -name <string>
        Get appfwprofile_fieldformat_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFieldformatBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_fieldformat_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileFieldformatBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fieldformat_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileFieldformatBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_fieldformat_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fieldformat_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_fieldformat_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fieldformat_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_fieldformat_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fieldformat_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_fieldformat_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fieldformat_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_fieldformat_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fieldformat_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileFieldformatBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileFileuploadtypeBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the fileuploadtype that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Fileuploadtype
        FileUploadTypes to allow/deny.
    .PARAMETER As_fileuploadtypes_url
        FileUploadTypes action URL.
    .PARAMETER Isnameregex
        Is field name a regular expression?.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER Isregex_fileuploadtypes_url
        Is a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Filetype
        FileUploadTypes file types.
        Possible values = pdf, msdoc, text, image, any
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_fileuploadtype_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileFileuploadtypeBinding -name <string>
        An example how to add appfwprofile_fileuploadtype_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileFileuploadtypeBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fileuploadtype_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Fileuploadtype,

        [string]$As_fileuploadtypes_url,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isnameregex = 'NOTREGEX',

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex_fileuploadtypes_url,

        [ValidateSet('pdf', 'msdoc', 'text', 'image', 'any')]
        [string[]]$Filetype,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileFileuploadtypeBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('fileuploadtype') ) { $payload.Add('fileuploadtype', $fileuploadtype) }
            if ( $PSBoundParameters.ContainsKey('as_fileuploadtypes_url') ) { $payload.Add('as_fileuploadtypes_url', $as_fileuploadtypes_url) }
            if ( $PSBoundParameters.ContainsKey('isnameregex') ) { $payload.Add('isnameregex', $isnameregex) }
            if ( $PSBoundParameters.ContainsKey('isregex_fileuploadtypes_url') ) { $payload.Add('isregex_fileuploadtypes_url', $isregex_fileuploadtypes_url) }
            if ( $PSBoundParameters.ContainsKey('filetype') ) { $payload.Add('filetype', $filetype) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_fileuploadtype_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_fileuploadtype_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileFileuploadtypeBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileFileuploadtypeBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileFileuploadtypeBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the fileuploadtype that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Fileuploadtype
        FileUploadTypes to allow/deny.
    .PARAMETER As_fileuploadtypes_url
        FileUploadTypes action URL.
    .PARAMETER Filetype
        FileUploadTypes file types.
        Possible values = pdf, msdoc, text, image, any
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileFileuploadtypeBinding -Name <string>
        An example how to delete appfwprofile_fileuploadtype_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileFileuploadtypeBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fileuploadtype_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Fileuploadtype,

        [string]$As_fileuploadtypes_url,

        [string[]]$Filetype,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileFileuploadtypeBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Fileuploadtype') ) { $arguments.Add('fileuploadtype', $Fileuploadtype) }
            if ( $PSBoundParameters.ContainsKey('As_fileuploadtypes_url') ) { $arguments.Add('as_fileuploadtypes_url', $As_fileuploadtypes_url) }
            if ( $PSBoundParameters.ContainsKey('Filetype') ) { $arguments.Add('filetype', $Filetype) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_fileuploadtype_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileFileuploadtypeBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileFileuploadtypeBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the fileuploadtype that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_fileuploadtype_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_fileuploadtype_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFileuploadtypeBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFileuploadtypeBinding -GetAll
        Get all appfwprofile_fileuploadtype_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFileuploadtypeBinding -Count
        Get the number of appfwprofile_fileuploadtype_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFileuploadtypeBinding -name <string>
        Get appfwprofile_fileuploadtype_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileFileuploadtypeBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_fileuploadtype_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileFileuploadtypeBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_fileuploadtype_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileFileuploadtypeBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_fileuploadtype_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fileuploadtype_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_fileuploadtype_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fileuploadtype_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_fileuploadtype_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fileuploadtype_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_fileuploadtype_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fileuploadtype_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_fileuploadtype_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_fileuploadtype_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileFileuploadtypeBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileGrpcvalidationBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the grpcvalidation that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Grpcvalidation
        Exempt any gRPC method matching the given pattern from the API schema validation check. Example: bookstore.api.doc.AddBook.
    .PARAMETER Grpc_relax_validation_action
        Action to be taken for traffic matching the configured relaxation rule.
          
        Possible values = log, none
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_grpcvalidation_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileGrpcvalidationBinding -name <string>
        An example how to add appfwprofile_grpcvalidation_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileGrpcvalidationBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_grpcvalidation_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Grpcvalidation,

        [ValidateSet('log', 'none')]
        [string]$Grpc_relax_validation_action = 'none',

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileGrpcvalidationBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('grpcvalidation') ) { $payload.Add('grpcvalidation', $grpcvalidation) }
            if ( $PSBoundParameters.ContainsKey('grpc_relax_validation_action') ) { $payload.Add('grpc_relax_validation_action', $grpc_relax_validation_action) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_grpcvalidation_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_grpcvalidation_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileGrpcvalidationBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileGrpcvalidationBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileGrpcvalidationBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the grpcvalidation that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Grpcvalidation
        Exempt any gRPC method matching the given pattern from the API schema validation check. Example: bookstore.api.doc.AddBook.
    .PARAMETER Grpc_relax_validation_action
        Action to be taken for traffic matching the configured relaxation rule.
          
        Possible values = log, none
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileGrpcvalidationBinding -Name <string>
        An example how to delete appfwprofile_grpcvalidation_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileGrpcvalidationBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_grpcvalidation_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Grpcvalidation,

        [string]$Grpc_relax_validation_action,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileGrpcvalidationBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Grpcvalidation') ) { $arguments.Add('grpcvalidation', $Grpcvalidation) }
            if ( $PSBoundParameters.ContainsKey('Grpc_relax_validation_action') ) { $arguments.Add('grpc_relax_validation_action', $Grpc_relax_validation_action) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_grpcvalidation_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileGrpcvalidationBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileGrpcvalidationBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the grpcvalidation that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_grpcvalidation_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_grpcvalidation_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileGrpcvalidationBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileGrpcvalidationBinding -GetAll
        Get all appfwprofile_grpcvalidation_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileGrpcvalidationBinding -Count
        Get the number of appfwprofile_grpcvalidation_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileGrpcvalidationBinding -name <string>
        Get appfwprofile_grpcvalidation_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileGrpcvalidationBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_grpcvalidation_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileGrpcvalidationBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_grpcvalidation_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileGrpcvalidationBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_grpcvalidation_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_grpcvalidation_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_grpcvalidation_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_grpcvalidation_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_grpcvalidation_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_grpcvalidation_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_grpcvalidation_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_grpcvalidation_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_grpcvalidation_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_grpcvalidation_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileGrpcvalidationBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileJsonblockkeywordBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the jsonblockkeyword that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Jsonblockkeyword
        Field name of json block keyword binding.
    .PARAMETER Keyname_json_blockkeyword
        JSON block keyword keyname.
    .PARAMETER Jsonblockkeywordurl
        The json blockkeyword URL.
    .PARAMETER Iskeyregex_json_blockkeyword
        Is JSON blockkeyword key a regular expression?.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER Jsonblockkeywordtype
        JSON block keyword type.
        Possible values = literal, PCRE
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_jsonblockkeyword_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileJsonblockkeywordBinding -name <string>
        An example how to add appfwprofile_jsonblockkeyword_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileJsonblockkeywordBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsonblockkeyword_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [string]$Jsonblockkeyword,

        [string]$Keyname_json_blockkeyword,

        [string]$Jsonblockkeywordurl,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Iskeyregex_json_blockkeyword = 'NOTREGEX',

        [ValidateSet('literal', 'PCRE')]
        [string]$Jsonblockkeywordtype,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileJsonblockkeywordBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('jsonblockkeyword') ) { $payload.Add('jsonblockkeyword', $jsonblockkeyword) }
            if ( $PSBoundParameters.ContainsKey('keyname_json_blockkeyword') ) { $payload.Add('keyname_json_blockkeyword', $keyname_json_blockkeyword) }
            if ( $PSBoundParameters.ContainsKey('jsonblockkeywordurl') ) { $payload.Add('jsonblockkeywordurl', $jsonblockkeywordurl) }
            if ( $PSBoundParameters.ContainsKey('iskeyregex_json_blockkeyword') ) { $payload.Add('iskeyregex_json_blockkeyword', $iskeyregex_json_blockkeyword) }
            if ( $PSBoundParameters.ContainsKey('jsonblockkeywordtype') ) { $payload.Add('jsonblockkeywordtype', $jsonblockkeywordtype) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_jsonblockkeyword_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_jsonblockkeyword_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileJsonblockkeywordBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileJsonblockkeywordBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileJsonblockkeywordBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the jsonblockkeyword that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Jsonblockkeyword
        Field name of json block keyword binding.
    .PARAMETER Keyname_json_blockkeyword
        JSON block keyword keyname.
    .PARAMETER Jsonblockkeywordurl
        The json blockkeyword URL.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileJsonblockkeywordBinding -Name <string>
        An example how to delete appfwprofile_jsonblockkeyword_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileJsonblockkeywordBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsonblockkeyword_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Jsonblockkeyword,

        [string]$Keyname_json_blockkeyword,

        [string]$Jsonblockkeywordurl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileJsonblockkeywordBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Jsonblockkeyword') ) { $arguments.Add('jsonblockkeyword', $Jsonblockkeyword) }
            if ( $PSBoundParameters.ContainsKey('Keyname_json_blockkeyword') ) { $arguments.Add('keyname_json_blockkeyword', $Keyname_json_blockkeyword) }
            if ( $PSBoundParameters.ContainsKey('Jsonblockkeywordurl') ) { $arguments.Add('jsonblockkeywordurl', $Jsonblockkeywordurl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_jsonblockkeyword_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileJsonblockkeywordBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileJsonblockkeywordBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the jsonblockkeyword that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_jsonblockkeyword_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_jsonblockkeyword_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonblockkeywordBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonblockkeywordBinding -GetAll
        Get all appfwprofile_jsonblockkeyword_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonblockkeywordBinding -Count
        Get the number of appfwprofile_jsonblockkeyword_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonblockkeywordBinding -name <string>
        Get appfwprofile_jsonblockkeyword_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonblockkeywordBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_jsonblockkeyword_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileJsonblockkeywordBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsonblockkeyword_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileJsonblockkeywordBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_jsonblockkeyword_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonblockkeyword_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_jsonblockkeyword_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonblockkeyword_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_jsonblockkeyword_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonblockkeyword_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_jsonblockkeyword_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonblockkeyword_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_jsonblockkeyword_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonblockkeyword_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileJsonblockkeywordBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileJsoncmdurlBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the jsoncmdurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Jsoncmdurl
        A regular expression that designates a URL on the Json CMD URL list for which Command injection violations are relaxed. Enclose URLs in double quotes to ensure preservation of any embedded spaces or non-alphanumeric characters.
    .PARAMETER Keyname_json_cmd
        An expression that designates a keyname on the JSON CMD URL for which Command injection violations are relaxed.
    .PARAMETER Iskeyregex_json_cmd
        Is the key name a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER As_value_type_json_cmd
        Type of the relaxed JSON CMD key value.
        Possible values = Keyword, SpecialString
    .PARAMETER As_value_expr_json_cmd
        The JSON CMD key value expression.
    .PARAMETER Isvalueregex_json_cmd
        Is the JSON CMD key value a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_jsoncmdurl_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileJsoncmdurlBinding -name <string>
        An example how to add appfwprofile_jsoncmdurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileJsoncmdurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsoncmdurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateLength(1, 2047)]
        [string]$Jsoncmdurl,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Keyname_json_cmd,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Iskeyregex_json_cmd,

        [ValidateSet('Keyword', 'SpecialString')]
        [string]$As_value_type_json_cmd,

        [string]$As_value_expr_json_cmd,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isvalueregex_json_cmd,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileJsoncmdurlBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('jsoncmdurl') ) { $payload.Add('jsoncmdurl', $jsoncmdurl) }
            if ( $PSBoundParameters.ContainsKey('keyname_json_cmd') ) { $payload.Add('keyname_json_cmd', $keyname_json_cmd) }
            if ( $PSBoundParameters.ContainsKey('iskeyregex_json_cmd') ) { $payload.Add('iskeyregex_json_cmd', $iskeyregex_json_cmd) }
            if ( $PSBoundParameters.ContainsKey('as_value_type_json_cmd') ) { $payload.Add('as_value_type_json_cmd', $as_value_type_json_cmd) }
            if ( $PSBoundParameters.ContainsKey('as_value_expr_json_cmd') ) { $payload.Add('as_value_expr_json_cmd', $as_value_expr_json_cmd) }
            if ( $PSBoundParameters.ContainsKey('isvalueregex_json_cmd') ) { $payload.Add('isvalueregex_json_cmd', $isvalueregex_json_cmd) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_jsoncmdurl_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_jsoncmdurl_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileJsoncmdurlBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileJsoncmdurlBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileJsoncmdurlBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the jsoncmdurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Jsoncmdurl
        A regular expression that designates a URL on the Json CMD URL list for which Command injection violations are relaxed. Enclose URLs in double quotes to ensure preservation of any embedded spaces or non-alphanumeric characters.
    .PARAMETER Keyname_json_cmd
        An expression that designates a keyname on the JSON CMD URL for which Command injection violations are relaxed.
    .PARAMETER As_value_type_json_cmd
        Type of the relaxed JSON CMD key value.
        Possible values = Keyword, SpecialString
    .PARAMETER As_value_expr_json_cmd
        The JSON CMD key value expression.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileJsoncmdurlBinding -Name <string>
        An example how to delete appfwprofile_jsoncmdurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileJsoncmdurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsoncmdurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Jsoncmdurl,

        [string]$Keyname_json_cmd,

        [string]$As_value_type_json_cmd,

        [string]$As_value_expr_json_cmd,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileJsoncmdurlBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Jsoncmdurl') ) { $arguments.Add('jsoncmdurl', $Jsoncmdurl) }
            if ( $PSBoundParameters.ContainsKey('Keyname_json_cmd') ) { $arguments.Add('keyname_json_cmd', $Keyname_json_cmd) }
            if ( $PSBoundParameters.ContainsKey('As_value_type_json_cmd') ) { $arguments.Add('as_value_type_json_cmd', $As_value_type_json_cmd) }
            if ( $PSBoundParameters.ContainsKey('As_value_expr_json_cmd') ) { $arguments.Add('as_value_expr_json_cmd', $As_value_expr_json_cmd) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_jsoncmdurl_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileJsoncmdurlBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileJsoncmdurlBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the jsoncmdurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_jsoncmdurl_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_jsoncmdurl_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsoncmdurlBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsoncmdurlBinding -GetAll
        Get all appfwprofile_jsoncmdurl_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsoncmdurlBinding -Count
        Get the number of appfwprofile_jsoncmdurl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsoncmdurlBinding -name <string>
        Get appfwprofile_jsoncmdurl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsoncmdurlBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_jsoncmdurl_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileJsoncmdurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsoncmdurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileJsoncmdurlBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_jsoncmdurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsoncmdurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_jsoncmdurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsoncmdurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_jsoncmdurl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsoncmdurl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_jsoncmdurl_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsoncmdurl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_jsoncmdurl_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsoncmdurl_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileJsoncmdurlBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileJsondosurlBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the jsondosurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Jsondosurl
        The URL on which we need to enforce the specified JSON denial-of-service (JSONDoS) attack protections. An JSON DoS configuration consists of the following items: * URL. PCRE-format regular expression for the URL. * Maximum-document-length-check toggle. ON to enable this check, OFF to disable it. * Maximum document length. Positive integer representing the maximum length of the JSON document. * Maximum-container-depth-check toggle. ON to enable, OFF to disable. * Maximum container depth. Positive integer representing the maximum container depth of the JSON document. * Maximum-object-key-count-check toggle. ON to enable, OFF to disable. * Maximum object key count. Positive integer representing the maximum allowed number of keys in any of the JSON object. * Maximum-object-key-length-check toggle. ON to enable, OFF to disable. * Maximum object key length. Positive integer representing the maximum allowed length of key in any of the JSON object. * Maximum-array-value-count-check toggle. ON to enable, OFF to disable. * Maximum array value count. Positive integer representing the maximum allowed number of values in any of the JSON array. * Maximum-string-length-check toggle. ON to enable, OFF to disable. * Maximum string length. Positive integer representing the maximum length of string in JSON.
    .PARAMETER Jsonmaxcontainerdepthcheck
        State if JSON Max depth check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Jsonmaxcontainerdepth
        Maximum allowed nesting depth of JSON document. JSON allows one to nest the containers (object and array) in any order to any depth. This check protects against documents that have excessive depth of hierarchy.
          
          
        Maximum value = 127
    .PARAMETER Jsonmaxdocumentlengthcheck
        State if JSON Max document length check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Jsonmaxdocumentlength
        Maximum document length of JSON document, in bytes.
          
          
        Maximum value = 2147483647
    .PARAMETER Jsonmaxobjectkeycountcheck
        State if JSON Max object key count check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Jsonmaxobjectkeycount
        Maximum key count in the any of JSON object. This check protects against objects that have large number of keys.
          
          
        Maximum value = 2147483647
    .PARAMETER Jsonmaxobjectkeylengthcheck
        State if JSON Max object key length check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Jsonmaxobjectkeylength
        Maximum key length in the any of JSON object. This check protects against objects that have large keys.
          
          
        Maximum value = 2147483647
    .PARAMETER Jsonmaxarraylengthcheck
        State if JSON Max array value count check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Jsonmaxarraylength
        Maximum array length in the any of JSON object. This check protects against arrays having large lengths.
          
          
        Maximum value = 2147483647
    .PARAMETER Jsonmaxstringlengthcheck
        State if JSON Max string value count check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Jsonmaxstringlength
        Maximum string length in the JSON. This check protects against strings that have large length.
          
          
        Maximum value = 2147483647
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_jsondosurl_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileJsondosurlBinding -name <string>
        An example how to add appfwprofile_jsondosurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileJsondosurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsondosurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateLength(1, 2047)]
        [string]$Jsondosurl,

        [ValidateSet('ON', 'OFF')]
        [string]$Jsonmaxcontainerdepthcheck,

        [double]$Jsonmaxcontainerdepth = '5',

        [ValidateSet('ON', 'OFF')]
        [string]$Jsonmaxdocumentlengthcheck,

        [double]$Jsonmaxdocumentlength = '20000000',

        [ValidateSet('ON', 'OFF')]
        [string]$Jsonmaxobjectkeycountcheck,

        [double]$Jsonmaxobjectkeycount = '10000',

        [ValidateSet('ON', 'OFF')]
        [string]$Jsonmaxobjectkeylengthcheck,

        [double]$Jsonmaxobjectkeylength = '128',

        [ValidateSet('ON', 'OFF')]
        [string]$Jsonmaxarraylengthcheck,

        [double]$Jsonmaxarraylength = '10000',

        [ValidateSet('ON', 'OFF')]
        [string]$Jsonmaxstringlengthcheck,

        [double]$Jsonmaxstringlength = '1000000',

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileJsondosurlBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('jsondosurl') ) { $payload.Add('jsondosurl', $jsondosurl) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxcontainerdepthcheck') ) { $payload.Add('jsonmaxcontainerdepthcheck', $jsonmaxcontainerdepthcheck) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxcontainerdepth') ) { $payload.Add('jsonmaxcontainerdepth', $jsonmaxcontainerdepth) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxdocumentlengthcheck') ) { $payload.Add('jsonmaxdocumentlengthcheck', $jsonmaxdocumentlengthcheck) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxdocumentlength') ) { $payload.Add('jsonmaxdocumentlength', $jsonmaxdocumentlength) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxobjectkeycountcheck') ) { $payload.Add('jsonmaxobjectkeycountcheck', $jsonmaxobjectkeycountcheck) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxobjectkeycount') ) { $payload.Add('jsonmaxobjectkeycount', $jsonmaxobjectkeycount) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxobjectkeylengthcheck') ) { $payload.Add('jsonmaxobjectkeylengthcheck', $jsonmaxobjectkeylengthcheck) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxobjectkeylength') ) { $payload.Add('jsonmaxobjectkeylength', $jsonmaxobjectkeylength) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxarraylengthcheck') ) { $payload.Add('jsonmaxarraylengthcheck', $jsonmaxarraylengthcheck) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxarraylength') ) { $payload.Add('jsonmaxarraylength', $jsonmaxarraylength) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxstringlengthcheck') ) { $payload.Add('jsonmaxstringlengthcheck', $jsonmaxstringlengthcheck) }
            if ( $PSBoundParameters.ContainsKey('jsonmaxstringlength') ) { $payload.Add('jsonmaxstringlength', $jsonmaxstringlength) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_jsondosurl_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_jsondosurl_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileJsondosurlBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileJsondosurlBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileJsondosurlBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the jsondosurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Jsondosurl
        The URL on which we need to enforce the specified JSON denial-of-service (JSONDoS) attack protections. An JSON DoS configuration consists of the following items: * URL. PCRE-format regular expression for the URL. * Maximum-document-length-check toggle. ON to enable this check, OFF to disable it. * Maximum document length. Positive integer representing the maximum length of the JSON document. * Maximum-container-depth-check toggle. ON to enable, OFF to disable. * Maximum container depth. Positive integer representing the maximum container depth of the JSON document. * Maximum-object-key-count-check toggle. ON to enable, OFF to disable. * Maximum object key count. Positive integer representing the maximum allowed number of keys in any of the JSON object. * Maximum-object-key-length-check toggle. ON to enable, OFF to disable. * Maximum object key length. Positive integer representing the maximum allowed length of key in any of the JSON object. * Maximum-array-value-count-check toggle. ON to enable, OFF to disable. * Maximum array value count. Positive integer representing the maximum allowed number of values in any of the JSON array. * Maximum-string-length-check toggle. ON to enable, OFF to disable. * Maximum string length. Positive integer representing the maximum length of string in JSON.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileJsondosurlBinding -Name <string>
        An example how to delete appfwprofile_jsondosurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileJsondosurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsondosurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Jsondosurl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileJsondosurlBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Jsondosurl') ) { $arguments.Add('jsondosurl', $Jsondosurl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_jsondosurl_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileJsondosurlBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileJsondosurlBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the jsondosurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_jsondosurl_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_jsondosurl_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsondosurlBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsondosurlBinding -GetAll
        Get all appfwprofile_jsondosurl_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsondosurlBinding -Count
        Get the number of appfwprofile_jsondosurl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsondosurlBinding -name <string>
        Get appfwprofile_jsondosurl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsondosurlBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_jsondosurl_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileJsondosurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsondosurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileJsondosurlBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_jsondosurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsondosurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_jsondosurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsondosurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_jsondosurl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsondosurl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_jsondosurl_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsondosurl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_jsondosurl_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsondosurl_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileJsondosurlBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileJsonsqlurlBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the jsonsqlurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Jsonsqlurl
        A regular expression that designates a URL on the Json SQL URL list for which SQL violations are relaxed. Enclose URLs in double quotes to ensure preservation of any embedded spaces or non-alphanumeric characters.
    .PARAMETER Keyname_json_sql
        An expression that designates a keyname on the JSON SQL URL for which SQL injection violations are relaxed.
    .PARAMETER Iskeyregex_json_sql
        Is the key name a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER As_value_type_json_sql
        Type of the relaxed JSON SQL key value.
        Possible values = Keyword, SpecialString, Wildchar
    .PARAMETER As_value_expr_json_sql
        The JSON SQL key value expression.
    .PARAMETER Isvalueregex_json_sql
        Is the JSON SQL key value a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_jsonsqlurl_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileJsonsqlurlBinding -name <string>
        An example how to add appfwprofile_jsonsqlurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileJsonsqlurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsonsqlurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateLength(1, 2047)]
        [string]$Jsonsqlurl,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Keyname_json_sql,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Iskeyregex_json_sql,

        [ValidateSet('Keyword', 'SpecialString', 'Wildchar')]
        [string]$As_value_type_json_sql,

        [string]$As_value_expr_json_sql,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isvalueregex_json_sql,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileJsonsqlurlBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('jsonsqlurl') ) { $payload.Add('jsonsqlurl', $jsonsqlurl) }
            if ( $PSBoundParameters.ContainsKey('keyname_json_sql') ) { $payload.Add('keyname_json_sql', $keyname_json_sql) }
            if ( $PSBoundParameters.ContainsKey('iskeyregex_json_sql') ) { $payload.Add('iskeyregex_json_sql', $iskeyregex_json_sql) }
            if ( $PSBoundParameters.ContainsKey('as_value_type_json_sql') ) { $payload.Add('as_value_type_json_sql', $as_value_type_json_sql) }
            if ( $PSBoundParameters.ContainsKey('as_value_expr_json_sql') ) { $payload.Add('as_value_expr_json_sql', $as_value_expr_json_sql) }
            if ( $PSBoundParameters.ContainsKey('isvalueregex_json_sql') ) { $payload.Add('isvalueregex_json_sql', $isvalueregex_json_sql) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_jsonsqlurl_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_jsonsqlurl_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileJsonsqlurlBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileJsonsqlurlBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileJsonsqlurlBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the jsonsqlurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Jsonsqlurl
        A regular expression that designates a URL on the Json SQL URL list for which SQL violations are relaxed. Enclose URLs in double quotes to ensure preservation of any embedded spaces or non-alphanumeric characters.
    .PARAMETER Keyname_json_sql
        An expression that designates a keyname on the JSON SQL URL for which SQL injection violations are relaxed.
    .PARAMETER As_value_type_json_sql
        Type of the relaxed JSON SQL key value.
        Possible values = Keyword, SpecialString, Wildchar
    .PARAMETER As_value_expr_json_sql
        The JSON SQL key value expression.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileJsonsqlurlBinding -Name <string>
        An example how to delete appfwprofile_jsonsqlurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileJsonsqlurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsonsqlurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Jsonsqlurl,

        [string]$Keyname_json_sql,

        [string]$As_value_type_json_sql,

        [string]$As_value_expr_json_sql,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileJsonsqlurlBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Jsonsqlurl') ) { $arguments.Add('jsonsqlurl', $Jsonsqlurl) }
            if ( $PSBoundParameters.ContainsKey('Keyname_json_sql') ) { $arguments.Add('keyname_json_sql', $Keyname_json_sql) }
            if ( $PSBoundParameters.ContainsKey('As_value_type_json_sql') ) { $arguments.Add('as_value_type_json_sql', $As_value_type_json_sql) }
            if ( $PSBoundParameters.ContainsKey('As_value_expr_json_sql') ) { $arguments.Add('as_value_expr_json_sql', $As_value_expr_json_sql) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_jsonsqlurl_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileJsonsqlurlBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileJsonsqlurlBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the jsonsqlurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_jsonsqlurl_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_jsonsqlurl_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonsqlurlBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonsqlurlBinding -GetAll
        Get all appfwprofile_jsonsqlurl_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonsqlurlBinding -Count
        Get the number of appfwprofile_jsonsqlurl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonsqlurlBinding -name <string>
        Get appfwprofile_jsonsqlurl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonsqlurlBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_jsonsqlurl_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileJsonsqlurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsonsqlurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileJsonsqlurlBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_jsonsqlurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonsqlurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_jsonsqlurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonsqlurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_jsonsqlurl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonsqlurl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_jsonsqlurl_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonsqlurl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_jsonsqlurl_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonsqlurl_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileJsonsqlurlBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileJsonxssurlBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the jsonxssurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Jsonxssurl
        A regular expression that designates a URL on the Json XSS URL list for which XSS violations are relaxed. Enclose URLs in double quotes to ensure preservation of any embedded spaces or non-alphanumeric characters.
    .PARAMETER Keyname_json_xss
        An expression that designates a keyname on the JSON XSS URL for which XSS injection violations are relaxed.
    .PARAMETER Iskeyregex_json_xss
        Is the key name a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER As_value_type_json_xss
        Type of the relaxed JSON XSS key value.
        Possible values = Tag, Attribute, Pattern
    .PARAMETER As_value_expr_json_xss
        The JSON XSS key value expression.
    .PARAMETER Isvalueregex_json_xss
        Is the JSON XSS key value a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_jsonxssurl_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileJsonxssurlBinding -name <string>
        An example how to add appfwprofile_jsonxssurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileJsonxssurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsonxssurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateLength(1, 2047)]
        [string]$Jsonxssurl,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Keyname_json_xss,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Iskeyregex_json_xss,

        [ValidateSet('Tag', 'Attribute', 'Pattern')]
        [string]$As_value_type_json_xss,

        [string]$As_value_expr_json_xss,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isvalueregex_json_xss,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileJsonxssurlBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('jsonxssurl') ) { $payload.Add('jsonxssurl', $jsonxssurl) }
            if ( $PSBoundParameters.ContainsKey('keyname_json_xss') ) { $payload.Add('keyname_json_xss', $keyname_json_xss) }
            if ( $PSBoundParameters.ContainsKey('iskeyregex_json_xss') ) { $payload.Add('iskeyregex_json_xss', $iskeyregex_json_xss) }
            if ( $PSBoundParameters.ContainsKey('as_value_type_json_xss') ) { $payload.Add('as_value_type_json_xss', $as_value_type_json_xss) }
            if ( $PSBoundParameters.ContainsKey('as_value_expr_json_xss') ) { $payload.Add('as_value_expr_json_xss', $as_value_expr_json_xss) }
            if ( $PSBoundParameters.ContainsKey('isvalueregex_json_xss') ) { $payload.Add('isvalueregex_json_xss', $isvalueregex_json_xss) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_jsonxssurl_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_jsonxssurl_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileJsonxssurlBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileJsonxssurlBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileJsonxssurlBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the jsonxssurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Jsonxssurl
        A regular expression that designates a URL on the Json XSS URL list for which XSS violations are relaxed. Enclose URLs in double quotes to ensure preservation of any embedded spaces or non-alphanumeric characters.
    .PARAMETER Keyname_json_xss
        An expression that designates a keyname on the JSON XSS URL for which XSS injection violations are relaxed.
    .PARAMETER As_value_type_json_xss
        Type of the relaxed JSON XSS key value.
        Possible values = Tag, Attribute, Pattern
    .PARAMETER As_value_expr_json_xss
        The JSON XSS key value expression.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileJsonxssurlBinding -Name <string>
        An example how to delete appfwprofile_jsonxssurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileJsonxssurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsonxssurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Jsonxssurl,

        [string]$Keyname_json_xss,

        [string]$As_value_type_json_xss,

        [string]$As_value_expr_json_xss,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileJsonxssurlBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Jsonxssurl') ) { $arguments.Add('jsonxssurl', $Jsonxssurl) }
            if ( $PSBoundParameters.ContainsKey('Keyname_json_xss') ) { $arguments.Add('keyname_json_xss', $Keyname_json_xss) }
            if ( $PSBoundParameters.ContainsKey('As_value_type_json_xss') ) { $arguments.Add('as_value_type_json_xss', $As_value_type_json_xss) }
            if ( $PSBoundParameters.ContainsKey('As_value_expr_json_xss') ) { $arguments.Add('as_value_expr_json_xss', $As_value_expr_json_xss) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_jsonxssurl_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileJsonxssurlBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileJsonxssurlBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the jsonxssurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_jsonxssurl_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_jsonxssurl_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonxssurlBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonxssurlBinding -GetAll
        Get all appfwprofile_jsonxssurl_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonxssurlBinding -Count
        Get the number of appfwprofile_jsonxssurl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonxssurlBinding -name <string>
        Get appfwprofile_jsonxssurl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileJsonxssurlBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_jsonxssurl_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileJsonxssurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_jsonxssurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileJsonxssurlBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_jsonxssurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonxssurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_jsonxssurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonxssurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_jsonxssurl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonxssurl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_jsonxssurl_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonxssurl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_jsonxssurl_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_jsonxssurl_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileJsonxssurlBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileLogexpressionBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the logexpression that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Logexpression
        Name of LogExpression object.
    .PARAMETER As_logexpression
        LogExpression to log when violation happened on appfw profile.
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_logexpression_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileLogexpressionBinding -name <string>
        An example how to add appfwprofile_logexpression_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileLogexpressionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_logexpression_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Logexpression,

        [string]$As_logexpression,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileLogexpressionBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('logexpression') ) { $payload.Add('logexpression', $logexpression) }
            if ( $PSBoundParameters.ContainsKey('as_logexpression') ) { $payload.Add('as_logexpression', $as_logexpression) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_logexpression_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_logexpression_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileLogexpressionBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileLogexpressionBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileLogexpressionBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the logexpression that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Logexpression
        Name of LogExpression object.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileLogexpressionBinding -Name <string>
        An example how to delete appfwprofile_logexpression_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileLogexpressionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_logexpression_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Logexpression,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileLogexpressionBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Logexpression') ) { $arguments.Add('logexpression', $Logexpression) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_logexpression_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileLogexpressionBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileLogexpressionBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the logexpression that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_logexpression_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_logexpression_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileLogexpressionBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileLogexpressionBinding -GetAll
        Get all appfwprofile_logexpression_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileLogexpressionBinding -Count
        Get the number of appfwprofile_logexpression_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileLogexpressionBinding -name <string>
        Get appfwprofile_logexpression_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileLogexpressionBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_logexpression_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileLogexpressionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_logexpression_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileLogexpressionBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_logexpression_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_logexpression_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_logexpression_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_logexpression_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_logexpression_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_logexpression_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_logexpression_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_logexpression_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_logexpression_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_logexpression_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileLogexpressionBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileRestvalidationBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the restvalidation that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Restvalidation
        Exempt REST endpoints or any other URLs matching the given pattern from the API schema validation check. Example: GET:/v1/bookstore/viewbooks.
    .PARAMETER Rest_validation_action
        Action to be taken for traffic matching the configured relaxation rule.
          
        Possible values = log, none
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_restvalidation_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileRestvalidationBinding -name <string>
        An example how to add appfwprofile_restvalidation_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileRestvalidationBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_restvalidation_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Restvalidation,

        [ValidateSet('log', 'none')]
        [string]$Rest_validation_action = 'none',

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileRestvalidationBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('restvalidation') ) { $payload.Add('restvalidation', $restvalidation) }
            if ( $PSBoundParameters.ContainsKey('rest_validation_action') ) { $payload.Add('rest_validation_action', $rest_validation_action) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_restvalidation_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_restvalidation_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileRestvalidationBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileRestvalidationBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileRestvalidationBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the restvalidation that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Restvalidation
        Exempt REST endpoints or any other URLs matching the given pattern from the API schema validation check. Example: GET:/v1/bookstore/viewbooks.
    .PARAMETER Rest_validation_action
        Action to be taken for traffic matching the configured relaxation rule.
          
        Possible values = log, none
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileRestvalidationBinding -Name <string>
        An example how to delete appfwprofile_restvalidation_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileRestvalidationBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_restvalidation_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Restvalidation,

        [string]$Rest_validation_action,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileRestvalidationBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Restvalidation') ) { $arguments.Add('restvalidation', $Restvalidation) }
            if ( $PSBoundParameters.ContainsKey('Rest_validation_action') ) { $arguments.Add('rest_validation_action', $Rest_validation_action) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_restvalidation_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileRestvalidationBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileRestvalidationBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the restvalidation that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_restvalidation_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_restvalidation_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileRestvalidationBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileRestvalidationBinding -GetAll
        Get all appfwprofile_restvalidation_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileRestvalidationBinding -Count
        Get the number of appfwprofile_restvalidation_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileRestvalidationBinding -name <string>
        Get appfwprofile_restvalidation_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileRestvalidationBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_restvalidation_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileRestvalidationBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_restvalidation_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileRestvalidationBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_restvalidation_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_restvalidation_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_restvalidation_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_restvalidation_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_restvalidation_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_restvalidation_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_restvalidation_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_restvalidation_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_restvalidation_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_restvalidation_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileRestvalidationBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileSafeobjectBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the safeobject that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Safeobject
        Name of the Safe Object.
    .PARAMETER As_expression
        A regular expression that defines the Safe Object.
    .PARAMETER Maxmatchlength
        Maximum match length for a Safe Object expression.
    .PARAMETER Action
        Safe Object action types. (BLOCK | LOG | STATS | NONE).
        Possible values = none, block, log, remove, stats, xout
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_safeobject_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileSafeobjectBinding -name <string>
        An example how to add appfwprofile_safeobject_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileSafeobjectBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_safeobject_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Safeobject,

        [string]$As_expression,

        [double]$Maxmatchlength,

        [ValidateSet('none', 'block', 'log', 'remove', 'stats', 'xout')]
        [string[]]$Action,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileSafeobjectBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('safeobject') ) { $payload.Add('safeobject', $safeobject) }
            if ( $PSBoundParameters.ContainsKey('as_expression') ) { $payload.Add('as_expression', $as_expression) }
            if ( $PSBoundParameters.ContainsKey('maxmatchlength') ) { $payload.Add('maxmatchlength', $maxmatchlength) }
            if ( $PSBoundParameters.ContainsKey('action') ) { $payload.Add('action', $action) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_safeobject_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_safeobject_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileSafeobjectBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileSafeobjectBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileSafeobjectBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the safeobject that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Safeobject
        Name of the Safe Object.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileSafeobjectBinding -Name <string>
        An example how to delete appfwprofile_safeobject_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileSafeobjectBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_safeobject_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Safeobject,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileSafeobjectBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Safeobject') ) { $arguments.Add('safeobject', $Safeobject) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_safeobject_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileSafeobjectBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileSafeobjectBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the safeobject that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_safeobject_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_safeobject_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileSafeobjectBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileSafeobjectBinding -GetAll
        Get all appfwprofile_safeobject_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileSafeobjectBinding -Count
        Get the number of appfwprofile_safeobject_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileSafeobjectBinding -name <string>
        Get appfwprofile_safeobject_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileSafeobjectBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_safeobject_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileSafeobjectBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_safeobject_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileSafeobjectBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_safeobject_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_safeobject_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_safeobject_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_safeobject_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_safeobject_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_safeobject_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_safeobject_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_safeobject_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_safeobject_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_safeobject_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileSafeobjectBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileSqlinjectionBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the sqlinjection that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Sqlinjection
        The web form field name.
    .PARAMETER Formactionurl_sql
        The web form action URL.
    .PARAMETER Isregex_sql
        Is the web form field name a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER As_scan_location_sql
        Location of SQL injection exception - form field, header or cookie.
        Possible values = FORMFIELD, HEADER, COOKIE
    .PARAMETER As_value_type_sql
        The web form value type.
        Possible values = Keyword, SpecialString, Wildchar
    .PARAMETER As_value_expr_sql
        The web form value expression.
    .PARAMETER Isvalueregex_sql
        Is the web form field value a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_sqlinjection_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileSqlinjectionBinding -name <string>
        An example how to add appfwprofile_sqlinjection_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileSqlinjectionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_sqlinjection_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Sqlinjection,

        [string]$Formactionurl_sql,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex_sql,

        [ValidateSet('FORMFIELD', 'HEADER', 'COOKIE')]
        [string]$As_scan_location_sql,

        [ValidateSet('Keyword', 'SpecialString', 'Wildchar')]
        [string]$As_value_type_sql,

        [string]$As_value_expr_sql,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isvalueregex_sql,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileSqlinjectionBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('sqlinjection') ) { $payload.Add('sqlinjection', $sqlinjection) }
            if ( $PSBoundParameters.ContainsKey('formactionurl_sql') ) { $payload.Add('formactionurl_sql', $formactionurl_sql) }
            if ( $PSBoundParameters.ContainsKey('isregex_sql') ) { $payload.Add('isregex_sql', $isregex_sql) }
            if ( $PSBoundParameters.ContainsKey('as_scan_location_sql') ) { $payload.Add('as_scan_location_sql', $as_scan_location_sql) }
            if ( $PSBoundParameters.ContainsKey('as_value_type_sql') ) { $payload.Add('as_value_type_sql', $as_value_type_sql) }
            if ( $PSBoundParameters.ContainsKey('as_value_expr_sql') ) { $payload.Add('as_value_expr_sql', $as_value_expr_sql) }
            if ( $PSBoundParameters.ContainsKey('isvalueregex_sql') ) { $payload.Add('isvalueregex_sql', $isvalueregex_sql) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_sqlinjection_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_sqlinjection_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileSqlinjectionBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileSqlinjectionBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileSqlinjectionBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the sqlinjection that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Sqlinjection
        The web form field name.
    .PARAMETER Formactionurl_sql
        The web form action URL.
    .PARAMETER As_scan_location_sql
        Location of SQL injection exception - form field, header or cookie.
        Possible values = FORMFIELD, HEADER, COOKIE
    .PARAMETER As_value_type_sql
        The web form value type.
        Possible values = Keyword, SpecialString, Wildchar
    .PARAMETER As_value_expr_sql
        The web form value expression.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileSqlinjectionBinding -Name <string>
        An example how to delete appfwprofile_sqlinjection_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileSqlinjectionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_sqlinjection_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Sqlinjection,

        [string]$Formactionurl_sql,

        [string]$As_scan_location_sql,

        [string]$As_value_type_sql,

        [string]$As_value_expr_sql,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileSqlinjectionBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Sqlinjection') ) { $arguments.Add('sqlinjection', $Sqlinjection) }
            if ( $PSBoundParameters.ContainsKey('Formactionurl_sql') ) { $arguments.Add('formactionurl_sql', $Formactionurl_sql) }
            if ( $PSBoundParameters.ContainsKey('As_scan_location_sql') ) { $arguments.Add('as_scan_location_sql', $As_scan_location_sql) }
            if ( $PSBoundParameters.ContainsKey('As_value_type_sql') ) { $arguments.Add('as_value_type_sql', $As_value_type_sql) }
            if ( $PSBoundParameters.ContainsKey('As_value_expr_sql') ) { $arguments.Add('as_value_expr_sql', $As_value_expr_sql) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_sqlinjection_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileSqlinjectionBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileSqlinjectionBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the sqlinjection that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_sqlinjection_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_sqlinjection_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileSqlinjectionBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileSqlinjectionBinding -GetAll
        Get all appfwprofile_sqlinjection_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileSqlinjectionBinding -Count
        Get the number of appfwprofile_sqlinjection_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileSqlinjectionBinding -name <string>
        Get appfwprofile_sqlinjection_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileSqlinjectionBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_sqlinjection_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileSqlinjectionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_sqlinjection_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileSqlinjectionBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_sqlinjection_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_sqlinjection_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_sqlinjection_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_sqlinjection_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_sqlinjection_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_sqlinjection_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_sqlinjection_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_sqlinjection_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_sqlinjection_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_sqlinjection_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileSqlinjectionBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileStarturlBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the starturl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Starturl
        A regular expression that designates a URL on the Start URL list.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_starturl_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileStarturlBinding -name <string>
        An example how to add appfwprofile_starturl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileStarturlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_starturl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Starturl,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileStarturlBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('starturl') ) { $payload.Add('starturl', $starturl) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_starturl_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_starturl_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileStarturlBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileStarturlBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileStarturlBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the starturl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Starturl
        A regular expression that designates a URL on the Start URL list.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileStarturlBinding -Name <string>
        An example how to delete appfwprofile_starturl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileStarturlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_starturl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Starturl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileStarturlBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Starturl') ) { $arguments.Add('starturl', $Starturl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_starturl_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileStarturlBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileStarturlBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the starturl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_starturl_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_starturl_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileStarturlBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileStarturlBinding -GetAll
        Get all appfwprofile_starturl_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileStarturlBinding -Count
        Get the number of appfwprofile_starturl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileStarturlBinding -name <string>
        Get appfwprofile_starturl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileStarturlBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_starturl_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileStarturlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_starturl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileStarturlBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_starturl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_starturl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_starturl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_starturl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_starturl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_starturl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_starturl_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_starturl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_starturl_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_starturl_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileStarturlBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileTrustedlearningclientsBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the trustedlearningclients that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Trustedlearningclients
        Specify trusted host/network IP.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_trustedlearningclients_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileTrustedlearningclientsBinding -name <string>
        An example how to add appfwprofile_trustedlearningclients_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileTrustedlearningclientsBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_trustedlearningclients_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Trustedlearningclients,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileTrustedlearningclientsBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('trustedlearningclients') ) { $payload.Add('trustedlearningclients', $trustedlearningclients) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_trustedlearningclients_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_trustedlearningclients_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileTrustedlearningclientsBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileTrustedlearningclientsBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileTrustedlearningclientsBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the trustedlearningclients that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Trustedlearningclients
        Specify trusted host/network IP.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileTrustedlearningclientsBinding -Name <string>
        An example how to delete appfwprofile_trustedlearningclients_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileTrustedlearningclientsBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_trustedlearningclients_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Trustedlearningclients,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileTrustedlearningclientsBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Trustedlearningclients') ) { $arguments.Add('trustedlearningclients', $Trustedlearningclients) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_trustedlearningclients_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileTrustedlearningclientsBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileTrustedlearningclientsBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the trustedlearningclients that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_trustedlearningclients_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_trustedlearningclients_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileTrustedlearningclientsBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileTrustedlearningclientsBinding -GetAll
        Get all appfwprofile_trustedlearningclients_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileTrustedlearningclientsBinding -Count
        Get the number of appfwprofile_trustedlearningclients_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileTrustedlearningclientsBinding -name <string>
        Get appfwprofile_trustedlearningclients_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileTrustedlearningclientsBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_trustedlearningclients_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileTrustedlearningclientsBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_trustedlearningclients_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileTrustedlearningclientsBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_trustedlearningclients_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_trustedlearningclients_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_trustedlearningclients_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_trustedlearningclients_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_trustedlearningclients_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_trustedlearningclients_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_trustedlearningclients_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_trustedlearningclients_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_trustedlearningclients_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_trustedlearningclients_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileTrustedlearningclientsBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileXmlattachmenturlBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmlattachmenturl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Xmlattachmenturl
        XML attachment URL regular expression length.
    .PARAMETER Xmlmaxattachmentsizecheck
        State if XML Max attachment size Check is ON or OFF. Protects against XML requests with large attachment data.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxattachmentsize
        Specify maximum attachment size.
          
        Maximum value = 1000000000
    .PARAMETER Xmlattachmentcontenttypecheck
        State if XML attachment content-type check is ON or OFF. Protects against XML requests with illegal attachments.
        Possible values = ON, OFF
    .PARAMETER Xmlattachmentcontenttype
        Specify content-type regular expression.
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_xmlattachmenturl_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileXmlattachmenturlBinding -name <string>
        An example how to add appfwprofile_xmlattachmenturl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileXmlattachmenturlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlattachmenturl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Xmlattachmenturl,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxattachmentsizecheck,

        [double]$Xmlmaxattachmentsize,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlattachmentcontenttypecheck,

        [string]$Xmlattachmentcontenttype,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileXmlattachmenturlBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('xmlattachmenturl') ) { $payload.Add('xmlattachmenturl', $xmlattachmenturl) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxattachmentsizecheck') ) { $payload.Add('xmlmaxattachmentsizecheck', $xmlmaxattachmentsizecheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxattachmentsize') ) { $payload.Add('xmlmaxattachmentsize', $xmlmaxattachmentsize) }
            if ( $PSBoundParameters.ContainsKey('xmlattachmentcontenttypecheck') ) { $payload.Add('xmlattachmentcontenttypecheck', $xmlattachmentcontenttypecheck) }
            if ( $PSBoundParameters.ContainsKey('xmlattachmentcontenttype') ) { $payload.Add('xmlattachmentcontenttype', $xmlattachmentcontenttype) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_xmlattachmenturl_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_xmlattachmenturl_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileXmlattachmenturlBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileXmlattachmenturlBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileXmlattachmenturlBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmlattachmenturl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Xmlattachmenturl
        XML attachment URL regular expression length.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileXmlattachmenturlBinding -Name <string>
        An example how to delete appfwprofile_xmlattachmenturl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileXmlattachmenturlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlattachmenturl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Xmlattachmenturl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmlattachmenturlBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Xmlattachmenturl') ) { $arguments.Add('xmlattachmenturl', $Xmlattachmenturl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_xmlattachmenturl_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmlattachmenturlBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileXmlattachmenturlBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the xmlattachmenturl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_xmlattachmenturl_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_xmlattachmenturl_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlattachmenturlBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlattachmenturlBinding -GetAll
        Get all appfwprofile_xmlattachmenturl_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlattachmenturlBinding -Count
        Get the number of appfwprofile_xmlattachmenturl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlattachmenturlBinding -name <string>
        Get appfwprofile_xmlattachmenturl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlattachmenturlBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_xmlattachmenturl_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileXmlattachmenturlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlattachmenturl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileXmlattachmenturlBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_xmlattachmenturl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlattachmenturl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_xmlattachmenturl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlattachmenturl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_xmlattachmenturl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlattachmenturl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_xmlattachmenturl_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlattachmenturl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_xmlattachmenturl_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlattachmenturl_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileXmlattachmenturlBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileXmldosurlBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmldosurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Xmldosurl
        XML DoS URL regular expression length.
    .PARAMETER Xmlmaxelementdepthcheck
        State if XML Max element depth check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxelementdepth
        Maximum nesting (depth) of XML elements. This check protects against documents that have excessive hierarchy depths.
    .PARAMETER Xmlmaxelementnamelengthcheck
        State if XML Max element name length check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxelementnamelength
        Specify the longest name of any element (including the expanded namespace) to protect against overflow attacks.
    .PARAMETER Xmlmaxelementscheck
        State if XML Max elements check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxelements
        Specify the maximum number of XML elements allowed. Protects against overflow attacks.
    .PARAMETER Xmlmaxelementchildrencheck
        State if XML Max element children check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxelementchildren
        Specify the maximum number of children allowed per XML element. Protects against overflow attacks.
    .PARAMETER Xmlmaxnodescheck
        State if XML Max nodes check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxnodes
        Specify the maximum number of XML nodes. Protects against overflow attacks.
    .PARAMETER Xmlmaxattributescheck
        State if XML Max attributes check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxattributes
        Specify maximum number of attributes per XML element. Protects against overflow attacks.
    .PARAMETER Xmlmaxattributenamelengthcheck
        State if XML Max attribute name length check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxattributenamelength
        Specify the longest name of any XML attribute. Protects against overflow attacks.
    .PARAMETER Xmlmaxattributevaluelengthcheck
        State if XML Max atribute value length is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxattributevaluelength
        Specify the longest value of any XML attribute. Protects against overflow attacks.
    .PARAMETER Xmlmaxchardatalengthcheck
        State if XML Max CDATA length check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxchardatalength
        Specify the maximum size of CDATA. Protects against overflow attacks and large quantities of unparsed data within XML messages.
          
        Maximum value = 1000000000
    .PARAMETER Xmlmaxfilesizecheck
        State if XML Max file size check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxfilesize
        Specify the maximum size of XML messages. Protects against overflow attacks.
          
        Maximum value = 1000000000
    .PARAMETER Xmlminfilesizecheck
        State if XML Min file size check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlminfilesize
        Enforces minimum message size.
          
        Maximum value = 1000000000
    .PARAMETER Xmlblockpi
        State if XML Block PI is ON or OFF. Protects resources from denial of service attacks as SOAP messages cannot have processing instructions (PI) in messages.
        Possible values = ON, OFF
    .PARAMETER Xmlblockdtd
        State if XML DTD is ON or OFF. Protects against recursive Document Type Declaration (DTD) entity expansion attacks. Also, SOAP messages cannot have DTDs in messages. .
        Possible values = ON, OFF
    .PARAMETER Xmlblockexternalentities
        State if XML Block External Entities Check is ON or OFF. Protects against XML External Entity (XXE) attacks that force applications to parse untrusted external entities (sources) in XML documents.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxentityexpansionscheck
        State if XML Max Entity Expansions Check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxentityexpansions
        Specify maximum allowed number of entity expansions. Protects aganist Entity Expansion Attack.
    .PARAMETER Xmlmaxentityexpansiondepthcheck
        State if XML Max Entity Expansions Depth Check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxentityexpansiondepth
        Specify maximum entity expansion depth. Protects aganist Entity Expansion Attack.
    .PARAMETER Xmlmaxnamespacescheck
        State if XML Max namespaces check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxnamespaces
        Specify maximum number of active namespaces. Protects against overflow attacks.
    .PARAMETER Xmlmaxnamespaceurilengthcheck
        State if XML Max namespace URI length check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxnamespaceurilength
        Specify the longest URI of any XML namespace. Protects against overflow attacks.
    .PARAMETER Xmlsoaparraycheck
        State if XML SOAP Array check is ON or OFF.
        Possible values = ON, OFF
    .PARAMETER Xmlmaxsoaparraysize
        XML Max Total SOAP Array Size. Protects against SOAP Array Abuse attack.
          
        Maximum value = 1000000000
    .PARAMETER Xmlmaxsoaparrayrank
        XML Max Individual SOAP Array Rank. This is the dimension of the SOAP array.
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_xmldosurl_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileXmldosurlBinding -name <string>
        An example how to add appfwprofile_xmldosurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileXmldosurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmldosurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Xmldosurl,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxelementdepthcheck,

        [double]$Xmlmaxelementdepth,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxelementnamelengthcheck,

        [double]$Xmlmaxelementnamelength,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxelementscheck,

        [double]$Xmlmaxelements,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxelementchildrencheck,

        [double]$Xmlmaxelementchildren,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxnodescheck,

        [double]$Xmlmaxnodes,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxattributescheck,

        [double]$Xmlmaxattributes,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxattributenamelengthcheck,

        [double]$Xmlmaxattributenamelength,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxattributevaluelengthcheck,

        [double]$Xmlmaxattributevaluelength,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxchardatalengthcheck,

        [double]$Xmlmaxchardatalength,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxfilesizecheck,

        [double]$Xmlmaxfilesize,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlminfilesizecheck,

        [double]$Xmlminfilesize,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlblockpi,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlblockdtd,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlblockexternalentities,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxentityexpansionscheck,

        [double]$Xmlmaxentityexpansions,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxentityexpansiondepthcheck,

        [double]$Xmlmaxentityexpansiondepth,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxnamespacescheck,

        [double]$Xmlmaxnamespaces,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlmaxnamespaceurilengthcheck,

        [double]$Xmlmaxnamespaceurilength,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlsoaparraycheck,

        [double]$Xmlmaxsoaparraysize,

        [double]$Xmlmaxsoaparrayrank,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileXmldosurlBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('xmldosurl') ) { $payload.Add('xmldosurl', $xmldosurl) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxelementdepthcheck') ) { $payload.Add('xmlmaxelementdepthcheck', $xmlmaxelementdepthcheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxelementdepth') ) { $payload.Add('xmlmaxelementdepth', $xmlmaxelementdepth) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxelementnamelengthcheck') ) { $payload.Add('xmlmaxelementnamelengthcheck', $xmlmaxelementnamelengthcheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxelementnamelength') ) { $payload.Add('xmlmaxelementnamelength', $xmlmaxelementnamelength) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxelementscheck') ) { $payload.Add('xmlmaxelementscheck', $xmlmaxelementscheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxelements') ) { $payload.Add('xmlmaxelements', $xmlmaxelements) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxelementchildrencheck') ) { $payload.Add('xmlmaxelementchildrencheck', $xmlmaxelementchildrencheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxelementchildren') ) { $payload.Add('xmlmaxelementchildren', $xmlmaxelementchildren) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxnodescheck') ) { $payload.Add('xmlmaxnodescheck', $xmlmaxnodescheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxnodes') ) { $payload.Add('xmlmaxnodes', $xmlmaxnodes) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxattributescheck') ) { $payload.Add('xmlmaxattributescheck', $xmlmaxattributescheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxattributes') ) { $payload.Add('xmlmaxattributes', $xmlmaxattributes) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxattributenamelengthcheck') ) { $payload.Add('xmlmaxattributenamelengthcheck', $xmlmaxattributenamelengthcheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxattributenamelength') ) { $payload.Add('xmlmaxattributenamelength', $xmlmaxattributenamelength) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxattributevaluelengthcheck') ) { $payload.Add('xmlmaxattributevaluelengthcheck', $xmlmaxattributevaluelengthcheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxattributevaluelength') ) { $payload.Add('xmlmaxattributevaluelength', $xmlmaxattributevaluelength) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxchardatalengthcheck') ) { $payload.Add('xmlmaxchardatalengthcheck', $xmlmaxchardatalengthcheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxchardatalength') ) { $payload.Add('xmlmaxchardatalength', $xmlmaxchardatalength) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxfilesizecheck') ) { $payload.Add('xmlmaxfilesizecheck', $xmlmaxfilesizecheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxfilesize') ) { $payload.Add('xmlmaxfilesize', $xmlmaxfilesize) }
            if ( $PSBoundParameters.ContainsKey('xmlminfilesizecheck') ) { $payload.Add('xmlminfilesizecheck', $xmlminfilesizecheck) }
            if ( $PSBoundParameters.ContainsKey('xmlminfilesize') ) { $payload.Add('xmlminfilesize', $xmlminfilesize) }
            if ( $PSBoundParameters.ContainsKey('xmlblockpi') ) { $payload.Add('xmlblockpi', $xmlblockpi) }
            if ( $PSBoundParameters.ContainsKey('xmlblockdtd') ) { $payload.Add('xmlblockdtd', $xmlblockdtd) }
            if ( $PSBoundParameters.ContainsKey('xmlblockexternalentities') ) { $payload.Add('xmlblockexternalentities', $xmlblockexternalentities) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxentityexpansionscheck') ) { $payload.Add('xmlmaxentityexpansionscheck', $xmlmaxentityexpansionscheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxentityexpansions') ) { $payload.Add('xmlmaxentityexpansions', $xmlmaxentityexpansions) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxentityexpansiondepthcheck') ) { $payload.Add('xmlmaxentityexpansiondepthcheck', $xmlmaxentityexpansiondepthcheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxentityexpansiondepth') ) { $payload.Add('xmlmaxentityexpansiondepth', $xmlmaxentityexpansiondepth) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxnamespacescheck') ) { $payload.Add('xmlmaxnamespacescheck', $xmlmaxnamespacescheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxnamespaces') ) { $payload.Add('xmlmaxnamespaces', $xmlmaxnamespaces) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxnamespaceurilengthcheck') ) { $payload.Add('xmlmaxnamespaceurilengthcheck', $xmlmaxnamespaceurilengthcheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxnamespaceurilength') ) { $payload.Add('xmlmaxnamespaceurilength', $xmlmaxnamespaceurilength) }
            if ( $PSBoundParameters.ContainsKey('xmlsoaparraycheck') ) { $payload.Add('xmlsoaparraycheck', $xmlsoaparraycheck) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxsoaparraysize') ) { $payload.Add('xmlmaxsoaparraysize', $xmlmaxsoaparraysize) }
            if ( $PSBoundParameters.ContainsKey('xmlmaxsoaparrayrank') ) { $payload.Add('xmlmaxsoaparrayrank', $xmlmaxsoaparrayrank) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_xmldosurl_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_xmldosurl_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileXmldosurlBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileXmldosurlBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileXmldosurlBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmldosurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Xmldosurl
        XML DoS URL regular expression length.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileXmldosurlBinding -Name <string>
        An example how to delete appfwprofile_xmldosurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileXmldosurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmldosurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Xmldosurl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmldosurlBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Xmldosurl') ) { $arguments.Add('xmldosurl', $Xmldosurl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_xmldosurl_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmldosurlBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileXmldosurlBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the xmldosurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_xmldosurl_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_xmldosurl_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmldosurlBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmldosurlBinding -GetAll
        Get all appfwprofile_xmldosurl_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmldosurlBinding -Count
        Get the number of appfwprofile_xmldosurl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmldosurlBinding -name <string>
        Get appfwprofile_xmldosurl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmldosurlBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_xmldosurl_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileXmldosurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmldosurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileXmldosurlBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_xmldosurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmldosurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_xmldosurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmldosurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_xmldosurl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmldosurl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_xmldosurl_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmldosurl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_xmldosurl_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmldosurl_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileXmldosurlBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileXmlsqlinjectionBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmlsqlinjection that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Xmlsqlinjection
        Exempt the specified URL from the XML SQL injection check. An XML SQL injection exemption (relaxation) consists of the following items: * Name. Name to exempt, as a string or a PCRE-format regular expression. * ISREGEX flag. REGEX if URL is a regular expression, NOTREGEX if URL is a fixed string. * Location. ELEMENT if the injection is located in an XML element, ATTRIBUTE if located in an XML attribute.
    .PARAMETER Isregex_xmlsql
        Is the XML SQL Injection exempted field name a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER As_scan_location_xmlsql
        Location of SQL injection exception - XML Element or Attribute.
        Possible values = ELEMENT, ATTRIBUTE
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_xmlsqlinjection_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileXmlsqlinjectionBinding -name <string>
        An example how to add appfwprofile_xmlsqlinjection_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileXmlsqlinjectionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlsqlinjection_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Xmlsqlinjection,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex_xmlsql,

        [ValidateSet('ELEMENT', 'ATTRIBUTE')]
        [string]$As_scan_location_xmlsql,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileXmlsqlinjectionBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('xmlsqlinjection') ) { $payload.Add('xmlsqlinjection', $xmlsqlinjection) }
            if ( $PSBoundParameters.ContainsKey('isregex_xmlsql') ) { $payload.Add('isregex_xmlsql', $isregex_xmlsql) }
            if ( $PSBoundParameters.ContainsKey('as_scan_location_xmlsql') ) { $payload.Add('as_scan_location_xmlsql', $as_scan_location_xmlsql) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_xmlsqlinjection_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_xmlsqlinjection_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileXmlsqlinjectionBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileXmlsqlinjectionBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileXmlsqlinjectionBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmlsqlinjection that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Xmlsqlinjection
        Exempt the specified URL from the XML SQL injection check. An XML SQL injection exemption (relaxation) consists of the following items: * Name. Name to exempt, as a string or a PCRE-format regular expression. * ISREGEX flag. REGEX if URL is a regular expression, NOTREGEX if URL is a fixed string. * Location. ELEMENT if the injection is located in an XML element, ATTRIBUTE if located in an XML attribute.
    .PARAMETER As_scan_location_xmlsql
        Location of SQL injection exception - XML Element or Attribute.
        Possible values = ELEMENT, ATTRIBUTE
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileXmlsqlinjectionBinding -Name <string>
        An example how to delete appfwprofile_xmlsqlinjection_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileXmlsqlinjectionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlsqlinjection_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Xmlsqlinjection,

        [string]$As_scan_location_xmlsql,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmlsqlinjectionBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Xmlsqlinjection') ) { $arguments.Add('xmlsqlinjection', $Xmlsqlinjection) }
            if ( $PSBoundParameters.ContainsKey('As_scan_location_xmlsql') ) { $arguments.Add('as_scan_location_xmlsql', $As_scan_location_xmlsql) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_xmlsqlinjection_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmlsqlinjectionBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileXmlsqlinjectionBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the xmlsqlinjection that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_xmlsqlinjection_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_xmlsqlinjection_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlsqlinjectionBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlsqlinjectionBinding -GetAll
        Get all appfwprofile_xmlsqlinjection_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlsqlinjectionBinding -Count
        Get the number of appfwprofile_xmlsqlinjection_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlsqlinjectionBinding -name <string>
        Get appfwprofile_xmlsqlinjection_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlsqlinjectionBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_xmlsqlinjection_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileXmlsqlinjectionBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlsqlinjection_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileXmlsqlinjectionBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_xmlsqlinjection_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlsqlinjection_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_xmlsqlinjection_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlsqlinjection_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_xmlsqlinjection_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlsqlinjection_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_xmlsqlinjection_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlsqlinjection_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_xmlsqlinjection_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlsqlinjection_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileXmlsqlinjectionBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileXmlvalidationurlBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmlvalidationurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Xmlvalidationurl
        XML Validation URL regular expression.
    .PARAMETER Xmlrequestschema
        XML Schema object for request validation .
    .PARAMETER Xmlresponseschema
        XML Schema object for response validation.
    .PARAMETER Xmlwsdl
        WSDL object for soap request validation.
    .PARAMETER Xmladditionalsoapheaders
        Allow addtional soap headers.
        Possible values = ON, OFF
    .PARAMETER Xmlendpointcheck
        Modifies the behaviour of the Request URL validation w.r.t. the Service URL. If set to ABSOLUTE, the entire request URL is validated with the entire URL mentioned in Service of the associated WSDL. eg: Service URL: http://example.org/ExampleService, Request URL: http//example.com/ExampleService would FAIL the validation. If set to RELAIVE, only the non-hostname part of the request URL is validated against the non-hostname part of the Service URL. eg: Service URL: http://example.org/ExampleService, Request URL: http//example.com/ExampleService would PASS the validation.
        Possible values = ABSOLUTE, RELATIVE
    .PARAMETER Xmlvalidatesoapenvelope
        Validate SOAP Evelope only.
        Possible values = ON, OFF
    .PARAMETER Xmlvalidateresponse
        Validate response message.
        Possible values = ON, OFF
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_xmlvalidationurl_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileXmlvalidationurlBinding -name <string>
        An example how to add appfwprofile_xmlvalidationurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileXmlvalidationurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlvalidationurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Xmlvalidationurl,

        [string]$Xmlrequestschema,

        [string]$Xmlresponseschema,

        [string]$Xmlwsdl,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmladditionalsoapheaders,

        [ValidateSet('ABSOLUTE', 'RELATIVE')]
        [string]$Xmlendpointcheck,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlvalidatesoapenvelope,

        [ValidateSet('ON', 'OFF')]
        [string]$Xmlvalidateresponse,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileXmlvalidationurlBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('xmlvalidationurl') ) { $payload.Add('xmlvalidationurl', $xmlvalidationurl) }
            if ( $PSBoundParameters.ContainsKey('xmlrequestschema') ) { $payload.Add('xmlrequestschema', $xmlrequestschema) }
            if ( $PSBoundParameters.ContainsKey('xmlresponseschema') ) { $payload.Add('xmlresponseschema', $xmlresponseschema) }
            if ( $PSBoundParameters.ContainsKey('xmlwsdl') ) { $payload.Add('xmlwsdl', $xmlwsdl) }
            if ( $PSBoundParameters.ContainsKey('xmladditionalsoapheaders') ) { $payload.Add('xmladditionalsoapheaders', $xmladditionalsoapheaders) }
            if ( $PSBoundParameters.ContainsKey('xmlendpointcheck') ) { $payload.Add('xmlendpointcheck', $xmlendpointcheck) }
            if ( $PSBoundParameters.ContainsKey('xmlvalidatesoapenvelope') ) { $payload.Add('xmlvalidatesoapenvelope', $xmlvalidatesoapenvelope) }
            if ( $PSBoundParameters.ContainsKey('xmlvalidateresponse') ) { $payload.Add('xmlvalidateresponse', $xmlvalidateresponse) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_xmlvalidationurl_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_xmlvalidationurl_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileXmlvalidationurlBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileXmlvalidationurlBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileXmlvalidationurlBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmlvalidationurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Xmlvalidationurl
        XML Validation URL regular expression.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileXmlvalidationurlBinding -Name <string>
        An example how to delete appfwprofile_xmlvalidationurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileXmlvalidationurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlvalidationurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Xmlvalidationurl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmlvalidationurlBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Xmlvalidationurl') ) { $arguments.Add('xmlvalidationurl', $Xmlvalidationurl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_xmlvalidationurl_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmlvalidationurlBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileXmlvalidationurlBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the xmlvalidationurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_xmlvalidationurl_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_xmlvalidationurl_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlvalidationurlBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlvalidationurlBinding -GetAll
        Get all appfwprofile_xmlvalidationurl_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlvalidationurlBinding -Count
        Get the number of appfwprofile_xmlvalidationurl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlvalidationurlBinding -name <string>
        Get appfwprofile_xmlvalidationurl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlvalidationurlBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_xmlvalidationurl_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileXmlvalidationurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlvalidationurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileXmlvalidationurlBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_xmlvalidationurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlvalidationurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_xmlvalidationurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlvalidationurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_xmlvalidationurl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlvalidationurl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_xmlvalidationurl_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlvalidationurl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_xmlvalidationurl_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlvalidationurl_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileXmlvalidationurlBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileXmlwsiurlBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmlwsiurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Xmlwsiurl
        XML WS-I URL regular expression length.
    .PARAMETER Xmlwsichecks
        Specify a comma separated list of relevant WS-I rule IDs. (R1140, R1141).
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_xmlwsiurl_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileXmlwsiurlBinding -name <string>
        An example how to add appfwprofile_xmlwsiurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileXmlwsiurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlwsiurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Xmlwsiurl,

        [string]$Xmlwsichecks,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileXmlwsiurlBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('xmlwsiurl') ) { $payload.Add('xmlwsiurl', $xmlwsiurl) }
            if ( $PSBoundParameters.ContainsKey('xmlwsichecks') ) { $payload.Add('xmlwsichecks', $xmlwsichecks) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_xmlwsiurl_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_xmlwsiurl_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileXmlwsiurlBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileXmlwsiurlBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileXmlwsiurlBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmlwsiurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Xmlwsiurl
        XML WS-I URL regular expression length.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileXmlwsiurlBinding -Name <string>
        An example how to delete appfwprofile_xmlwsiurl_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileXmlwsiurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlwsiurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Xmlwsiurl,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmlwsiurlBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Xmlwsiurl') ) { $arguments.Add('xmlwsiurl', $Xmlwsiurl) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_xmlwsiurl_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmlwsiurlBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileXmlwsiurlBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the xmlwsiurl that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_xmlwsiurl_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_xmlwsiurl_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlwsiurlBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlwsiurlBinding -GetAll
        Get all appfwprofile_xmlwsiurl_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlwsiurlBinding -Count
        Get the number of appfwprofile_xmlwsiurl_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlwsiurlBinding -name <string>
        Get appfwprofile_xmlwsiurl_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlwsiurlBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_xmlwsiurl_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileXmlwsiurlBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlwsiurl_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileXmlwsiurlBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_xmlwsiurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlwsiurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_xmlwsiurl_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlwsiurl_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_xmlwsiurl_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlwsiurl_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_xmlwsiurl_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlwsiurl_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_xmlwsiurl_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlwsiurl_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileXmlwsiurlBinding: Ended"
    }
}

function Invoke-NSAddAppfwprofileXmlxssBinding {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmlxss that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Comment
        Any comments about the purpose of profile, or other useful information about the profile.
    .PARAMETER State
        Enabled.
        Possible values = ENABLED, DISABLED
    .PARAMETER Xmlxss
        Exempt the specified URL from the XML cross-site scripting (XSS) check. An XML cross-site scripting exemption (relaxation) consists of the following items: * URL. URL to exempt, as a string or a PCRE-format regular expression. * ISREGEX flag. REGEX if URL is a regular expression, NOTREGEX if URL is a fixed string. * Location. ELEMENT if the attachment is located in an XML element, ATTRIBUTE if located in an XML attribute.
    .PARAMETER Isregex_xmlxss
        Is the XML XSS exempted field name a regular expression?.
        Possible values = REGEX, NOTREGEX
    .PARAMETER As_scan_location_xmlxss
        Location of XSS injection exception - XML Element or Attribute.
        Possible values = ELEMENT, ATTRIBUTE
    .PARAMETER Isautodeployed
        Is the rule auto deployed by dynamic profile ?.
        Possible values = AUTODEPLOYED, NOTAUTODEPLOYED
    .PARAMETER Resourceid
        A "id" that identifies the rule.
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .PARAMETER PassThru
        Return details about the created appfwprofile_xmlxss_binding item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwprofileXmlxssBinding -name <string>
        An example how to add appfwprofile_xmlxss_binding config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwprofileXmlxssBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlxss_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [ValidateSet('ENABLED', 'DISABLED')]
        [string]$State,

        [string]$Xmlxss,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex_xmlxss,

        [ValidateSet('ELEMENT', 'ATTRIBUTE')]
        [string]$As_scan_location_xmlxss,

        [ValidateSet('AUTODEPLOYED', 'NOTAUTODEPLOYED')]
        [string]$Isautodeployed,

        [string]$Resourceid,

        [ValidateSet('ALLOW', 'DENY')]
        [string]$Ruletype,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwprofileXmlxssBinding: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('state') ) { $payload.Add('state', $state) }
            if ( $PSBoundParameters.ContainsKey('xmlxss') ) { $payload.Add('xmlxss', $xmlxss) }
            if ( $PSBoundParameters.ContainsKey('isregex_xmlxss') ) { $payload.Add('isregex_xmlxss', $isregex_xmlxss) }
            if ( $PSBoundParameters.ContainsKey('as_scan_location_xmlxss') ) { $payload.Add('as_scan_location_xmlxss', $as_scan_location_xmlxss) }
            if ( $PSBoundParameters.ContainsKey('isautodeployed') ) { $payload.Add('isautodeployed', $isautodeployed) }
            if ( $PSBoundParameters.ContainsKey('resourceid') ) { $payload.Add('resourceid', $resourceid) }
            if ( $PSBoundParameters.ContainsKey('ruletype') ) { $payload.Add('ruletype', $ruletype) }
            if ( $PSCmdlet.ShouldProcess("appfwprofile_xmlxss_binding", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwprofile_xmlxss_binding -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprofileXmlxssBinding -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwprofileXmlxssBinding: Finished"
    }
}

function Invoke-NSDeleteAppfwprofileXmlxssBinding {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Binding object showing the xmlxss that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER Xmlxss
        Exempt the specified URL from the XML cross-site scripting (XSS) check. An XML cross-site scripting exemption (relaxation) consists of the following items: * URL. URL to exempt, as a string or a PCRE-format regular expression. * ISREGEX flag. REGEX if URL is a regular expression, NOTREGEX if URL is a fixed string. * Location. ELEMENT if the attachment is located in an XML element, ATTRIBUTE if located in an XML attribute.
    .PARAMETER As_scan_location_xmlxss
        Location of XSS injection exception - XML Element or Attribute.
        Possible values = ELEMENT, ATTRIBUTE
    .PARAMETER Ruletype
        Specifies rule type of binding.
        Possible values = ALLOW, DENY
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprofileXmlxssBinding -Name <string>
        An example how to delete appfwprofile_xmlxss_binding config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprofileXmlxssBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlxss_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [string]$Xmlxss,

        [string]$As_scan_location_xmlxss,

        [string]$Ruletype 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmlxssBinding: Starting"
    }
    process {
        try {
            $arguments = @{ }
            if ( $PSBoundParameters.ContainsKey('Xmlxss') ) { $arguments.Add('xmlxss', $Xmlxss) }
            if ( $PSBoundParameters.ContainsKey('As_scan_location_xmlxss') ) { $arguments.Add('as_scan_location_xmlxss', $As_scan_location_xmlxss) }
            if ( $PSBoundParameters.ContainsKey('Ruletype') ) { $arguments.Add('ruletype', $Ruletype) }
            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprofile_xmlxss_binding -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprofileXmlxssBinding: Finished"
    }
}

function Invoke-NSGetAppfwprofileXmlxssBinding {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Binding object showing the xmlxss that can be bound to appfwprofile.
    .PARAMETER Name
        Name of the profile to which to bind an exemption or rule.
    .PARAMETER GetAll
        Retrieve all appfwprofile_xmlxss_binding object(s).
    .PARAMETER Count
        If specified, the count of the appfwprofile_xmlxss_binding object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlxssBinding
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlxssBinding -GetAll
        Get all appfwprofile_xmlxss_binding data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlxssBinding -Count
        Get the number of appfwprofile_xmlxss_binding objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlxssBinding -name <string>
        Get appfwprofile_xmlxss_binding object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprofileXmlxssBinding -Filter @{ 'name'='<value>' }
        Get appfwprofile_xmlxss_binding data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprofileXmlxssBinding
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprofile_xmlxss_binding/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprofileXmlxssBinding: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{  bulkbindings = 'yes' }
                Write-Verbose "Retrieving all appfwprofile_xmlxss_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlxss_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprofile_xmlxss_binding objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlxss_binding -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprofile_xmlxss_binding objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlxss_binding -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprofile_xmlxss_binding configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlxss_binding -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprofile_xmlxss_binding configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprofile_xmlxss_binding -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprofileXmlxssBinding: Ended"
    }
}

function Invoke-NSImportAppfwprotofile {
    <#
    .SYNOPSIS
        Import Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for gRPC protofile resource.
    .PARAMETER Src
        Indicates source path of the gRPC schema file.
    .PARAMETER Name
        Name of the gRPC schema object.
    .PARAMETER Overwrite
        Overwrite any existing gRPC schema object of the same name.
    .PARAMETER Comment
        Comments associated with this gRPC schema file.
    .EXAMPLE
        PS C:\>Invoke-NSImportAppfwprotofile -src <string> -name <string>
        An example how to import appfwprotofile config Object(s).
    .NOTES
        File Name : Invoke-NSImportAppfwprotofile
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprotofile/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateLength(1, 2047)]
        [string]$Src,

        [Parameter(Mandatory)]
        [string]$Name,

        [boolean]$Overwrite,

        [string]$Comment 

    )
    begin {
        Write-Verbose "Invoke-NSImportAppfwprotofile: Starting"
    }
    process {
        try {
            $payload = @{ src = $src
                name          = $name
            }
            if ( $PSBoundParameters.ContainsKey('overwrite') ) { $payload.Add('overwrite', $overwrite) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSCmdlet.ShouldProcess($Name, "Import Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwprotofile -Action import -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSImportAppfwprotofile: Finished"
    }
}

function Invoke-NSDeleteAppfwprotofile {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for gRPC protofile resource.
    .PARAMETER Name
        Name of the gRPC schema object.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwprotofile -Name <string>
        An example how to delete appfwprotofile config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwprotofile
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprotofile/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwprotofile: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwprotofile -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwprotofile: Finished"
    }
}

function Invoke-NSChangeAppfwprotofile {
    <#
    .SYNOPSIS
        Change Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for gRPC protofile resource.
    .PARAMETER Name
        Name of the gRPC schema object.
    .PARAMETER PassThru
        Return details about the created appfwprotofile item.
    .EXAMPLE
        PS C:\>Invoke-NSChangeAppfwprotofile -name <string>
        An example how to change appfwprotofile config Object(s).
    .NOTES
        File Name : Invoke-NSChangeAppfwprotofile
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprotofile/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSChangeAppfwprotofile: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }

            if ( $PSCmdlet.ShouldProcess("appfwprotofile", "Change Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwprotofile -Action update -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwprotofile -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSChangeAppfwprotofile: Finished"
    }
}

function Invoke-NSGetAppfwprotofile {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for gRPC protofile resource.
    .PARAMETER Name
        Name of the gRPC schema object.
    .PARAMETER GetAll
        Retrieve all appfwprotofile object(s).
    .PARAMETER Count
        If specified, the count of the appfwprotofile object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprotofile
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprotofile -GetAll
        Get all appfwprotofile data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprotofile -name <string>
        Get appfwprotofile object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwprotofile -Filter @{ 'name'='<value>' }
        Get appfwprotofile data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwprotofile
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwprotofile/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwprotofile: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwprotofile objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprotofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwprotofile objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprotofile -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwprotofile objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprotofile -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwprotofile configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprotofile -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwprotofile configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwprotofile -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwprotofile: Ended"
    }
}

function Invoke-NSUnsetAppfwsettings {
    <#
    .SYNOPSIS
        Unset Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for AS settings resource.
    .PARAMETER Defaultprofile
        Profile to use when a connection does not match any policy. Default setting is APPFW_BYPASS, which sends unmatched connections back to the Citrix ADC without attempting to filter them further.
    .PARAMETER Undefaction
        Profile to use when an application firewall policy evaluates to undefined (UNDEF).
        An UNDEF event indicates an internal error condition. The APPFW_BLOCK built-in profile is the default setting. You can specify a different built-in or user-created profile as the UNDEF profile.
    .PARAMETER Sessiontimeout
        Timeout, in seconds, after which a user session is terminated. Before continuing to use the protected web site, the user must establish a new session by opening a designated start URL.
          
          
        Maximum value = 65535
    .PARAMETER Learnratelimit
        Maximum number of connections per second that the application firewall learning engine examines to generate new relaxations for learning-enabled security checks. The application firewall drops any connections above this limit from the list of connections used by the learning engine.
          
          
        Maximum value = 1000
    .PARAMETER Sessionlifetime
        Maximum amount of time (in seconds) that the application firewall allows a user session to remain active, regardless of user activity. After this time, the user session is terminated. Before continuing to use the protected web site, the user must establish a new session by opening a designated start URL.
          
          
        Maximum value = 2147483647
    .PARAMETER Sessioncookiename
        Name of the session cookie that the application firewall uses to track user sessions.
        Must begin with a letter or number, and can consist of from 1 to 31 letters, numbers, and the hyphen (-) and underscore (_) symbols.
    .PARAMETER Clientiploggingheader
        Name of an HTTP header that contains the IP address that the client used to connect to the protected web site or service.
    .PARAMETER Importsizelimit
        Cumulative total maximum number of bytes in web forms imported to a protected web site. If a user attempts to upload files with a total byte count higher than the specified limit, the application firewall blocks the request.
          
          
        Maximum value = 268435456
    .PARAMETER Signatureautoupdate
        Flag used to enable/disable auto update signatures.
          
        Possible values = ON, OFF
    .PARAMETER Signatureurl
        URL to download the mapping file from server.
    .PARAMETER Cookiepostencryptprefix
        String that is prepended to all encrypted cookie values.
    .PARAMETER Logmalformedreq
        Log requests that are so malformed that application firewall parsing doesn't occur.
          
        Possible values = ON, OFF
    .PARAMETER Geolocationlogging
        Enable Geo-Location Logging in CEF format logs.
          
        Possible values = ON, OFF
    .PARAMETER Ceflogging
        Enable CEF format logs.
          
        Possible values = ON, OFF
    .PARAMETER Entitydecoding
        Transform multibyte (double- or half-width) characters to single width characters.
          
        Possible values = ON, OFF
    .PARAMETER Useconfigurablesecretkey
        Use configurable secret key in AppFw operations.
          
        Possible values = ON, OFF
    .PARAMETER Sessionlimit
        Maximum number of sessions that the application firewall allows to be active, regardless of user activity. After the max_limit reaches, No more user session will be created .
          
          
        Maximum value = 500000
    .PARAMETER Malformedreqaction
        flag to define action on malformed requests that application firewall cannot parse.
        Possible values = none, block, log, stats
    .PARAMETER Centralizedlearning
        Flag used to enable/disable ADM centralized learning.
          
        Possible values = ON, OFF
    .PARAMETER Proxyserver
        Proxy Server IP to get updated signatures from AWS.
    .PARAMETER Proxyport
        Proxy Server Port to get updated signatures from AWS.
    .PARAMETER Proxyusername
        Proxy Username.
    .PARAMETER Proxypassword
        Password with which proxy user logs on.
    .EXAMPLE
        PS C:\>Invoke-NSUnsetAppfwsettings
        An example how to unset appfwsettings config Object(s).
    .NOTES
        File Name : Invoke-NSUnsetAppfwsettings
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwsettings
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Boolean]$defaultprofile,

        [Boolean]$undefaction,

        [Boolean]$sessiontimeout,

        [Boolean]$learnratelimit,

        [Boolean]$sessionlifetime,

        [Boolean]$sessioncookiename,

        [Boolean]$clientiploggingheader,

        [Boolean]$importsizelimit,

        [Boolean]$signatureautoupdate,

        [Boolean]$signatureurl,

        [Boolean]$cookiepostencryptprefix,

        [Boolean]$logmalformedreq,

        [Boolean]$geolocationlogging,

        [Boolean]$ceflogging,

        [Boolean]$entitydecoding,

        [Boolean]$useconfigurablesecretkey,

        [Boolean]$sessionlimit,

        [Boolean]$malformedreqaction,

        [Boolean]$centralizedlearning,

        [Boolean]$proxyserver,

        [Boolean]$proxyport,

        [Boolean]$proxyusername,

        [Boolean]$proxypassword 
    )
    begin {
        Write-Verbose "Invoke-NSUnsetAppfwsettings: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('defaultprofile') ) { $payload.Add('defaultprofile', $defaultprofile) }
            if ( $PSBoundParameters.ContainsKey('undefaction') ) { $payload.Add('undefaction', $undefaction) }
            if ( $PSBoundParameters.ContainsKey('sessiontimeout') ) { $payload.Add('sessiontimeout', $sessiontimeout) }
            if ( $PSBoundParameters.ContainsKey('learnratelimit') ) { $payload.Add('learnratelimit', $learnratelimit) }
            if ( $PSBoundParameters.ContainsKey('sessionlifetime') ) { $payload.Add('sessionlifetime', $sessionlifetime) }
            if ( $PSBoundParameters.ContainsKey('sessioncookiename') ) { $payload.Add('sessioncookiename', $sessioncookiename) }
            if ( $PSBoundParameters.ContainsKey('clientiploggingheader') ) { $payload.Add('clientiploggingheader', $clientiploggingheader) }
            if ( $PSBoundParameters.ContainsKey('importsizelimit') ) { $payload.Add('importsizelimit', $importsizelimit) }
            if ( $PSBoundParameters.ContainsKey('signatureautoupdate') ) { $payload.Add('signatureautoupdate', $signatureautoupdate) }
            if ( $PSBoundParameters.ContainsKey('signatureurl') ) { $payload.Add('signatureurl', $signatureurl) }
            if ( $PSBoundParameters.ContainsKey('cookiepostencryptprefix') ) { $payload.Add('cookiepostencryptprefix', $cookiepostencryptprefix) }
            if ( $PSBoundParameters.ContainsKey('logmalformedreq') ) { $payload.Add('logmalformedreq', $logmalformedreq) }
            if ( $PSBoundParameters.ContainsKey('geolocationlogging') ) { $payload.Add('geolocationlogging', $geolocationlogging) }
            if ( $PSBoundParameters.ContainsKey('ceflogging') ) { $payload.Add('ceflogging', $ceflogging) }
            if ( $PSBoundParameters.ContainsKey('entitydecoding') ) { $payload.Add('entitydecoding', $entitydecoding) }
            if ( $PSBoundParameters.ContainsKey('useconfigurablesecretkey') ) { $payload.Add('useconfigurablesecretkey', $useconfigurablesecretkey) }
            if ( $PSBoundParameters.ContainsKey('sessionlimit') ) { $payload.Add('sessionlimit', $sessionlimit) }
            if ( $PSBoundParameters.ContainsKey('malformedreqaction') ) { $payload.Add('malformedreqaction', $malformedreqaction) }
            if ( $PSBoundParameters.ContainsKey('centralizedlearning') ) { $payload.Add('centralizedlearning', $centralizedlearning) }
            if ( $PSBoundParameters.ContainsKey('proxyserver') ) { $payload.Add('proxyserver', $proxyserver) }
            if ( $PSBoundParameters.ContainsKey('proxyport') ) { $payload.Add('proxyport', $proxyport) }
            if ( $PSBoundParameters.ContainsKey('proxyusername') ) { $payload.Add('proxyusername', $proxyusername) }
            if ( $PSBoundParameters.ContainsKey('proxypassword') ) { $payload.Add('proxypassword', $proxypassword) }
            if ( $PSCmdlet.ShouldProcess("appfwsettings", "Unset Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method POST -Type appfwsettings -NitroPath nitro/v1/config -Action unset -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUnsetAppfwsettings: Finished"
    }
}

function Invoke-NSUpdateAppfwsettings {
    <#
    .SYNOPSIS
        Update Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for AS settings resource.
    .PARAMETER Defaultprofile
        Profile to use when a connection does not match any policy. Default setting is APPFW_BYPASS, which sends unmatched connections back to the Citrix ADC without attempting to filter them further.
    .PARAMETER Undefaction
        Profile to use when an application firewall policy evaluates to undefined (UNDEF).
        An UNDEF event indicates an internal error condition. The APPFW_BLOCK built-in profile is the default setting. You can specify a different built-in or user-created profile as the UNDEF profile.
    .PARAMETER Sessiontimeout
        Timeout, in seconds, after which a user session is terminated. Before continuing to use the protected web site, the user must establish a new session by opening a designated start URL.
          
          
        Maximum value = 65535
    .PARAMETER Learnratelimit
        Maximum number of connections per second that the application firewall learning engine examines to generate new relaxations for learning-enabled security checks. The application firewall drops any connections above this limit from the list of connections used by the learning engine.
          
          
        Maximum value = 1000
    .PARAMETER Sessionlifetime
        Maximum amount of time (in seconds) that the application firewall allows a user session to remain active, regardless of user activity. After this time, the user session is terminated. Before continuing to use the protected web site, the user must establish a new session by opening a designated start URL.
          
          
        Maximum value = 2147483647
    .PARAMETER Sessioncookiename
        Name of the session cookie that the application firewall uses to track user sessions.
        Must begin with a letter or number, and can consist of from 1 to 31 letters, numbers, and the hyphen (-) and underscore (_) symbols.
    .PARAMETER Clientiploggingheader
        Name of an HTTP header that contains the IP address that the client used to connect to the protected web site or service.
    .PARAMETER Importsizelimit
        Cumulative total maximum number of bytes in web forms imported to a protected web site. If a user attempts to upload files with a total byte count higher than the specified limit, the application firewall blocks the request.
          
          
        Maximum value = 268435456
    .PARAMETER Signatureautoupdate
        Flag used to enable/disable auto update signatures.
          
        Possible values = ON, OFF
    .PARAMETER Signatureurl
        URL to download the mapping file from server.
    .PARAMETER Cookiepostencryptprefix
        String that is prepended to all encrypted cookie values.
    .PARAMETER Logmalformedreq
        Log requests that are so malformed that application firewall parsing doesn't occur.
          
        Possible values = ON, OFF
    .PARAMETER Geolocationlogging
        Enable Geo-Location Logging in CEF format logs.
          
        Possible values = ON, OFF
    .PARAMETER Ceflogging
        Enable CEF format logs.
          
        Possible values = ON, OFF
    .PARAMETER Entitydecoding
        Transform multibyte (double- or half-width) characters to single width characters.
          
        Possible values = ON, OFF
    .PARAMETER Useconfigurablesecretkey
        Use configurable secret key in AppFw operations.
          
        Possible values = ON, OFF
    .PARAMETER Sessionlimit
        Maximum number of sessions that the application firewall allows to be active, regardless of user activity. After the max_limit reaches, No more user session will be created .
          
          
        Maximum value = 500000
    .PARAMETER Malformedreqaction
        flag to define action on malformed requests that application firewall cannot parse.
        Possible values = none, block, log, stats
    .PARAMETER Centralizedlearning
        Flag used to enable/disable ADM centralized learning.
          
        Possible values = ON, OFF
    .PARAMETER Proxyserver
        Proxy Server IP to get updated signatures from AWS.
    .PARAMETER Proxyport
        Proxy Server Port to get updated signatures from AWS.
    .PARAMETER Proxyusername
        Proxy Username.
    .PARAMETER Proxypassword
        Password with which proxy user logs on.
    .EXAMPLE
        PS C:\>Invoke-NSUpdateAppfwsettings
        An example how to update appfwsettings config Object(s).
    .NOTES
        File Name : Invoke-NSUpdateAppfwsettings
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwsettings/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Defaultprofile,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Undefaction,

        [double]$Sessiontimeout,

        [double]$Learnratelimit,

        [double]$Sessionlifetime,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Sessioncookiename,

        [string]$Clientiploggingheader,

        [double]$Importsizelimit,

        [ValidateSet('ON', 'OFF')]
        [string]$Signatureautoupdate,

        [string]$Signatureurl,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Cookiepostencryptprefix,

        [ValidateSet('ON', 'OFF')]
        [string]$Logmalformedreq,

        [ValidateSet('ON', 'OFF')]
        [string]$Geolocationlogging,

        [ValidateSet('ON', 'OFF')]
        [string]$Ceflogging,

        [ValidateSet('ON', 'OFF')]
        [string]$Entitydecoding,

        [ValidateSet('ON', 'OFF')]
        [string]$Useconfigurablesecretkey,

        [double]$Sessionlimit,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Malformedreqaction,

        [ValidateSet('ON', 'OFF')]
        [string]$Centralizedlearning,

        [string]$Proxyserver,

        [ValidateRange(1, 65535)]
        [int]$Proxyport,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Proxyusername,

        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Proxypassword 
    )
    begin {
        Write-Verbose "Invoke-NSUpdateAppfwsettings: Starting"
    }
    process {
        try {
            $payload = @{ }
            if ( $PSBoundParameters.ContainsKey('defaultprofile') ) { $payload.Add('defaultprofile', $defaultprofile) }
            if ( $PSBoundParameters.ContainsKey('undefaction') ) { $payload.Add('undefaction', $undefaction) }
            if ( $PSBoundParameters.ContainsKey('sessiontimeout') ) { $payload.Add('sessiontimeout', $sessiontimeout) }
            if ( $PSBoundParameters.ContainsKey('learnratelimit') ) { $payload.Add('learnratelimit', $learnratelimit) }
            if ( $PSBoundParameters.ContainsKey('sessionlifetime') ) { $payload.Add('sessionlifetime', $sessionlifetime) }
            if ( $PSBoundParameters.ContainsKey('sessioncookiename') ) { $payload.Add('sessioncookiename', $sessioncookiename) }
            if ( $PSBoundParameters.ContainsKey('clientiploggingheader') ) { $payload.Add('clientiploggingheader', $clientiploggingheader) }
            if ( $PSBoundParameters.ContainsKey('importsizelimit') ) { $payload.Add('importsizelimit', $importsizelimit) }
            if ( $PSBoundParameters.ContainsKey('signatureautoupdate') ) { $payload.Add('signatureautoupdate', $signatureautoupdate) }
            if ( $PSBoundParameters.ContainsKey('signatureurl') ) { $payload.Add('signatureurl', $signatureurl) }
            if ( $PSBoundParameters.ContainsKey('cookiepostencryptprefix') ) { $payload.Add('cookiepostencryptprefix', $cookiepostencryptprefix) }
            if ( $PSBoundParameters.ContainsKey('logmalformedreq') ) { $payload.Add('logmalformedreq', $logmalformedreq) }
            if ( $PSBoundParameters.ContainsKey('geolocationlogging') ) { $payload.Add('geolocationlogging', $geolocationlogging) }
            if ( $PSBoundParameters.ContainsKey('ceflogging') ) { $payload.Add('ceflogging', $ceflogging) }
            if ( $PSBoundParameters.ContainsKey('entitydecoding') ) { $payload.Add('entitydecoding', $entitydecoding) }
            if ( $PSBoundParameters.ContainsKey('useconfigurablesecretkey') ) { $payload.Add('useconfigurablesecretkey', $useconfigurablesecretkey) }
            if ( $PSBoundParameters.ContainsKey('sessionlimit') ) { $payload.Add('sessionlimit', $sessionlimit) }
            if ( $PSBoundParameters.ContainsKey('malformedreqaction') ) { $payload.Add('malformedreqaction', $malformedreqaction) }
            if ( $PSBoundParameters.ContainsKey('centralizedlearning') ) { $payload.Add('centralizedlearning', $centralizedlearning) }
            if ( $PSBoundParameters.ContainsKey('proxyserver') ) { $payload.Add('proxyserver', $proxyserver) }
            if ( $PSBoundParameters.ContainsKey('proxyport') ) { $payload.Add('proxyport', $proxyport) }
            if ( $PSBoundParameters.ContainsKey('proxyusername') ) { $payload.Add('proxyusername', $proxyusername) }
            if ( $PSBoundParameters.ContainsKey('proxypassword') ) { $payload.Add('proxypassword', $proxypassword) }
            if ( $PSCmdlet.ShouldProcess("appfwsettings", "Update Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method PUT -NitroPath nitro/v1/config -Type appfwsettings -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSUpdateAppfwsettings: Finished"
    }
}

function Invoke-NSGetAppfwsettings {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for AS settings resource.
    .PARAMETER GetAll
        Retrieve all appfwsettings object(s).
    .PARAMETER Count
        If specified, the count of the appfwsettings object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwsettings
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwsettings -GetAll
        Get all appfwsettings data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwsettings -name <string>
        Get appfwsettings object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwsettings -Filter @{ 'name'='<value>' }
        Get appfwsettings data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwsettings
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwsettings/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll
    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwsettings: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwsettings objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwsettings -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwsettings objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwsettings -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwsettings objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwsettings -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwsettings configuration for property ''"

            } else {
                Write-Verbose "Retrieving appfwsettings configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwsettings -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwsettings: Ended"
    }
}

function Invoke-NSChangeAppfwsignatures {
    <#
    .SYNOPSIS
        Change Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall signatures XML configuration resource.
    .PARAMETER Name
        Name of the signature object.
    .PARAMETER Mergedefault
        Merges signature file with default signature file.
    .PARAMETER PassThru
        Return details about the created appfwsignatures item.
    .EXAMPLE
        PS C:\>Invoke-NSChangeAppfwsignatures -name <string>
        An example how to change appfwsignatures config Object(s).
    .NOTES
        File Name : Invoke-NSChangeAppfwsignatures
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwsignatures/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [boolean]$Mergedefault,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSChangeAppfwsignatures: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }
            if ( $PSBoundParameters.ContainsKey('mergedefault') ) { $payload.Add('mergedefault', $mergedefault) }
            if ( $PSCmdlet.ShouldProcess("appfwsignatures", "Change Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwsignatures -Action update -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwsignatures -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSChangeAppfwsignatures: Finished"
    }
}

function Invoke-NSDeleteAppfwsignatures {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall signatures XML configuration resource.
    .PARAMETER Name
        Name of the signature object.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwsignatures -Name <string>
        An example how to delete appfwsignatures config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwsignatures
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwsignatures/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwsignatures: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwsignatures -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwsignatures: Finished"
    }
}

function Invoke-NSImportAppfwsignatures {
    <#
    .SYNOPSIS
        Import Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for application firewall signatures XML configuration resource.
    .PARAMETER Src
        URL (protocol, host, path, and file name) for the location at which to store the imported signatures object.
        NOTE: The import fails if the object to be imported is on an HTTPS server that requires client certificate authentication for access.
    .PARAMETER Name
        Name of the signature object.
    .PARAMETER Xslt
        XSLT file source.
    .PARAMETER Comment
        Any comments to preserve information about the signatures object.
    .PARAMETER Overwrite
        Overwrite any existing signatures object of the same name.
    .PARAMETER Merge
        Merges the existing Signature with new signature rules.
    .PARAMETER Preservedefactions
        preserves def actions of signature rules.
    .PARAMETER Sha1
        File path for sha1 file to validate signature file.
    .PARAMETER Vendortype
        Third party vendor type for which WAF signatures has to be generated.
        Possible values = Snort
    .PARAMETER Autoenablenewsignatures
        Flag used to enable/disable auto enable new signatures.
          
        Possible values = ON, OFF
    .PARAMETER Ruleid
        Signature rule IDs to be Enabled/Disabled.
          
        Maximum value = 2000000
    .PARAMETER Category
        Signature category to be Enabled/Disabled.
    .PARAMETER Enabled
        Flag used to enable/disable enable signature rule IDs/Signature Category.
          
        Possible values = ON, OFF
    .PARAMETER Action
        Signature action.
        Possible values = none, block, log, stats
    .EXAMPLE
        PS C:\>Invoke-NSImportAppfwsignatures -src <string> -name <string>
        An example how to import appfwsignatures config Object(s).
    .NOTES
        File Name : Invoke-NSImportAppfwsignatures
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwsignatures/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateLength(1, 2047)]
        [string]$Src,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Xslt,

        [string]$Comment,

        [boolean]$Overwrite,

        [boolean]$Merge,

        [boolean]$Preservedefactions,

        [ValidateLength(1, 2047)]
        [string]$Sha1,

        [ValidateSet('Snort')]
        [string]$Vendortype,

        [ValidateSet('ON', 'OFF')]
        [string]$Autoenablenewsignatures,

        [double[]]$Ruleid,

        [ValidateLength(1, 64)]
        [string]$Category,

        [ValidateSet('ON', 'OFF')]
        [string]$Enabled,

        [ValidateSet('none', 'block', 'log', 'stats')]
        [string[]]$Action 

    )
    begin {
        Write-Verbose "Invoke-NSImportAppfwsignatures: Starting"
    }
    process {
        try {
            $payload = @{ src = $src
                name          = $name
            }
            if ( $PSBoundParameters.ContainsKey('xslt') ) { $payload.Add('xslt', $xslt) }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('overwrite') ) { $payload.Add('overwrite', $overwrite) }
            if ( $PSBoundParameters.ContainsKey('merge') ) { $payload.Add('merge', $merge) }
            if ( $PSBoundParameters.ContainsKey('preservedefactions') ) { $payload.Add('preservedefactions', $preservedefactions) }
            if ( $PSBoundParameters.ContainsKey('sha1') ) { $payload.Add('sha1', $sha1) }
            if ( $PSBoundParameters.ContainsKey('vendortype') ) { $payload.Add('vendortype', $vendortype) }
            if ( $PSBoundParameters.ContainsKey('autoenablenewsignatures') ) { $payload.Add('autoenablenewsignatures', $autoenablenewsignatures) }
            if ( $PSBoundParameters.ContainsKey('ruleid') ) { $payload.Add('ruleid', $ruleid) }
            if ( $PSBoundParameters.ContainsKey('category') ) { $payload.Add('category', $category) }
            if ( $PSBoundParameters.ContainsKey('enabled') ) { $payload.Add('enabled', $enabled) }
            if ( $PSBoundParameters.ContainsKey('action') ) { $payload.Add('action', $action) }
            if ( $PSCmdlet.ShouldProcess($Name, "Import Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwsignatures -Action import -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSImportAppfwsignatures: Finished"
    }
}

function Invoke-NSGetAppfwsignatures {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for application firewall signatures XML configuration resource.
    .PARAMETER Name
        Name of the signature object.
    .PARAMETER GetAll
        Retrieve all appfwsignatures object(s).
    .PARAMETER Count
        If specified, the count of the appfwsignatures object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwsignatures
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwsignatures -GetAll
        Get all appfwsignatures data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwsignatures -name <string>
        Get appfwsignatures object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwsignatures -Filter @{ 'name'='<value>' }
        Get appfwsignatures data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwsignatures
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwsignatures/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwsignatures: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwsignatures objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwsignatures -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwsignatures objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwsignatures -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwsignatures objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwsignatures -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwsignatures configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwsignatures -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwsignatures configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwsignatures -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwsignatures: Ended"
    }
}

function Invoke-NSGetAppfwtransactionrecords {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for Application firewall transaction record resource.
    .PARAMETER Nodeid
        Unique number that identifies the cluster node.
          
        Maximum value = 31
    .PARAMETER GetAll
        Retrieve all appfwtransactionrecords object(s).
    .PARAMETER Count
        If specified, the count of the appfwtransactionrecords object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwtransactionrecords
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwtransactionrecords -GetAll
        Get all appfwtransactionrecords data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwtransactionrecords -Count
        Get the number of appfwtransactionrecords objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwtransactionrecords -name <string>
        Get appfwtransactionrecords object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwtransactionrecords -Filter @{ 'name'='<value>' }
        Get appfwtransactionrecords data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwtransactionrecords
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwtransactionrecords/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByArgument')]
        [double]$Nodeid,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwtransactionrecords: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwtransactionrecords objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwtransactionrecords -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwtransactionrecords objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwtransactionrecords -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwtransactionrecords objects by arguments"
                $arguments = @{ } 
                if ( $PSBoundParameters.ContainsKey('nodeid') ) { $arguments.Add('nodeid', $nodeid) }
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwtransactionrecords -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwtransactionrecords configuration for property ''"

            } else {
                Write-Verbose "Retrieving appfwtransactionrecords configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwtransactionrecords -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwtransactionrecords: Ended"
    }
}

function Invoke-NSDeleteAppfwurlencodedformcontenttype {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for Urlencoded form content type resource.
    .PARAMETER Urlencodedformcontenttypevalue
        Content type to be classified as urlencoded form.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwurlencodedformcontenttype -Urlencodedformcontenttypevalue <string>
        An example how to delete appfwurlencodedformcontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwurlencodedformcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwurlencodedformcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Urlencodedformcontenttypevalue 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwurlencodedformcontenttype: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$urlencodedformcontenttypevalue", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwurlencodedformcontenttype -NitroPath nitro/v1/config -Resource $urlencodedformcontenttypevalue -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwurlencodedformcontenttype: Finished"
    }
}

function Invoke-NSAddAppfwurlencodedformcontenttype {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for Urlencoded form content type resource.
    .PARAMETER Urlencodedformcontenttypevalue
        Content type to be classified as urlencoded form.
    .PARAMETER Isregex
        Is urlencoded form content type a regular expression?.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER PassThru
        Return details about the created appfwurlencodedformcontenttype item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwurlencodedformcontenttype -urlencodedformcontenttypevalue <string>
        An example how to add appfwurlencodedformcontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwurlencodedformcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwurlencodedformcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Urlencodedformcontenttypevalue,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex = 'NOTREGEX',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwurlencodedformcontenttype: Starting"
    }
    process {
        try {
            $payload = @{ urlencodedformcontenttypevalue = $urlencodedformcontenttypevalue }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSCmdlet.ShouldProcess("appfwurlencodedformcontenttype", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwurlencodedformcontenttype -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwurlencodedformcontenttype -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwurlencodedformcontenttype: Finished"
    }
}

function Invoke-NSGetAppfwurlencodedformcontenttype {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for Urlencoded form content type resource.
    .PARAMETER Urlencodedformcontenttypevalue
        Content type to be classified as urlencoded form.
    .PARAMETER GetAll
        Retrieve all appfwurlencodedformcontenttype object(s).
    .PARAMETER Count
        If specified, the count of the appfwurlencodedformcontenttype object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwurlencodedformcontenttype
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwurlencodedformcontenttype -GetAll
        Get all appfwurlencodedformcontenttype data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwurlencodedformcontenttype -Count
        Get the number of appfwurlencodedformcontenttype objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwurlencodedformcontenttype -name <string>
        Get appfwurlencodedformcontenttype object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwurlencodedformcontenttype -Filter @{ 'name'='<value>' }
        Get appfwurlencodedformcontenttype data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwurlencodedformcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwurlencodedformcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Urlencodedformcontenttypevalue,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwurlencodedformcontenttype: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwurlencodedformcontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwurlencodedformcontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwurlencodedformcontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwurlencodedformcontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwurlencodedformcontenttype objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwurlencodedformcontenttype -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwurlencodedformcontenttype configuration for property 'urlencodedformcontenttypevalue'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwurlencodedformcontenttype -NitroPath nitro/v1/config -Resource $urlencodedformcontenttypevalue -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwurlencodedformcontenttype configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwurlencodedformcontenttype -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwurlencodedformcontenttype: Ended"
    }
}

function Invoke-NSImportAppfwwsdl {
    <#
    .SYNOPSIS
        Import Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for WSDL file resource.
    .PARAMETER Src
        URL (protocol, host, path, and name) of the WSDL file to be imported is stored.
        NOTE: The import fails if the object to be imported is on an HTTPS server that requires client certificate authentication for access.
    .PARAMETER Name
        Name of the WSDL file to remove.
    .PARAMETER Comment
        Any comments to preserve information about the WSDL.
    .PARAMETER Overwrite
        Overwrite any existing WSDL of the same name.
    .EXAMPLE
        PS C:\>Invoke-NSImportAppfwwsdl -src <string> -name <string>
        An example how to import appfwwsdl config Object(s).
    .NOTES
        File Name : Invoke-NSImportAppfwwsdl
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwwsdl/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateLength(1, 2047)]
        [string]$Src,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [boolean]$Overwrite 

    )
    begin {
        Write-Verbose "Invoke-NSImportAppfwwsdl: Starting"
    }
    process {
        try {
            $payload = @{ src = $src
                name          = $name
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('overwrite') ) { $payload.Add('overwrite', $overwrite) }
            if ( $PSCmdlet.ShouldProcess($Name, "Import Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwwsdl -Action import -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSImportAppfwwsdl: Finished"
    }
}

function Invoke-NSDeleteAppfwwsdl {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for WSDL file resource.
    .PARAMETER Name
        Name of the WSDL file to remove.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwwsdl -Name <string>
        An example how to delete appfwwsdl config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwwsdl
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwwsdl/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwwsdl: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwwsdl -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwwsdl: Finished"
    }
}

function Invoke-NSGetAppfwwsdl {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for WSDL file resource.
    .PARAMETER Name
        Name of the WSDL file to remove.
    .PARAMETER GetAll
        Retrieve all appfwwsdl object(s).
    .PARAMETER Count
        If specified, the count of the appfwwsdl object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwwsdl
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwwsdl -GetAll
        Get all appfwwsdl data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwwsdl -name <string>
        Get appfwwsdl object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwwsdl -Filter @{ 'name'='<value>' }
        Get appfwwsdl data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwwsdl
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwwsdl/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwwsdl: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwwsdl objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwwsdl -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwwsdl objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwwsdl -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwwsdl objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwwsdl -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwwsdl configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwwsdl -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwwsdl configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwwsdl -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwwsdl: Ended"
    }
}

function Invoke-NSAddAppfwxmlcontenttype {
    <#
    .SYNOPSIS
        Add Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for XML Content type resource.
    .PARAMETER Xmlcontenttypevalue
        Content type to be classified as XML.
    .PARAMETER Isregex
        Is field name a regular expression?.
          
        Possible values = REGEX, NOTREGEX
    .PARAMETER PassThru
        Return details about the created appfwxmlcontenttype item.
    .EXAMPLE
        PS C:\>Invoke-NSAddAppfwxmlcontenttype -xmlcontenttypevalue <string>
        An example how to add appfwxmlcontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSAddAppfwxmlcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwxmlcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Xmlcontenttypevalue,

        [ValidateSet('REGEX', 'NOTREGEX')]
        [string]$Isregex = 'NOTREGEX',

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSAddAppfwxmlcontenttype: Starting"
    }
    process {
        try {
            $payload = @{ xmlcontenttypevalue = $xmlcontenttypevalue }
            if ( $PSBoundParameters.ContainsKey('isregex') ) { $payload.Add('isregex', $isregex) }
            if ( $PSCmdlet.ShouldProcess("appfwxmlcontenttype", "Add Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwxmlcontenttype -Payload $payload -GetWarning
                #HTTP Status Code on Success: 201 Created
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwxmlcontenttype -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSAddAppfwxmlcontenttype: Finished"
    }
}

function Invoke-NSDeleteAppfwxmlcontenttype {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for XML Content type resource.
    .PARAMETER Xmlcontenttypevalue
        Content type to be classified as XML.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwxmlcontenttype -Xmlcontenttypevalue <string>
        An example how to delete appfwxmlcontenttype config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwxmlcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwxmlcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Xmlcontenttypevalue 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwxmlcontenttype: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$xmlcontenttypevalue", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwxmlcontenttype -NitroPath nitro/v1/config -Resource $xmlcontenttypevalue -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwxmlcontenttype: Finished"
    }
}

function Invoke-NSGetAppfwxmlcontenttype {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for XML Content type resource.
    .PARAMETER Xmlcontenttypevalue
        Content type to be classified as XML.
    .PARAMETER GetAll
        Retrieve all appfwxmlcontenttype object(s).
    .PARAMETER Count
        If specified, the count of the appfwxmlcontenttype object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlcontenttype
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlcontenttype -GetAll
        Get all appfwxmlcontenttype data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlcontenttype -Count
        Get the number of appfwxmlcontenttype objects.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlcontenttype -name <string>
        Get appfwxmlcontenttype object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlcontenttype -Filter @{ 'name'='<value>' }
        Get appfwxmlcontenttype data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwxmlcontenttype
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwxmlcontenttype/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Xmlcontenttypevalue,

        [Parameter(ParameterSetName = 'Count', Mandatory)]
        [Switch]$Count,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'GetAll')]
        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwxmlcontenttype: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwxmlcontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlcontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwxmlcontenttype objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlcontenttype -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwxmlcontenttype objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlcontenttype -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwxmlcontenttype configuration for property 'xmlcontenttypevalue'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlcontenttype -NitroPath nitro/v1/config -Resource $xmlcontenttypevalue -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwxmlcontenttype configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlcontenttype -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwxmlcontenttype: Ended"
    }
}

function Invoke-NSImportAppfwxmlerrorpage {
    <#
    .SYNOPSIS
        Import Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for xml error page resource.
    .PARAMETER Src
        URL (protocol, host, path, and name) for the location at which to store the imported XML error object.
        NOTE: The import fails if the object to be imported is on an HTTPS server that requires client certificate authentication for access.
    .PARAMETER Name
        Indicates name of the imported xml error page to be removed.
    .PARAMETER Comment
        Any comments to preserve information about the XML error object.
    .PARAMETER Overwrite
        Overwrite any existing XML error object of the same name.
    .EXAMPLE
        PS C:\>Invoke-NSImportAppfwxmlerrorpage -src <string> -name <string>
        An example how to import appfwxmlerrorpage config Object(s).
    .NOTES
        File Name : Invoke-NSImportAppfwxmlerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwxmlerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateLength(1, 2047)]
        [string]$Src,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [boolean]$Overwrite 

    )
    begin {
        Write-Verbose "Invoke-NSImportAppfwxmlerrorpage: Starting"
    }
    process {
        try {
            $payload = @{ src = $src
                name          = $name
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('overwrite') ) { $payload.Add('overwrite', $overwrite) }
            if ( $PSCmdlet.ShouldProcess($Name, "Import Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwxmlerrorpage -Action import -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSImportAppfwxmlerrorpage: Finished"
    }
}

function Invoke-NSChangeAppfwxmlerrorpage {
    <#
    .SYNOPSIS
        Change Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for xml error page resource.
    .PARAMETER Name
        Indicates name of the imported xml error page to be removed.
    .PARAMETER PassThru
        Return details about the created appfwxmlerrorpage item.
    .EXAMPLE
        PS C:\>Invoke-NSChangeAppfwxmlerrorpage -name <string>
        An example how to change appfwxmlerrorpage config Object(s).
    .NOTES
        File Name : Invoke-NSChangeAppfwxmlerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwxmlerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [Switch]$PassThru 
    )
    begin {
        Write-Verbose "Invoke-NSChangeAppfwxmlerrorpage: Starting"
    }
    process {
        try {
            $payload = @{ name = $name }

            if ( $PSCmdlet.ShouldProcess("appfwxmlerrorpage", "Change Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwxmlerrorpage -Action update -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                if ( $PSBoundParameters.ContainsKey('PassThru') ) {
                    Write-Output (Invoke-NSGetAppfwxmlerrorpage -Filter $payload)
                } else {
                    Write-Output $result
                }
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSChangeAppfwxmlerrorpage: Finished"
    }
}

function Invoke-NSDeleteAppfwxmlerrorpage {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for xml error page resource.
    .PARAMETER Name
        Indicates name of the imported xml error page to be removed.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwxmlerrorpage -Name <string>
        An example how to delete appfwxmlerrorpage config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwxmlerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwxmlerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwxmlerrorpage: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwxmlerrorpage -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwxmlerrorpage: Finished"
    }
}

function Invoke-NSGetAppfwxmlerrorpage {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for xml error page resource.
    .PARAMETER Name
        Indicates name of the imported xml error page to be removed.
    .PARAMETER GetAll
        Retrieve all appfwxmlerrorpage object(s).
    .PARAMETER Count
        If specified, the count of the appfwxmlerrorpage object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlerrorpage
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlerrorpage -GetAll
        Get all appfwxmlerrorpage data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlerrorpage -name <string>
        Get appfwxmlerrorpage object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlerrorpage -Filter @{ 'name'='<value>' }
        Get appfwxmlerrorpage data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwxmlerrorpage
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwxmlerrorpage/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwxmlerrorpage: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwxmlerrorpage objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlerrorpage -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwxmlerrorpage objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlerrorpage -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwxmlerrorpage objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlerrorpage -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwxmlerrorpage configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlerrorpage -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwxmlerrorpage configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlerrorpage -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwxmlerrorpage: Ended"
    }
}

function Invoke-NSDeleteAppfwxmlschema {
    <#
    .SYNOPSIS
        Delete Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for XML schema resource.
    .PARAMETER Name
        Name of the XML Schema object to remove.
    .EXAMPLE
        PS C:\>Invoke-NSDeleteAppfwxmlschema -Name <string>
        An example how to delete appfwxmlschema config Object(s).
    .NOTES
        File Name : Invoke-NSDeleteAppfwxmlschema
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwxmlschema/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [string]$Name 
    )
    begin {
        Write-Verbose "Invoke-NSDeleteAppfwxmlschema: Starting"
    }
    process {
        try {
            $arguments = @{ }

            if ( $PSCmdlet.ShouldProcess("$name", "Delete Application Firewall configuration. config Object") ) {
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method DELETE -Type appfwxmlschema -NitroPath nitro/v1/config -Resource $name -Arguments $arguments
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $response
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSDeleteAppfwxmlschema: Finished"
    }
}

function Invoke-NSImportAppfwxmlschema {
    <#
    .SYNOPSIS
        Import Application Firewall configuration. config Object.
    .DESCRIPTION
        Configuration for XML schema resource.
    .PARAMETER Src
        URL (protocol, host, path, and file name) for the location at which to store the imported XML Schema.
        NOTE: The import fails if the object to be imported is on an HTTPS server that requires client certificate authentication for access.
    .PARAMETER Name
        Name of the XML Schema object to remove.
    .PARAMETER Comment
        Any comments to preserve information about the XML Schema object.
    .PARAMETER Overwrite
        Overwrite any existing XML Schema object of the same name.
    .EXAMPLE
        PS C:\>Invoke-NSImportAppfwxmlschema -src <string> -name <string>
        An example how to import appfwxmlschema config Object(s).
    .NOTES
        File Name : Invoke-NSImportAppfwxmlschema
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwxmlschema/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(Mandatory)]
        [ValidateLength(1, 2047)]
        [string]$Src,

        [Parameter(Mandatory)]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,

        [string]$Comment,

        [boolean]$Overwrite 

    )
    begin {
        Write-Verbose "Invoke-NSImportAppfwxmlschema: Starting"
    }
    process {
        try {
            $payload = @{ src = $src
                name          = $name
            }
            if ( $PSBoundParameters.ContainsKey('comment') ) { $payload.Add('comment', $comment) }
            if ( $PSBoundParameters.ContainsKey('overwrite') ) { $payload.Add('overwrite', $overwrite) }
            if ( $PSCmdlet.ShouldProcess($Name, "Import Application Firewall configuration. config Object") ) {
                $result = Invoke-NSNitroApi -NSSession $NSSession -Method POST -NitroPath nitro/v1/config -Type appfwxmlschema -Action import -Payload $payload -GetWarning
                #HTTP Status Code on Success: 200 OK
                #HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error
                Write-Output $result
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            throw $_
        }
    }
    end {
        Write-Verbose "Invoke-NSImportAppfwxmlschema: Finished"
    }
}

function Invoke-NSGetAppfwxmlschema {
    <#
    .SYNOPSIS
        Get Application Firewall configuration. config object(s).
    .DESCRIPTION
        Configuration for XML schema resource.
    .PARAMETER Name
        Name of the XML Schema object to remove.
    .PARAMETER GetAll
        Retrieve all appfwxmlschema object(s).
    .PARAMETER Count
        If specified, the count of the appfwxmlschema object(s) will be returned.
    .PARAMETER Filter
        Specify a filter.
        -Filter @{ 'name'='<value>' }
    .PARAMETER ViewSummary
        When specified, only a summary of information is returned.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlschema
        Get data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlschema -GetAll
        Get all appfwxmlschema data.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlschema -name <string>
        Get appfwxmlschema object by specifying for example the name.
    .EXAMPLE
        PS C:\>Invoke-NSGetAppfwxmlschema -Filter @{ 'name'='<value>' }
        Get appfwxmlschema data with a filter.
    .NOTES
        File Name : Invoke-NSGetAppfwxmlschema
        Version : v2311.2021
        Author : John Billekens
        Reference : https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/appfw/appfwxmlschema/
        Requires : PowerShell v5.1 and up
                    NS 13.x and up.
                    NS 12 and lower may work, not guaranteed (best effort).
    .LINK
        https://blog.j81.nl
    #>

    [CmdletBinding(DefaultParameterSetName = "GetAll")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPasswordParams', '')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseBOMForUnicodeEncodedFile', '')]
    param(
        [Parameter(DontShow)]
        [Object]$NSSession = (Get-NSSession),

        [Parameter(ParameterSetName = 'GetByResource')]
        [ValidateScript({ $_.Length -gt 1 })]
        [string]$Name,
            
        [hashtable]$Filter = @{ },

        [Parameter(ParameterSetName = 'GetAll')]
        [Switch]$GetAll,

        [Parameter(ParameterSetName = 'Get')]
        [Switch]$ViewSummary

    )
    begin {
        Write-Verbose "Invoke-NSGetAppfwxmlschema: Beginning"
    }
    process {
        try {
            if ( $PsCmdlet.ParameterSetName -eq 'GetAll' ) {
                $query = @{ }
                Write-Verbose "Retrieving all appfwxmlschema objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlschema -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'Count' ) {
                if ( $PSBoundParameters.ContainsKey('Count') ) { $query = @{ 'count' = 'yes' } }
                Write-Verbose "Retrieving total count for appfwxmlschema objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlschema -NitroPath nitro/v1/config -Query $query -Summary:$ViewSummary -Filter $Filter -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByArgument' ) {
                Write-Verbose "Retrieving appfwxmlschema objects by arguments"
                $arguments = @{ } 
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlschema -NitroPath nitro/v1/config -Arguments $arguments -GetWarning
            } elseif ( $PsCmdlet.ParameterSetName -eq 'GetByResource' ) {
                Write-Verbose "Retrieving appfwxmlschema configuration for property 'name'"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlschema -NitroPath nitro/v1/config -Resource $name -Summary:$ViewSummary -Filter $Filter -GetWarning
            } else {
                Write-Verbose "Retrieving appfwxmlschema configuration objects"
                $response = Invoke-NSNitroApi -NSSession $NSSession -Method GET -Type appfwxmlschema -NitroPath nitro/v1/config -Summary:$ViewSummary -Query $query -Filter $Filter -GetWarning
            }
        } catch {
            Write-Verbose "ERROR: $($_.Exception.Message)"
            $response = $null
        }
        Write-Output $response
    }
    end {
        Write-Verbose "Invoke-NSGetAppfwxmlschema: Ended"
    }
}

# SIG # Begin signature block
# MIIkmgYJKoZIhvcNAQcCoIIkizCCJIcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCFvbKhoyD0h0LN
# SevBlSiZcZnQOiudUdfjWGoWsJxSr6CCHl4wggTzMIID26ADAgECAhAsJ03zZBC0
# i/247uUvWN5TMA0GCSqGSIb3DQEBCwUAMHwxCzAJBgNVBAYTAkdCMRswGQYDVQQI
# ExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGDAWBgNVBAoT
# D1NlY3RpZ28gTGltaXRlZDEkMCIGA1UEAxMbU2VjdGlnbyBSU0EgQ29kZSBTaWdu
# aW5nIENBMB4XDTIxMDUwNTAwMDAwMFoXDTI0MDUwNDIzNTk1OVowWzELMAkGA1UE
# BhMCTkwxEjAQBgNVBAcMCVZlbGRob3ZlbjEbMBkGA1UECgwSSm9oYW5uZXMgQmls
# bGVrZW5zMRswGQYDVQQDDBJKb2hhbm5lcyBCaWxsZWtlbnMwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQCsfgRG81keOHalHfCUgxOa1Qy4VNOnGxB8SL8e
# rjP9SfcF13McP7F1HGka5Be495pTZ+duGbaQMNozwg/5Dg9IRJEeBabeSSJJCbZo
# SNpmUu7NNRRfidQxlPC81LxTVHxJ7In0MEfCVm7rWcri28MRCAuafqOfSE+hyb1Z
# /tKyCyQ5RUq3kjs/CF+VfMHsJn6ZT63YqewRkwHuc7UogTTZKjhPJ9prGLTer8UX
# UgvsGRbvhYZXIEuy+bmx/iJ1yRl1kX4nj6gUYzlhemOnlSDD66YOrkLDhXPMXLym
# AN7h0/W5Bo//R5itgvdGBkXkWCKRASnq/9PTcoxW6mwtgU8xAgMBAAGjggGQMIIB
# jDAfBgNVHSMEGDAWgBQO4TqoUzox1Yq+wbutZxoDha00DjAdBgNVHQ4EFgQUZWMy
# gC0i1u2NZ1msk2Mm5nJm5AswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAw
# EwYDVR0lBAwwCgYIKwYBBQUHAwMwEQYJYIZIAYb4QgEBBAQDAgQQMEoGA1UdIARD
# MEEwNQYMKwYBBAGyMQECAQMCMCUwIwYIKwYBBQUHAgEWF2h0dHBzOi8vc2VjdGln
# by5jb20vQ1BTMAgGBmeBDAEEATBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vY3Js
# LnNlY3RpZ28uY29tL1NlY3RpZ29SU0FDb2RlU2lnbmluZ0NBLmNybDBzBggrBgEF
# BQcBAQRnMGUwPgYIKwYBBQUHMAKGMmh0dHA6Ly9jcnQuc2VjdGlnby5jb20vU2Vj
# dGlnb1JTQUNvZGVTaWduaW5nQ0EuY3J0MCMGCCsGAQUFBzABhhdodHRwOi8vb2Nz
# cC5zZWN0aWdvLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEARjv9ieRocb1DXRWm3XtY
# jjuSRjlvkoPd9wS6DNfsGlSU42BFd9LCKSyRREZVu8FDq7dN0PhD4bBTT+k6AgrY
# KG6f/8yUponOdxskv850SjN2S2FeVuR20pqActMrpd1+GCylG8mj8RGjdrLQ3QuX
# qYKS68WJ39WWYdVB/8Ftajir5p6sAfwHErLhbJS6WwmYjGI/9SekossvU8mZjZwo
# Gbu+fjZhPc4PhjbEh0ABSsPMfGjQQsg5zLFjg/P+cS6hgYI7qctToo0TexGe32DY
# fFWHrHuBErW2qXEJvzSqM5OtLRD06a4lH5ZkhojhMOX9S8xDs/ArDKgX1j1Xm4Tu
# DjCCBYEwggRpoAMCAQICEDlyRDr5IrdR19NsEN0xNZUwDQYJKoZIhvcNAQEMBQAw
# ezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
# A1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV
# BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczAeFw0xOTAzMTIwMDAwMDBaFw0y
# ODEyMzEyMzU5NTlaMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMKTmV3IEplcnNl
# eTEUMBIGA1UEBxMLSmVyc2V5IENpdHkxHjAcBgNVBAoTFVRoZSBVU0VSVFJVU1Qg
# TmV0d29yazEuMCwGA1UEAxMlVVNFUlRydXN0IFJTQSBDZXJ0aWZpY2F0aW9uIEF1
# dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIASZRc2DsPb
# CLPQrFcNdu3NJ9NMrVCDYeKqIE0JLWQJ3M6Jn8w9qez2z8Hc8dOx1ns3KBErR9o5
# xrw6GbRfpr19naNjQrZ28qk7K5H44m/Q7BYgkAk+4uh0yRi0kdRiZNt/owbxiBhq
# kCI8vP4T8IcUe/bkH47U5FHGEWdGCFHLhhRUP7wz/n5snP8WnRi9UY41pqdmyHJn
# 2yFmsdSbeAPAUDrozPDcvJ5M/q8FljUfV1q3/875PbcstvZU3cjnEjpNrkyKt1ya
# tLcgPcp/IjSufjtoZgFE5wFORlObM2D3lL5TN5BzQ/Myw1Pv26r+dE5px2uMYJPe
# xMcM3+EyrsyTO1F4lWeL7j1W/gzQaQ8bD/MlJmszbfduR/pzQ+V+DqVmsSl8MoRj
# VYnEDcGTVDAZE6zTfTen6106bDVc20HXEtqpSQvf2ICKCZNijrVmzyWIzYS4sT+k
# OQ/ZAp7rEkyVfPNrBaleFoPMuGfi6BOdzFuC00yz7Vv/3uVzrCM7LQC/NVV0CUnY
# SVgaf5I25lGSDvMmfRxNF7zJ7EMm0L9BX0CpRET0medXh55QH1dUqD79dGMvsVBl
# CeZYQi5DGky08CVHWfoEHpPUJkZKUIGy3r54t/xnFeHJV4QeD2PW6WK61l9VLupc
# xigIBCU5uA4rqfJMlxwHPw1S9e3vL4IPAgMBAAGjgfIwge8wHwYDVR0jBBgwFoAU
# oBEKIz6W8Qfs4q8p74Klf9AwpLQwHQYDVR0OBBYEFFN5v1qqK0rPVIDh2JvAnfKy
# A2bLMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MBEGA1UdIAQKMAgw
# BgYEVR0gADBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vY3JsLmNvbW9kb2NhLmNv
# bS9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDA0BggrBgEFBQcBAQQoMCYwJAYI
# KwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2NhLmNvbTANBgkqhkiG9w0BAQwF
# AAOCAQEAGIdR3HQhPZyK4Ce3M9AuzOzw5steEd4ib5t1jp5y/uTW/qofnJYt7wNK
# fq70jW9yPEM7wD/ruN9cqqnGrvL82O6je0P2hjZ8FODN9Pc//t64tIrwkZb+/UNk
# fv3M0gGhfX34GRnJQisTv1iLuqSiZgR2iJFODIkUzqJNyTKzuugUGrxx8VvwQQuY
# AAoiAxDlDLH5zZI3Ge078eQ6tvlFEyZ1r7uq7z97dzvSxAKRPRkA0xdcOds/exgN
# Rc2ThZYvXd9ZFk8/Ub3VRRg/7UqO6AZhdCMWtQ1QcydER38QXYkqa4UxFMToqWpM
# gLxqeM+4f452cpkMnf7XkQgWoaNflTCCBfUwggPdoAMCAQICEB2iSDBvmyYY0ILg
# ln0z02owDQYJKoZIhvcNAQEMBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpO
# ZXcgSmVyc2V5MRQwEgYDVQQHEwtKZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVT
# RVJUUlVTVCBOZXR3b3JrMS4wLAYDVQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmlj
# YXRpb24gQXV0aG9yaXR5MB4XDTE4MTEwMjAwMDAwMFoXDTMwMTIzMTIzNTk1OVow
# fDELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
# A1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMSQwIgYDVQQD
# ExtTZWN0aWdvIFJTQSBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3DQEBAQUA
# A4IBDwAwggEKAoIBAQCGIo0yhXoYn0nwli9jCB4t3HyfFM/jJrYlZilAhlRGdDFi
# xRDtsocnppnLlTDAVvWkdcapDlBipVGREGrgS2Ku/fD4GKyn/+4uMyD6DBmJqGx7
# rQDDYaHcaWVtH24nlteXUYam9CflfGqLlR5bYNV+1xaSnAAvaPeX7Wpyvjg7Y96P
# v25MQV0SIAhZ6DnNj9LWzwa0VwW2TqE+V2sfmLzEYtYbC43HZhtKn52BxHJAteJf
# 7wtF/6POF6YtVbC3sLxUap28jVZTxvC6eVBJLPcDuf4vZTXyIuosB69G2flGHNyM
# fHEo8/6nxhTdVZFuihEN3wYklX0Pp6F8OtqGNWHTAgMBAAGjggFkMIIBYDAfBgNV
# HSMEGDAWgBRTeb9aqitKz1SA4dibwJ3ysgNmyzAdBgNVHQ4EFgQUDuE6qFM6MdWK
# vsG7rWcaA4WtNA4wDgYDVR0PAQH/BAQDAgGGMBIGA1UdEwEB/wQIMAYBAf8CAQAw
# HQYDVR0lBBYwFAYIKwYBBQUHAwMGCCsGAQUFBwMIMBEGA1UdIAQKMAgwBgYEVR0g
# ADBQBgNVHR8ESTBHMEWgQ6BBhj9odHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVNF
# UlRydXN0UlNBQ2VydGlmaWNhdGlvbkF1dGhvcml0eS5jcmwwdgYIKwYBBQUHAQEE
# ajBoMD8GCCsGAQUFBzAChjNodHRwOi8vY3J0LnVzZXJ0cnVzdC5jb20vVVNFUlRy
# dXN0UlNBQWRkVHJ1c3RDQS5jcnQwJQYIKwYBBQUHMAGGGWh0dHA6Ly9vY3NwLnVz
# ZXJ0cnVzdC5jb20wDQYJKoZIhvcNAQEMBQADggIBAE1jUO1HNEphpNveaiqMm/EA
# AB4dYns61zLC9rPgY7P7YQCImhttEAcET7646ol4IusPRuzzRl5ARokS9At3Wpwq
# QTr81vTr5/cVlTPDoYMot94v5JT3hTODLUpASL+awk9KsY8k9LOBN9O3ZLCmI2pZ
# aFJCX/8E6+F0ZXkI9amT3mtxQJmWunjxucjiwwgWsatjWsgVgG10Xkp1fqW4w2y1
# z99KeYdcx0BNYzX2MNPPtQoOCwR/oEuuu6Ol0IQAkz5TXTSlADVpbL6fICUQDRn7
# UJBhvjmPeo5N9p8OHv4HURJmgyYZSJXOSsnBf/M6BZv5b9+If8AjntIeQ3pFMcGc
# TanwWbJZGehqjSkEAnd8S0vNcL46slVaeD68u28DECV3FTSK+TbMQ5Lkuk/xYpMo
# JVcp+1EZx6ElQGqEV8aynbG8HArafGd+fS7pKEwYfsR7MUFxmksp7As9V1DSyt39
# ngVR5UR43QHesXWYDVQk/fBO4+L4g71yuss9Ou7wXheSaG3IYfmm8SoKC6W59J7u
# mDIFhZ7r+YMp08Ysfb06dy6LN0KgaoLtO0qqlBCk4Q34F8W2WnkzGJLjtXX4oemO
# CiUe5B7xn1qHI/+fpFGe+zmAEc3btcSnqIBv5VPU4OOiwtJbGvoyJi1qV3AcPKRY
# LqPzW0sH3DJZ84enGm1YMIIG7DCCBNSgAwIBAgIQMA9vrN1mmHR8qUY2p3gtuTAN
# BgkqhkiG9w0BAQwFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJz
# ZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNU
# IE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBB
# dXRob3JpdHkwHhcNMTkwNTAyMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjB9MQswCQYD
# VQQGEwJHQjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdT
# YWxmb3JkMRgwFgYDVQQKEw9TZWN0aWdvIExpbWl0ZWQxJTAjBgNVBAMTHFNlY3Rp
# Z28gUlNBIFRpbWUgU3RhbXBpbmcgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw
# ggIKAoICAQDIGwGv2Sx+iJl9AZg/IJC9nIAhVJO5z6A+U++zWsB21hoEpc5Hg7Xr
# xMxJNMvzRWW5+adkFiYJ+9UyUnkuyWPCE5u2hj8BBZJmbyGr1XEQeYf0RirNxFrJ
# 29ddSU1yVg/cyeNTmDoqHvzOWEnTv/M5u7mkI0Ks0BXDf56iXNc48RaycNOjxN+z
# xXKsLgp3/A2UUrf8H5VzJD0BKLwPDU+zkQGObp0ndVXRFzs0IXuXAZSvf4DP0REK
# V4TJf1bgvUacgr6Unb+0ILBgfrhN9Q0/29DqhYyKVnHRLZRMyIw80xSinL0m/9NT
# IMdgaZtYClT0Bef9Maz5yIUXx7gpGaQpL0bj3duRX58/Nj4OMGcrRrc1r5a+2kxg
# zKi7nw0U1BjEMJh0giHPYla1IXMSHv2qyghYh3ekFesZVf/QOVQtJu5FGjpvzdeE
# 8NfwKMVPZIMC1Pvi3vG8Aij0bdonigbSlofe6GsO8Ft96XZpkyAcSpcsdxkrk5WY
# nJee647BeFbGRCXfBhKaBi2fA179g6JTZ8qx+o2hZMmIklnLqEbAyfKm/31X2xJ2
# +opBJNQb/HKlFKLUrUMcpEmLQTkUAx4p+hulIq6lw02C0I3aa7fb9xhAV3PwcaP7
# Sn1FNsH3jYL6uckNU4B9+rY5WDLvbxhQiddPnTO9GrWdod6VQXqngwIDAQABo4IB
# WjCCAVYwHwYDVR0jBBgwFoAUU3m/WqorSs9UgOHYm8Cd8rIDZsswHQYDVR0OBBYE
# FBqh+GEZIA/DQXdFKI7RNV8GEgRVMA4GA1UdDwEB/wQEAwIBhjASBgNVHRMBAf8E
# CDAGAQH/AgEAMBMGA1UdJQQMMAoGCCsGAQUFBwMIMBEGA1UdIAQKMAgwBgYEVR0g
# ADBQBgNVHR8ESTBHMEWgQ6BBhj9odHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVNF
# UlRydXN0UlNBQ2VydGlmaWNhdGlvbkF1dGhvcml0eS5jcmwwdgYIKwYBBQUHAQEE
# ajBoMD8GCCsGAQUFBzAChjNodHRwOi8vY3J0LnVzZXJ0cnVzdC5jb20vVVNFUlRy
# dXN0UlNBQWRkVHJ1c3RDQS5jcnQwJQYIKwYBBQUHMAGGGWh0dHA6Ly9vY3NwLnVz
# ZXJ0cnVzdC5jb20wDQYJKoZIhvcNAQEMBQADggIBAG1UgaUzXRbhtVOBkXXfA3oy
# Cy0lhBGysNsqfSoF9bw7J/RaoLlJWZApbGHLtVDb4n35nwDvQMOt0+LkVvlYQc/x
# QuUQff+wdB+PxlwJ+TNe6qAcJlhc87QRD9XVw+K81Vh4v0h24URnbY+wQxAPjeT5
# OGK/EwHFhaNMxcyyUzCVpNb0llYIuM1cfwGWvnJSajtCN3wWeDmTk5SbsdyybUFt
# Z83Jb5A9f0VywRsj1sJVhGbks8VmBvbz1kteraMrQoohkv6ob1olcGKBc2NeoLvY
# 3NdK0z2vgwY4Eh0khy3k/ALWPncEvAQ2ted3y5wujSMYuaPCRx3wXdahc1cFaJqn
# yTdlHb7qvNhCg0MFpYumCf/RoZSmTqo9CfUFbLfSZFrYKiLCS53xOV5M3kg9mzSW
# mglfjv33sVKRzj+J9hyhtal1H3G/W0NdZT1QgW6r8NDT/LKzH7aZlib0PHmLXGTM
# ze4nmuWgwAxyh8FuTVrTHurwROYybxzrF06Uw3hlIDsPQaof6aFBnf6xuKBlKjTg
# 3qj5PObBMLvAoGMs/FwWAKjQxH/qEZ0eBsambTJdtDgJK0kHqv3sMNrxpy/Pt/36
# 0KOE2See+wFmd7lWEOEgbsausfm2usg1XTN2jvF8IAwqd661ogKGuinutFoAsYyr
# 4/kKyVRd1LlqdJ69SK6YMIIG9TCCBN2gAwIBAgIQOUwl4XygbSeoZeI72R0i1DAN
# BgkqhkiG9w0BAQwFADB9MQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRlciBN
# YW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRgwFgYDVQQKEw9TZWN0aWdvIExp
# bWl0ZWQxJTAjBgNVBAMTHFNlY3RpZ28gUlNBIFRpbWUgU3RhbXBpbmcgQ0EwHhcN
# MjMwNTAzMDAwMDAwWhcNMzQwODAyMjM1OTU5WjBqMQswCQYDVQQGEwJHQjETMBEG
# A1UECBMKTWFuY2hlc3RlcjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMSwwKgYD
# VQQDDCNTZWN0aWdvIFJTQSBUaW1lIFN0YW1waW5nIFNpZ25lciAjNDCCAiIwDQYJ
# KoZIhvcNAQEBBQADggIPADCCAgoCggIBAKSTKFJLzyeHdqQpHJk4wOcO1NEc7GjL
# AWTkis13sHFlgryf/Iu7u5WY+yURjlqICWYRFFiyuiJb5vYy8V0twHqiDuDgVmTt
# oeWBIHIgZEFsx8MI+vN9Xe8hmsJ+1yzDuhGYHvzTIAhCs1+/f4hYMqsws9iMepZK
# GRNcrPznq+kcFi6wsDiVSs+FUKtnAyWhuzjpD2+pWpqRKBM1uR/zPeEkyGuxmegN
# 77tN5T2MVAOR0Pwtz1UzOHoJHAfRIuBjhqe+/dKDcxIUm5pMCUa9NLzhS1B7cuBb
# /Rm7HzxqGXtuuy1EKr48TMysigSTxleGoHM2K4GX+hubfoiH2FJ5if5udzfXu1Cf
# +hglTxPyXnypsSBaKaujQod34PRMAkjdWKVTpqOg7RmWZRUpxe0zMCXmloOBmvZg
# ZpBYB4DNQnWs+7SR0MXdAUBqtqgQ7vaNereeda/TpUsYoQyfV7BeJUeRdM11EtGc
# b+ReDZvsdSbu/tP1ki9ShejaRFEqoswAyodmQ6MbAO+itZadYq0nC/IbSsnDlEI3
# iCCEqIeuw7ojcnv4VO/4ayewhfWnQ4XYKzl021p3AtGk+vXNnD3MH65R0Hts2B0t
# EUJTcXTC5TWqLVIS2SXP8NPQkUMS1zJ9mGzjd0HI/x8kVO9urcY+VXvxXIc6ZPFg
# SwVP77kv7AkTAgMBAAGjggGCMIIBfjAfBgNVHSMEGDAWgBQaofhhGSAPw0F3RSiO
# 0TVfBhIEVTAdBgNVHQ4EFgQUAw8xyJEqk71j89FdTaQ0D9KVARgwDgYDVR0PAQH/
# BAQDAgbAMAwGA1UdEwEB/wQCMAAwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwgwSgYD
# VR0gBEMwQTA1BgwrBgEEAbIxAQIBAwgwJTAjBggrBgEFBQcCARYXaHR0cHM6Ly9z
# ZWN0aWdvLmNvbS9DUFMwCAYGZ4EMAQQCMEQGA1UdHwQ9MDswOaA3oDWGM2h0dHA6
# Ly9jcmwuc2VjdGlnby5jb20vU2VjdGlnb1JTQVRpbWVTdGFtcGluZ0NBLmNybDB0
# BggrBgEFBQcBAQRoMGYwPwYIKwYBBQUHMAKGM2h0dHA6Ly9jcnQuc2VjdGlnby5j
# b20vU2VjdGlnb1JTQVRpbWVTdGFtcGluZ0NBLmNydDAjBggrBgEFBQcwAYYXaHR0
# cDovL29jc3Auc2VjdGlnby5jb20wDQYJKoZIhvcNAQEMBQADggIBAEybZVj64HnP
# 7xXDMm3eM5Hrd1ji673LSjx13n6UbcMixwSV32VpYRMM9gye9YkgXsGHxwMkysel
# 8Cbf+PgxZQ3g621RV6aMhFIIRhwqwt7y2opF87739i7Efu347Wi/elZI6WHlmjl3
# vL66kWSIdf9dhRY0J9Ipy//tLdr/vpMM7G2iDczD8W69IZEaIwBSrZfUYngqhHmo
# 1z2sIY9wwyR5OpfxDaOjW1PYqwC6WPs1gE9fKHFsGV7Cg3KQruDG2PKZ++q0kmV8
# B3w1RB2tWBhrYvvebMQKqWzTIUZw3C+NdUwjwkHQepY7w0vdzZImdHZcN6CaJJ5O
# X07Tjw/lE09ZRGVLQ2TPSPhnZ7lNv8wNsTow0KE9SK16ZeTs3+AB8LMqSjmswaT5
# qX010DJAoLEZKhghssh9BXEaSyc2quCYHIN158d+S4RDzUP7kJd2KhKsQMFwW5kK
# QPqAbZRhe8huuchnZyRcUI0BIN4H9wHU+C4RzZ2D5fjKJRxEPSflsIZHKgsbhHZ9
# e2hPjbf3E7TtoC3ucw/ZELqdmSx813UfjxDElOZ+JOWVSoiMJ9aFZh35rmR2kehI
# /shVCu0pwx/eOKbAFPsyPfipg2I2yMO+AIccq/pKQhyJA9z1XHxw2V14Tu6fXiDm
# CWp8KwijSPUV/ARP380hHHrl9Y4a1LlAMYIFkjCCBY4CAQEwgZAwfDELMAkGA1UE
# BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2Fs
# Zm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMSQwIgYDVQQDExtTZWN0aWdv
# IFJTQSBDb2RlIFNpZ25pbmcgQ0ECECwnTfNkELSL/bju5S9Y3lMwDQYJYIZIAWUD
# BAIBBQCggYQwGAYKKwYBBAGCNwIBDDEKMAigAoAAoQKAADAZBgkqhkiG9w0BCQMx
# DAYKKwYBBAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAvBgkq
# hkiG9w0BCQQxIgQgJz1DpUL8RoCpAaxsydED1NpOjhhSKbcUn1Ax6l4YrP4wDQYJ
# KoZIhvcNAQEBBQAEggEAQoIhGm0fQcEPIorzSUr7UH+Ghln4liEAVVnr3q4mfz0A
# CVzdfvfKJVTzBDP5CVbWd25CwWaaHeQtY+OGA/zx9YcvuomcMLGCgZTz34AIu1Wq
# zzCLYAbfdktesNFZrSolNUFW9IYt27Db52btPpttj+mrP5nucInEotvH36ZEa7CQ
# E1ACuP93y9LgOwEtRahAJ4YpuDD9EVt90ugoGLih3+HbgdklIr+n/d5ZOw72WqH1
# 8LfYSskDKiz+gcGDctC3UWRzqB15rGelQ3tJJfEFM2K8232G7Qjk4hvz+jO1qkbV
# PJwZDWfR6hGpz9gp+waCjBXzDFCBw08fJ4wqOH6nIKGCA0swggNHBgkqhkiG9w0B
# CQYxggM4MIIDNAIBATCBkTB9MQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRl
# ciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRgwFgYDVQQKEw9TZWN0aWdv
# IExpbWl0ZWQxJTAjBgNVBAMTHFNlY3RpZ28gUlNBIFRpbWUgU3RhbXBpbmcgQ0EC
# EDlMJeF8oG0nqGXiO9kdItQwDQYJYIZIAWUDBAICBQCgeTAYBgkqhkiG9w0BCQMx
# CwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0yMzExMjAyMDQxMjJaMD8GCSqG
# SIb3DQEJBDEyBDDwQmPwC1kUgUvIHgyAR+ICIc8WrEgpUzD4jv/zmaJC7Lo8Hi6b
# mzc6KQYaHJhAULcwDQYJKoZIhvcNAQEBBQAEggIADYx6yS7AmyY0C5EQ9xWeTGI/
# ep+p2vD4j7bcXFa1ZKt/3CrqnZ7ssLuXFVCHh8UOsC91JbF+YTp6JXiblI4EQIec
# JaaKbYz9ngdQfUQ/HsvfZsAwkS1kddC5VdghDSO7LTKKy6Ode5nYL85YJwYFCAYD
# lsJYS6yC6/AABB61saiifP916rcqeh4dGKO3pVu7fAfuDS5xN4j18F0YNInDqEqv
# 9rtpuU5mfoRLdB85r45s1mbgOvnzuTpg15ZUvNX2dLVhG14KwPT7BjCuT33O9Hia
# 9SOyEbfhSmm1GjcwZ128tK4YaJEeMFi7Hs/Mu68EkmIVKxgA8/kW72Q/1av1nxxX
# TBr42wANBAtevTCwhaz4AA0UF/srcdDpKsmLpsJv4ItvZnpz88dbPpoaSPd2n0bz
# /DqaVeXakH20pR4QrvC5YaG3KATxyNjqPkA05uAotrsUlb1+xRVQ4+TC9wEue+zC
# X9rO1b3Ss3dPPdx7l7XHu+Xqaa7aYfBMgxQPxFOBcIX4ik/Pl9L5F9EnBZjaRTK8
# RGWqkN4fR3+Mfg5wvlE752a6Bkey7WQ3xyvSPvTYVSvfxr60H/jNhHQmgBw/e8bs
# IQs1n3t7pzuB+AuVZGDf44NKPgXQ0Hi7vxQm2euanXMdOw1bUnwg4pt5PQCdrZRV
# 4ZT4xAfdQJDAOlKuj5I=
# SIG # End signature block