Model/SrvConfig.ps1

#
# SMServer V6
# Syncplify.me Server! REST API
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER Id
virtual site short-name, ex default

.PARAMETER MaxConn
maximum number of concurrent client connections (hard limit, regardless of anything else)

.PARAMETER MaxConnPerClient
maximum number of connections each client can perform simultaneously

.PARAMETER MaxConnPerUser
maximum number of connections each user profile can perform simultaneously (can be overridden at user level)

.PARAMETER ConnDelay
Anti-hammering delay enforced upon accepting any new incoming client connection

.PARAMETER IdleTimeoutSecs
Number of seconds after which an idle client session will be forcefully terminated

.PARAMETER ProtectorTimeWindowMin
Time window (in minutes) that Protector will count client errors for potential kicking/blocking

.PARAMETER ProtectorErrThreshold
Number of errors that will get a client kicked/blocked if detected within the above TimeWindow

.PARAMETER ProtectorBanForMin
Once Protector determines a client needs to be blocked, it will block it (prevent from connecting) for these many minutes

.PARAMETER ProtectorBehavior
No description available.

.PARAMETER ProtectorCompoundIncr
0-100, how much Protector should increment the ban time if an already-bannec client tries to connect again

.PARAMETER PassComplexity
No description available.

.PARAMETER SafeList
A list of IPs and networks that Protector will never kick/block, regardless of what they do

.PARAMETER AllowList
If empty, any client can connect; if populated, only clients from these IPs and networks can connect

.PARAMETER FtpConf
No description available.

.PARAMETER SshConf
No description available.

.PARAMETER HttpConf
No description available.

.PARAMETER SpeedLimits
List of various speed limits to be appied to dofferent client IPs and networks

.PARAMETER EventHandlers
List of global (server-wide) event handlers

.PARAMETER SmtpConf
No description available.

.PARAMETER LogConf
No description available.

.PARAMETER QuotaTtl
Refresh VFS quotas every not-less-than this number of seconds

.OUTPUTS

SrvConfig<PSCustomObject>
#>


function New-SS6SrvConfig {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Id},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${MaxConn},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${MaxConnPerClient},
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${MaxConnPerUser},
        [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Double]]
        ${ConnDelay},
        [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${IdleTimeoutSecs},
        [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${ProtectorTimeWindowMin},
        [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${ProtectorErrThreshold},
        [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${ProtectorBanForMin},
        [Parameter(Position = 9, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ProtectorBehavior},
        [Parameter(Position = 10, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${ProtectorCompoundIncr},
        [Parameter(Position = 11, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${PassComplexity},
        [Parameter(Position = 12, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${SafeList},
        [Parameter(Position = 13, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${AllowList},
        [Parameter(Position = 14, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${FtpConf},
        [Parameter(Position = 15, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${SshConf},
        [Parameter(Position = 16, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${HttpConf},
        [Parameter(Position = 17, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${SpeedLimits},
        [Parameter(Position = 18, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${EventHandlers},
        [Parameter(Position = 19, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${SmtpConf},
        [Parameter(Position = 20, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${LogConf},
        [Parameter(Position = 21, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${QuotaTtl}
    )

    Process {
        'Creating object: SS6AdminModule => SS6SrvConfig' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "maxConn" = ${MaxConn}
            "maxConnPerClient" = ${MaxConnPerClient}
            "maxConnPerUser" = ${MaxConnPerUser}
            "connDelay" = ${ConnDelay}
            "idleTimeoutSecs" = ${IdleTimeoutSecs}
            "protectorTimeWindowMin" = ${ProtectorTimeWindowMin}
            "protectorErrThreshold" = ${ProtectorErrThreshold}
            "protectorBanForMin" = ${ProtectorBanForMin}
            "ProtectorBehavior" = ${ProtectorBehavior}
            "protectorCompoundIncr" = ${ProtectorCompoundIncr}
            "passComplexity" = ${PassComplexity}
            "safeList" = ${SafeList}
            "allowList" = ${AllowList}
            "ftpConf" = ${FtpConf}
            "sshConf" = ${SshConf}
            "httpConf" = ${HttpConf}
            "speedLimits" = ${SpeedLimits}
            "eventHandlers" = ${EventHandlers}
            "smtpConf" = ${SmtpConf}
            "logConf" = ${LogConf}
            "quotaTtl" = ${QuotaTtl}
        }

        return $PSO
    }
}