Model/NodesSdnZonesInner.ps1
# # Proxmox VE # Generated module to access all Proxmox VE Api Endpoints # Version: 0.3 # Contact: amna.wolf@gmail.com # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Zone No description available. .PARAMETER Status No description available. .OUTPUTS NodesSdnZonesInner<PSCustomObject> #> function Initialize-PVENodesSdnZonesInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Zone}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("available", "pending", "error")] [String] ${Status} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesSdnZonesInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Zone"="zone"; "Status"="status" } $OBJ = @{} foreach($parameter in $PSBoundParameters.Keys){ #If Specifield map the Display name back $OBJ.($DisplayNameMapping.($parameter)) = "$PSBoundParameters.$parameter" } $PSO = [PSCustomObject]$OBJ return $PSO } } <# .SYNOPSIS Convert from JSON to NodesSdnZonesInner<PSCustomObject> .DESCRIPTION Convert from JSON to NodesSdnZonesInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesSdnZonesInner<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesSdnZonesInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesSdnZonesInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesSdnZonesInner $AllProperties = ("zone", "status") 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 "zone"))) { #optional property not found $Zone = $null } else { $Zone = $JsonParameters.PSobject.Properties["zone"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].value } $PSO = [PSCustomObject]@{ "zone" = ${Zone} "status" = ${Status} } return $PSO } } |