Model/AccessItemAssociated.ps1
# # Identity Security Cloud Beta API # Use these APIs to interact with the Identity Security Cloud 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 EventType the event type .PARAMETER DateTime the date of event .PARAMETER IdentityId the identity id .PARAMETER AccessItem No description available. .PARAMETER GovernanceEvent No description available. .PARAMETER AccessItemType the access item type .OUTPUTS AccessItemAssociated<PSCustomObject> #> function Initialize-BetaAccessItemAssociated { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${EventType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${DateTime}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${IdentityId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${AccessItem}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${GovernanceEvent}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("account", "app", "entitlement", "role", "accessProfile")] [String] ${AccessItemType} ) Process { 'Creating PSCustomObject: PSSailpoint.Beta => BetaAccessItemAssociated' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$AccessItem) { throw "invalid value for 'AccessItem', 'AccessItem' cannot be null." } $PSO = [PSCustomObject]@{ "eventType" = ${EventType} "dateTime" = ${DateTime} "identityId" = ${IdentityId} "accessItem" = ${AccessItem} "governanceEvent" = ${GovernanceEvent} "accessItemType" = ${AccessItemType} } return $PSO } } <# .SYNOPSIS Convert from JSON to AccessItemAssociated<PSCustomObject> .DESCRIPTION Convert from JSON to AccessItemAssociated<PSCustomObject> .PARAMETER Json Json object .OUTPUTS AccessItemAssociated<PSCustomObject> #> function ConvertFrom-BetaJsonToAccessItemAssociated { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Beta => BetaAccessItemAssociated' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BetaAccessItemAssociated $AllProperties = ("eventType", "dateTime", "identityId", "accessItem", "governanceEvent", "accessItemType") 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 'accessItem' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "accessItem"))) { throw "Error! JSON cannot be serialized due to the required property 'accessItem' missing." } else { $AccessItem = $JsonParameters.PSobject.Properties["accessItem"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "governanceEvent"))) { throw "Error! JSON cannot be serialized due to the required property 'governanceEvent' missing." } else { $GovernanceEvent = $JsonParameters.PSobject.Properties["governanceEvent"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "eventType"))) { #optional property not found $EventType = $null } else { $EventType = $JsonParameters.PSobject.Properties["eventType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "dateTime"))) { #optional property not found $DateTime = $null } else { $DateTime = $JsonParameters.PSobject.Properties["dateTime"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "identityId"))) { #optional property not found $IdentityId = $null } else { $IdentityId = $JsonParameters.PSobject.Properties["identityId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "accessItemType"))) { #optional property not found $AccessItemType = $null } else { $AccessItemType = $JsonParameters.PSobject.Properties["accessItemType"].value } $PSO = [PSCustomObject]@{ "eventType" = ${EventType} "dateTime" = ${DateTime} "identityId" = ${IdentityId} "accessItem" = ${AccessItem} "governanceEvent" = ${GovernanceEvent} "accessItemType" = ${AccessItemType} } return $PSO } } |