Model/POSTNodesStorageOciregistrypullRB.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 Reference No description available. .PARAMETER Filename No description available. .OUTPUTS POSTNodesStorageOciregistrypullRB<PSCustomObject> #> function Initialize-PVEPOSTNodesStorageOciregistrypullRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidatePattern("^(?:(?:[a-zA-Z\d]|[a-zA-Z\d][a-zA-Z\d-]*[a-zA-Z\d])(?:\.(?:[a-zA-Z\d]|[a-zA-Z\d][a-zA-Z\d-]*[a-zA-Z\d]))*(?::\d+)?/)?[a-z\d]+(?:(?:[._]|__|[-]*)[a-z\d]+)*(?:/[a-z\d]+(?:(?:[._]|__|[-]*)[a-z\d]+)*)*:\w[\w.-]{0,127}$")] [String] ${Reference}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Filename} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEPOSTNodesStorageOciregistrypullRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Filename -and $Filename.length -gt 255) { throw "invalid value for 'Filename', the character length must be smaller than or equal to 255." } if (!$Filename -and $Filename.length -lt 1) { throw "invalid value for 'Filename', the character length must be great than or equal to 1." } $DisplayNameMapping =@{ "Reference"="reference"; "Filename"="filename" } $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 POSTNodesStorageOciregistrypullRB<PSCustomObject> .DESCRIPTION Convert from JSON to POSTNodesStorageOciregistrypullRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS POSTNodesStorageOciregistrypullRB<PSCustomObject> #> function ConvertFrom-PVEJsonToPOSTNodesStorageOciregistrypullRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEPOSTNodesStorageOciregistrypullRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEPOSTNodesStorageOciregistrypullRB $AllProperties = ("reference", "filename") 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 "reference"))) { #optional property not found $Reference = $null } else { $Reference = $JsonParameters.PSobject.Properties["reference"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "filename"))) { #optional property not found $Filename = $null } else { $Filename = $JsonParameters.PSobject.Properties["filename"].value } $PSO = [PSCustomObject]@{ "reference" = ${Reference} "filename" = ${Filename} } return $PSO } } |