Model/NodesLxcInterfacesInnerIpAddressesInner.ps1
# # Proxmox VE # Generated module to access all Proxmox VE Api Endpoints # Version: 0.5 # Contact: amna.wolf@gmail.com # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER IpAddress IP-Address .PARAMETER IpAddressType IP-Family .PARAMETER Prefix IP-Prefix .OUTPUTS NodesLxcInterfacesInnerIpAddressesInner<PSCustomObject> #> function Initialize-PVENodesLxcInterfacesInnerIpAddressesInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${IpAddress}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${IpAddressType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Prefix} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesLxcInterfacesInnerIpAddressesInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "IpAddress"="ip-address"; "IpAddressType"="ip-address-type"; "Prefix"="prefix" } $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 NodesLxcInterfacesInnerIpAddressesInner<PSCustomObject> .DESCRIPTION Convert from JSON to NodesLxcInterfacesInnerIpAddressesInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesLxcInterfacesInnerIpAddressesInner<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesLxcInterfacesInnerIpAddressesInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesLxcInterfacesInnerIpAddressesInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesLxcInterfacesInnerIpAddressesInner $AllProperties = ("ip-address", "ip-address-type", "prefix") 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 "ip-address"))) { #optional property not found $IpAddress = $null } else { $IpAddress = $JsonParameters.PSobject.Properties["ip-address"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ip-address-type"))) { #optional property not found $IpAddressType = $null } else { $IpAddressType = $JsonParameters.PSobject.Properties["ip-address-type"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "prefix"))) { #optional property not found $Prefix = $null } else { $Prefix = $JsonParameters.PSobject.Properties["prefix"].value } $PSO = [PSCustomObject]@{ "ip-address" = ${IpAddress} "ip-address-type" = ${IpAddressType} "prefix" = ${Prefix} } return $PSO } } |