Model/GETClusterJobsScheduleanalyzeRB.ps1
# # Proxmox VE Module 1.0 # Generated OpenApiDescription to render Modules via OpenapiGenerator # Version: 0.1 # Contact: # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Schedule No description available. .PARAMETER Iterations No description available. .PARAMETER Starttime No description available. .OUTPUTS GETClusterJobsScheduleanalyzeRB<PSCustomObject> #> function Initialize-PVEGETClusterJobsScheduleanalyzeRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Schedule}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Iterations}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Starttime} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEGETClusterJobsScheduleanalyzeRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Schedule -and $Schedule.length -gt 128) { throw "invalid value for 'Schedule', the character length must be smaller than or equal to 128." } 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." } $DisplayNameMapping =@{ "Schedule"="schedule"; "Iterations"="iterations"; "Starttime"="starttime" } $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 = ("schedule", "iterations", "starttime") 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 "schedule"))) { #optional property not found $Schedule = $null } else { $Schedule = $JsonParameters.PSobject.Properties["schedule"].value } 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 } $PSO = [PSCustomObject]@{ "schedule" = ${Schedule} "iterations" = ${Iterations} "starttime" = ${Starttime} } return $PSO } } |