Model/Admin.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

Admin represents a single admin profile

.PARAMETER Id
This is the admin's USERNAME

.PARAMETER Password
No description available.

.PARAMETER Email
No description available.

.PARAMETER Permissions
No description available.

.PARAMETER Picture
No description available.

.PARAMETER Status
No description available.

.PARAMETER AutoDisable
Is this account to be automatically disabled at a certaind date?

.PARAMETER AutoDisableDate
If the above is TRUE, this is the exact timestamp when the account must be disabled

.PARAMETER AllowList
List of allowed sources (IPs and Networks) this Admin can log in from

.OUTPUTS

Admin<PSCustomObject>
#>


function New-SS6Admin {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Id},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Password},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Email},
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Permissions},
        [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Picture},
        [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Status},
        [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${AutoDisable},
        [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[System.DateTime]]
        ${AutoDisableDate},
        [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${AllowList}
    )

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

        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "password" = ${Password}
            "email" = ${Email}
            "permissions" = ${Permissions}
            "picture" = ${Picture}
            "status" = ${Status}
            "autoDisable" = ${AutoDisable}
            "autoDisableDate" = ${AutoDisableDate}
            "allowList" = ${AllowList}
        }

        return $PSO
    }
}