beta/src/PSSailpointBeta/Model/CommonAccessItemResponse.ps1
# # IdentityNow Beta API # Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. These APIs are in beta and are subject to change. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. # Version: 3.1.0-beta # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Id Common Access Item ID .PARAMETER Access No description available. .PARAMETER Status No description available. .PARAMETER LastUpdated No description available. .PARAMETER ReviewedByUser No description available. .PARAMETER LastReviewed No description available. .PARAMETER CreatedByUser No description available. .OUTPUTS CommonAccessItemResponse<PSCustomObject> #> function Initialize-BetaCommonAccessItemResponse { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Access}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Status}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] [String] ${LastUpdated}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${ReviewedByUser}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] [String] ${LastReviewed}, [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)] [String] ${CreatedByUser} ) Process { 'Creating PSCustomObject: PSSailpointBeta => BetaCommonAccessItemResponse' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "id" = ${Id} "access" = ${Access} "status" = ${Status} "lastUpdated" = ${LastUpdated} "reviewedByUser" = ${ReviewedByUser} "lastReviewed" = ${LastReviewed} "createdByUser" = ${CreatedByUser} } return $PSO } } <# .SYNOPSIS Convert from JSON to CommonAccessItemResponse<PSCustomObject> .DESCRIPTION Convert from JSON to CommonAccessItemResponse<PSCustomObject> .PARAMETER Json Json object .OUTPUTS CommonAccessItemResponse<PSCustomObject> #> function ConvertFrom-BetaJsonToCommonAccessItemResponse { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpointBeta => BetaCommonAccessItemResponse' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BetaCommonAccessItemResponse $AllProperties = ("id", "access", "status", "lastUpdated", "reviewedByUser", "lastReviewed", "createdByUser") 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 "access"))) { #optional property not found $Access = $null } else { $Access = $JsonParameters.PSobject.Properties["access"].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 "lastUpdated"))) { #optional property not found $LastUpdated = $null } else { $LastUpdated = $JsonParameters.PSobject.Properties["lastUpdated"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "reviewedByUser"))) { #optional property not found $ReviewedByUser = $null } else { $ReviewedByUser = $JsonParameters.PSobject.Properties["reviewedByUser"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastReviewed"))) { #optional property not found $LastReviewed = $null } else { $LastReviewed = $JsonParameters.PSobject.Properties["lastReviewed"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "createdByUser"))) { #optional property not found $CreatedByUser = $null } else { $CreatedByUser = $JsonParameters.PSobject.Properties["createdByUser"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "access" = ${Access} "status" = ${Status} "lastUpdated" = ${LastUpdated} "reviewedByUser" = ${ReviewedByUser} "lastReviewed" = ${LastReviewed} "createdByUser" = ${CreatedByUser} } return $PSO } } |