Model/NodesAptRepositoriesStandardReposInner.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 Handle Handle to identify the repository. .PARAMETER Name Full name of the repository. .PARAMETER Status Indicating enabled/disabled status, if the repository is configured. .OUTPUTS NodesAptRepositoriesStandardReposInner<PSCustomObject> #> function Initialize-PVENodesAptRepositoriesStandardReposInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Handle}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Status} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesAptRepositoriesStandardReposInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Handle"="handle"; "Name"="name"; "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 NodesAptRepositoriesStandardReposInner<PSCustomObject> .DESCRIPTION Convert from JSON to NodesAptRepositoriesStandardReposInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesAptRepositoriesStandardReposInner<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesAptRepositoriesStandardReposInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesAptRepositoriesStandardReposInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesAptRepositoriesStandardReposInner $AllProperties = ("handle", "name", "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 "handle"))) { #optional property not found $Handle = $null } else { $Handle = $JsonParameters.PSobject.Properties["handle"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].value } $PSO = [PSCustomObject]@{ "handle" = ${Handle} "name" = ${Name} "status" = ${Status} } return $PSO } } |