Model/ClusterSdnZonesInner.ps1
# # Proxmox PowerShell VE # Generated module to access all Proxmox VE Api Endpoints. This module has been generated from the proxmox api description v. 8.4.0 # Version: 8.4.0 # Contact: mail@timo-wolf.de # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER State No description available. .PARAMETER Zone No description available. .PARAMETER Nodes No description available. .PARAMETER Type No description available. .PARAMETER Ipam No description available. .PARAMETER Reversedns No description available. .PARAMETER Pending No description available. .PARAMETER Dhcp No description available. .PARAMETER Mtu No description available. .PARAMETER Dnszone No description available. .PARAMETER Dns No description available. .OUTPUTS ClusterSdnZonesInner<PSCustomObject> #> function Initialize-PVEClusterSdnZonesInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${State}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Zone}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Nodes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Ipam}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Reversedns}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Pending}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Dhcp}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Mtu}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Dnszone}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Dns} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEClusterSdnZonesInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "State"="state"; "Zone"="zone"; "Nodes"="nodes"; "Type"="type"; "Ipam"="ipam"; "Reversedns"="reversedns"; "Pending"="pending"; "Dhcp"="dhcp"; "Mtu"="mtu"; "Dnszone"="dnszone"; "Dns"="dns" } $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 ClusterSdnZonesInner<PSCustomObject> .DESCRIPTION Convert from JSON to ClusterSdnZonesInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ClusterSdnZonesInner<PSCustomObject> #> function ConvertFrom-PVEJsonToClusterSdnZonesInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEClusterSdnZonesInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEClusterSdnZonesInner $AllProperties = ("state", "zone", "nodes", "type", "ipam", "reversedns", "pending", "dhcp", "mtu", "dnszone", "dns") 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 "state"))) { #optional property not found $State = $null } else { $State = $JsonParameters.PSobject.Properties["state"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "zone"))) { #optional property not found $Zone = $null } else { $Zone = $JsonParameters.PSobject.Properties["zone"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "nodes"))) { #optional property not found $Nodes = $null } else { $Nodes = $JsonParameters.PSobject.Properties["nodes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { #optional property not found $Type = $null } else { $Type = $JsonParameters.PSobject.Properties["type"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ipam"))) { #optional property not found $Ipam = $null } else { $Ipam = $JsonParameters.PSobject.Properties["ipam"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "reversedns"))) { #optional property not found $Reversedns = $null } else { $Reversedns = $JsonParameters.PSobject.Properties["reversedns"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "pending"))) { #optional property not found $Pending = $null } else { $Pending = $JsonParameters.PSobject.Properties["pending"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "dhcp"))) { #optional property not found $Dhcp = $null } else { $Dhcp = $JsonParameters.PSobject.Properties["dhcp"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "mtu"))) { #optional property not found $Mtu = $null } else { $Mtu = $JsonParameters.PSobject.Properties["mtu"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "dnszone"))) { #optional property not found $Dnszone = $null } else { $Dnszone = $JsonParameters.PSobject.Properties["dnszone"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "dns"))) { #optional property not found $Dns = $null } else { $Dns = $JsonParameters.PSobject.Properties["dns"].value } $PSO = [PSCustomObject]@{ "state" = ${State} "zone" = ${Zone} "nodes" = ${Nodes} "type" = ${Type} "ipam" = ${Ipam} "reversedns" = ${Reversedns} "pending" = ${Pending} "dhcp" = ${Dhcp} "mtu" = ${Mtu} "dnszone" = ${Dnszone} "dns" = ${Dns} } return $PSO } } |