nermV2025/src/PSSailpoint.NERMV2025/Model/DelegateUser.ps1
|
# # NERM API v2025 # The NERM API v2025 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 Id The id of the delegate user .PARAMETER Uid The uid of the delegate user .PARAMETER Type The type of the delegate user .PARAMETER Name The name of the delegate user .PARAMETER Email The email of the delegate user .PARAMETER Status The status of the delegate user .PARAMETER Login The login of the delegate user .PARAMETER LastLogin The last login timestamp of the delegate user .OUTPUTS DelegateUser<PSCustomObject> #> function Initialize-NERMV2025DelegateUser { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Uid}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Email}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Status}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Login}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${LastLogin} ) Process { 'Creating PSCustomObject: PSSailpoint.NERMV2025 => NERMV2025DelegateUser' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "id" = ${Id} "uid" = ${Uid} "type" = ${Type} "name" = ${Name} "email" = ${Email} "status" = ${Status} "login" = ${Login} "last_login" = ${LastLogin} } return $PSO } } <# .SYNOPSIS Convert from JSON to DelegateUser<PSCustomObject> .DESCRIPTION Convert from JSON to DelegateUser<PSCustomObject> .PARAMETER Json Json object .OUTPUTS DelegateUser<PSCustomObject> #> function ConvertFrom-NERMV2025JsonToDelegateUser { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.NERMV2025 => NERMV2025DelegateUser' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in NERMV2025DelegateUser $AllProperties = ("id", "uid", "type", "name", "email", "status", "login", "last_login", "created_at", "updated_at") 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 "uid"))) { #optional property not found $Uid = $null } else { $Uid = $JsonParameters.PSobject.Properties["uid"].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 "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "email"))) { #optional property not found $Email = $null } else { $Email = $JsonParameters.PSobject.Properties["email"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "login"))) { #optional property not found $Login = $null } else { $Login = $JsonParameters.PSobject.Properties["login"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "last_login"))) { #optional property not found $LastLogin = $null } else { $LastLogin = $JsonParameters.PSobject.Properties["last_login"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "created_at"))) { #optional property not found $CreatedAt = $null } else { $CreatedAt = $JsonParameters.PSobject.Properties["created_at"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "updated_at"))) { #optional property not found $UpdatedAt = $null } else { $UpdatedAt = $JsonParameters.PSobject.Properties["updated_at"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "uid" = ${Uid} "type" = ${Type} "name" = ${Name} "email" = ${Email} "status" = ${Status} "login" = ${Login} "last_login" = ${LastLogin} "created_at" = ${CreatedAt} "updated_at" = ${UpdatedAt} } return $PSO } } |