Model/InlineObject3.ps1
# # SMServer V6 # Syncplify Server! REST API # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Email No description available. .OUTPUTS InlineObject3<PSCustomObject> #> function Initialize-SS6InlineObject3 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [String] ${Email} ) Process { 'Creating PSCustomObject: SS6AdminModule => SS6InlineObject3' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "email" = ${Email} } return $PSO } } <# .SYNOPSIS Convert from JSON to InlineObject3<PSCustomObject> .DESCRIPTION Convert from JSON to InlineObject3<PSCustomObject> .PARAMETER Json Json object .OUTPUTS InlineObject3<PSCustomObject> #> function ConvertFrom-SS6JsonToInlineObject3 { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: SS6AdminModule => SS6InlineObject3' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in SS6InlineObject3 $AllProperties = ("email") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } if (!([bool]($JsonParameters.PSobject.Properties.name -match "email"))) { #optional property not found $Email = $null } else { $Email = $JsonParameters.PSobject.Properties["email"].value } $PSO = [PSCustomObject]@{ "email" = ${Email} } return $PSO } } |