Model/POSTClusterSdnDnsRB.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 Ttl No description available. .PARAMETER Type No description available. .PARAMETER Url No description available. .PARAMETER Reversemaskv6 No description available. .PARAMETER Dns No description available. .PARAMETER Reversev6mask No description available. .PARAMETER Key No description available. .OUTPUTS POSTClusterSdnDnsRB<PSCustomObject> #> function Initialize-PVEPOSTClusterSdnDnsRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Ttl}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("powerdns")] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Url}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Reversemaskv6}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Dns}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Reversev6mask}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Key} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEPOSTClusterSdnDnsRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Ttl"="ttl"; "Type"="type"; "Url"="url"; "Reversemaskv6"="reversemaskv6"; "Dns"="dns"; "Reversev6mask"="reversev6mask"; "Key"="key" } $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 POSTClusterSdnDnsRB<PSCustomObject> .DESCRIPTION Convert from JSON to POSTClusterSdnDnsRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS POSTClusterSdnDnsRB<PSCustomObject> #> function ConvertFrom-PVEJsonToPOSTClusterSdnDnsRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEPOSTClusterSdnDnsRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEPOSTClusterSdnDnsRB $AllProperties = ("ttl", "type", "url", "reversemaskv6", "dns", "reversev6mask", "key") 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 "ttl"))) { #optional property not found $Ttl = $null } else { $Ttl = $JsonParameters.PSobject.Properties["ttl"].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 "url"))) { #optional property not found $Url = $null } else { $Url = $JsonParameters.PSobject.Properties["url"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "reversemaskv6"))) { #optional property not found $Reversemaskv6 = $null } else { $Reversemaskv6 = $JsonParameters.PSobject.Properties["reversemaskv6"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "dns"))) { #optional property not found $Dns = $null } else { $Dns = $JsonParameters.PSobject.Properties["dns"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "reversev6mask"))) { #optional property not found $Reversev6mask = $null } else { $Reversev6mask = $JsonParameters.PSobject.Properties["reversev6mask"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "key"))) { #optional property not found $Key = $null } else { $Key = $JsonParameters.PSobject.Properties["key"].value } $PSO = [PSCustomObject]@{ "ttl" = ${Ttl} "type" = ${Type} "url" = ${Url} "reversemaskv6" = ${Reversemaskv6} "dns" = ${Dns} "reversev6mask" = ${Reversev6mask} "key" = ${Key} } return $PSO } } |