Model/InlineResponse2001.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 Name No description available. .OUTPUTS InlineResponse2001<PSCustomObject> #> function Initialize-SS6InlineResponse2001 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [String] ${Name} ) Process { 'Creating PSCustomObject: SS6AdminModule => SS6InlineResponse2001' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "name" = ${Name} } return $PSO } } <# .SYNOPSIS Convert from JSON to InlineResponse2001<PSCustomObject> .DESCRIPTION Convert from JSON to InlineResponse2001<PSCustomObject> .PARAMETER Json Json object .OUTPUTS InlineResponse2001<PSCustomObject> #> function ConvertFrom-SS6JsonToInlineResponse2001 { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: SS6AdminModule => SS6InlineResponse2001' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in SS6InlineResponse2001 $AllProperties = ("name") 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 "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } $PSO = [PSCustomObject]@{ "name" = ${Name} } return $PSO } } |