Model/GETClusterMetricsExportRB.ps1
# # Proxmox VE # Generated module to access all Proxmox VE Api Endpoints # Version: 0.6 # Contact: amna.wolf@gmail.com # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER LocalOnly No description available. .PARAMETER History No description available. .PARAMETER StartTime No description available. .OUTPUTS GETClusterMetricsExportRB<PSCustomObject> #> function Initialize-PVEGETClusterMetricsExportRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${LocalOnly}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${History}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${StartTime} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEGETClusterMetricsExportRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "LocalOnly"="local-only"; "History"="history"; "StartTime"="start-time" } $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 = ("local-only", "history", "start-time") 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 "local-only"))) { #optional property not found $LocalOnly = $null } else { $LocalOnly = $JsonParameters.PSobject.Properties["local-only"].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 "start-time"))) { #optional property not found $StartTime = $null } else { $StartTime = $JsonParameters.PSobject.Properties["start-time"].value } $PSO = [PSCustomObject]@{ "local-only" = ${LocalOnly} "history" = ${History} "start-time" = ${StartTime} } return $PSO } } |