Model/ClusterAcmePluginsGETInner.ps1

#
# Proxmox PowerShell VE
# Generated module to access all Proxmox VE Api Endpoints. This module has been generated from the proxmox api description v. 9.1.1
# Version: 9.1.1
# Contact: mail@timo-wolf.de
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER VarData
No description available.
.PARAMETER ValidationDelay
No description available.
.PARAMETER Api
No description available.
.PARAMETER Nodes
No description available.
.PARAMETER Type
No description available.
.PARAMETER Digest
No description available.
.PARAMETER Plugin
No description available.
.PARAMETER Disable
No description available.
.OUTPUTS

ClusterAcmePluginsGETInner<PSCustomObject>
#>


function Initialize-PVEClusterAcmePluginsGETInner {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${VarData},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${ValidationDelay},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("1984hosting", "acmedns", "acmeproxy", "active24", "ad", "ali", "alviy", "anx", "artfiles", "arvan", "aurora", "autodns", "aws", "azion", "azure", "beget", "bookmyname", "bunny", "cf", "clouddns", "cloudns", "cn", "conoha", "constellix", "cpanel", "curanet", "cyon", "da", "ddnss", "desec", "df", "dgon", "dnsexit", "dnshome", "dnsimple", "dnsservices", "doapi", "domeneshop", "dp", "dpi", "dreamhost", "duckdns", "durabledns", "dyn", "dynu", "dynv6", "easydns", "edgecenter", "edgedns", "euserv", "exoscale", "fornex", "freedns", "freemyip", "gandi_livedns", "gcloud", "gcore", "gd", "geoscaling", "googledomains", "he", "he_ddns", "hetzner", "hexonet", "hostingde", "huaweicloud", "infoblox", "infomaniak", "internetbs", "inwx", "ionos", "ionos_cloud", "ipv64", "ispconfig", "jd", "joker", "kappernet", "kas", "kinghost", "knot", "la", "leaseweb", "lexicon", "limacity", "linode", "linode_v4", "loopia", "lua", "maradns", "me", "miab", "mijnhost", "misaka", "myapi", "mydevil", "mydnsjp", "mythic_beasts", "namecheap", "namecom", "namesilo", "nanelo", "nederhost", "neodigit", "netcup", "netlify", "nic", "njalla", "nm", "nsd", "nsone", "nsupdate", "nw", "oci", "omglol", "one", "online", "openprovider", "openstack", "opnsense", "ovh", "pdns", "pleskxml", "pointhq", "porkbun", "rackcorp", "rackspace", "rage4", "rcode0", "regru", "scaleway", "schlundtech", "selectel", "selfhost", "servercow", "simply", "technitium", "tele3", "tencent", "timeweb", "transip", "udr", "ultra", "unoeuro", "variomedia", "veesp", "vercel", "vscale", "vultr", "websupport", "west_cn", "world4you", "yandex360", "yc", "zilore", "zone", "zoneedit", "zonomi")]
        [String]
        ${Api},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Nodes},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("dns", "standalone")]
        [String]
        ${Type},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Digest},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Plugin},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Disable}
    )

    Process {
        'Creating PSCustomObject: ProxmoxPVE => PVEClusterAcmePluginsGETInner' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        if ($ValidationDelay -and $ValidationDelay -gt 172800) {
          throw "invalid value for 'ValidationDelay', must be smaller than or equal to 172800."
        }

        if (!$Digest -and $Digest.length -gt 64) {
            throw "invalid value for 'Digest', the character length must be smaller than or equal to 64."
        }


         $DisplayNameMapping =@{
            "VarData"="data"; "ValidationDelay"="validation-delay"; "Api"="api"; "Nodes"="nodes"; "Type"="type"; "Digest"="digest"; "Plugin"="plugin"; "Disable"="disable"
        }
        
         $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 ClusterAcmePluginsGETInner<PSCustomObject>

.DESCRIPTION

Convert from JSON to ClusterAcmePluginsGETInner<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

ClusterAcmePluginsGETInner<PSCustomObject>
#>

function ConvertFrom-PVEJsonToClusterAcmePluginsGETInner {
    Param(
        [AllowEmptyString()]
        [string]$Json
    )

    Process {
        'Converting JSON to PSCustomObject: ProxmoxPVE => PVEClusterAcmePluginsGETInner' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in PVEClusterAcmePluginsGETInner
        $AllProperties = ("data", "validation-delay", "api", "nodes", "type", "digest", "plugin", "disable")
        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 "data"))) { #optional property not found
            $VarData = $null
        } else {
            $VarData = $JsonParameters.PSobject.Properties["data"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "validation-delay"))) { #optional property not found
            $ValidationDelay = $null
        } else {
            $ValidationDelay = $JsonParameters.PSobject.Properties["validation-delay"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "api"))) { #optional property not found
            $Api = $null
        } else {
            $Api = $JsonParameters.PSobject.Properties["api"].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 "digest"))) { #optional property not found
            $Digest = $null
        } else {
            $Digest = $JsonParameters.PSobject.Properties["digest"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "plugin"))) { #optional property not found
            $Plugin = $null
        } else {
            $Plugin = $JsonParameters.PSobject.Properties["plugin"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "disable"))) { #optional property not found
            $Disable = $null
        } else {
            $Disable = $JsonParameters.PSobject.Properties["disable"].value
        }

        $PSO = [PSCustomObject]@{
            "data" = ${VarData}
            "validation-delay" = ${ValidationDelay}
            "api" = ${Api}
            "nodes" = ${Nodes}
            "type" = ${Type}
            "digest" = ${Digest}
            "plugin" = ${Plugin}
            "disable" = ${Disable}
        }

        return $PSO
    }

}