Model/GETClusterJobsScheduleanalyzeRB.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 Iterations No description available. .PARAMETER Starttime No description available. .PARAMETER Schedule No description available. .OUTPUTS GETClusterJobsScheduleanalyzeRB<PSCustomObject> #> function Initialize-PVEGETClusterJobsScheduleanalyzeRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Iterations}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Starttime}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Schedule} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEGETClusterJobsScheduleanalyzeRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if ($Iterations -and $Iterations -gt 100) { throw "invalid value for 'Iterations', must be smaller than or equal to 100." } if ($Iterations -and $Iterations -lt 1) { throw "invalid value for 'Iterations', must be greater than or equal to 1." } if (!$Schedule -and $Schedule.length -gt 128) { throw "invalid value for 'Schedule', the character length must be smaller than or equal to 128." } $DisplayNameMapping =@{ "Iterations"="iterations"; "Starttime"="starttime"; "Schedule"="schedule" } $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 GETClusterJobsScheduleanalyzeRB<PSCustomObject> .DESCRIPTION Convert from JSON to GETClusterJobsScheduleanalyzeRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS GETClusterJobsScheduleanalyzeRB<PSCustomObject> #> function ConvertFrom-PVEJsonToGETClusterJobsScheduleanalyzeRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEGETClusterJobsScheduleanalyzeRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEGETClusterJobsScheduleanalyzeRB $AllProperties = ("iterations", "starttime", "schedule") 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 "iterations"))) { #optional property not found $Iterations = $null } else { $Iterations = $JsonParameters.PSobject.Properties["iterations"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "starttime"))) { #optional property not found $Starttime = $null } else { $Starttime = $JsonParameters.PSobject.Properties["starttime"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "schedule"))) { #optional property not found $Schedule = $null } else { $Schedule = $JsonParameters.PSobject.Properties["schedule"].value } $PSO = [PSCustomObject]@{ "iterations" = ${Iterations} "starttime" = ${Starttime} "schedule" = ${Schedule} } return $PSO } } |