Model/GETClusterMetricsExportRB.ps1
# # Proxmox PowerShell VE # Generated module to access all Proxmox VE Api Endpoints. This module has been generated from the proxmox api description v. 8.4.0 # Version: 8.4.0 # Contact: mail@timo-wolf.de # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER StartTime No description available. .PARAMETER History No description available. .PARAMETER LocalOnly No description available. .OUTPUTS GETClusterMetricsExportRB<PSCustomObject> #> function Initialize-PVEGETClusterMetricsExportRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${StartTime}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${History}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${LocalOnly} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEGETClusterMetricsExportRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "StartTime"="start-time"; "History"="history"; "LocalOnly"="local-only" } $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 GETClusterMetricsExportRB<PSCustomObject> .DESCRIPTION Convert from JSON to GETClusterMetricsExportRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS GETClusterMetricsExportRB<PSCustomObject> #> function ConvertFrom-PVEJsonToGETClusterMetricsExportRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEGETClusterMetricsExportRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEGETClusterMetricsExportRB $AllProperties = ("start-time", "history", "local-only") 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 "start-time"))) { #optional property not found $StartTime = $null } else { $StartTime = $JsonParameters.PSobject.Properties["start-time"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "history"))) { #optional property not found $History = $null } else { $History = $JsonParameters.PSobject.Properties["history"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "local-only"))) { #optional property not found $LocalOnly = $null } else { $LocalOnly = $JsonParameters.PSobject.Properties["local-only"].value } $PSO = [PSCustomObject]@{ "start-time" = ${StartTime} "history" = ${History} "local-only" = ${LocalOnly} } return $PSO } } |