nerm/src/PSSailpoint.NERM/Model/ProfileTypeAttribute.ps1
|
# # NERM API # The NERM API accesss and modifies resources in your environment. # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Synced synced_attribute ID if there is one .OUTPUTS ProfileTypeAttribute<PSCustomObject> #> function Initialize-NERMProfileTypeAttribute { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Synced} ) Process { 'Creating PSCustomObject: PSSailpoint.NERM => NERMProfileTypeAttribute' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "synced" = ${Synced} } return $PSO } } <# .SYNOPSIS Convert from JSON to ProfileTypeAttribute<PSCustomObject> .DESCRIPTION Convert from JSON to ProfileTypeAttribute<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ProfileTypeAttribute<PSCustomObject> #> function ConvertFrom-NERMJsonToProfileTypeAttribute { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.NERM => NERMProfileTypeAttribute' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in NERMProfileTypeAttribute $AllProperties = ("id", "uid", "label", "synced") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json throw "Error! Empty JSON cannot be serialized due to the required property 'label' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "label"))) { throw "Error! JSON cannot be serialized due to the required property 'label' missing." } else { $Label = $JsonParameters.PSobject.Properties["label"].value } 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 "uid"))) { #optional property not found $Uid = $null } else { $Uid = $JsonParameters.PSobject.Properties["uid"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "synced"))) { #optional property not found $Synced = $null } else { $Synced = $JsonParameters.PSobject.Properties["synced"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "uid" = ${Uid} "label" = ${Label} "synced" = ${Synced} } return $PSO } } |