Model/NodesAptRepositoriesInfosInner.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 Index Index of the associated repository within the file. .PARAMETER Kind Kind of the information (e.g. warning). .PARAMETER Message Information message. .PARAMETER Path Path to the associated file. .PARAMETER Property Property from which the info originates. .OUTPUTS NodesAptRepositoriesInfosInner<PSCustomObject> #> function Initialize-PVENodesAptRepositoriesInfosInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Index}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Kind}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Message}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Path}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Property} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesAptRepositoriesInfosInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Index"="index"; "Kind"="kind"; "Message"="message"; "Path"="path"; "Property"="property" } $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 NodesAptRepositoriesInfosInner<PSCustomObject> .DESCRIPTION Convert from JSON to NodesAptRepositoriesInfosInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesAptRepositoriesInfosInner<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesAptRepositoriesInfosInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesAptRepositoriesInfosInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesAptRepositoriesInfosInner $AllProperties = ("index", "kind", "message", "path", "property") 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 "index"))) { #optional property not found $Index = $null } else { $Index = $JsonParameters.PSobject.Properties["index"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "kind"))) { #optional property not found $Kind = $null } else { $Kind = $JsonParameters.PSobject.Properties["kind"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "message"))) { #optional property not found $Message = $null } else { $Message = $JsonParameters.PSobject.Properties["message"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "path"))) { #optional property not found $Path = $null } else { $Path = $JsonParameters.PSobject.Properties["path"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "property"))) { #optional property not found $Property = $null } else { $Property = $JsonParameters.PSobject.Properties["property"].value } $PSO = [PSCustomObject]@{ "index" = ${Index} "kind" = ${Kind} "message" = ${Message} "path" = ${Path} "property" = ${Property} } return $PSO } } |