Model/InlineObject7.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 Cert PEM encoded certificate generated for the signing request .OUTPUTS InlineObject7<PSCustomObject> #> function Initialize-SS6InlineObject7 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [String] ${Cert} ) Process { 'Creating PSCustomObject: SS6AdminModule => SS6InlineObject7' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "cert" = ${Cert} } return $PSO } } <# .SYNOPSIS Convert from JSON to InlineObject7<PSCustomObject> .DESCRIPTION Convert from JSON to InlineObject7<PSCustomObject> .PARAMETER Json Json object .OUTPUTS InlineObject7<PSCustomObject> #> function ConvertFrom-SS6JsonToInlineObject7 { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: SS6AdminModule => SS6InlineObject7' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in SS6InlineObject7 $AllProperties = ("cert") 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 "cert"))) { #optional property not found $Cert = $null } else { $Cert = $JsonParameters.PSobject.Properties["cert"].value } $PSO = [PSCustomObject]@{ "cert" = ${Cert} } return $PSO } } |