Model/CSRAllOf.ps1
# # SMServer V6 # Syncplify Server! REST API # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Id Unique ID, it will be auto-generated .PARAMETER EmailAddress No description available. .PARAMETER UriList optional list of valid URIs .PARAMETER SigningReq No description available. .OUTPUTS CSRAllOf<PSCustomObject> #> function Initialize-SS6CSRAllOf { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] [String] ${EmailAddress}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] [String[]] ${UriList}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] [String] ${SigningReq} ) Process { 'Creating PSCustomObject: SS6AdminModule => SS6CSRAllOf' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "id" = ${Id} "emailAddress" = ${EmailAddress} "uriList" = ${UriList} "signingReq" = ${SigningReq} } return $PSO } } <# .SYNOPSIS Convert from JSON to CSRAllOf<PSCustomObject> .DESCRIPTION Convert from JSON to CSRAllOf<PSCustomObject> .PARAMETER Json Json object .OUTPUTS CSRAllOf<PSCustomObject> #> function ConvertFrom-SS6JsonToCSRAllOf { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: SS6AdminModule => SS6CSRAllOf' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in SS6CSRAllOf $AllProperties = ("id", "emailAddress", "uriList", "signingReq") 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 "id"))) { #optional property not found $Id = $null } else { $Id = $JsonParameters.PSobject.Properties["id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "emailAddress"))) { #optional property not found $EmailAddress = $null } else { $EmailAddress = $JsonParameters.PSobject.Properties["emailAddress"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "uriList"))) { #optional property not found $UriList = $null } else { $UriList = $JsonParameters.PSobject.Properties["uriList"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "signingReq"))) { #optional property not found $SigningReq = $null } else { $SigningReq = $JsonParameters.PSobject.Properties["signingReq"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "emailAddress" = ${EmailAddress} "uriList" = ${UriList} "signingReq" = ${SigningReq} } return $PSO } } |