data-segmentation/src/PSSailpoint.DataSegmentation/Model/Segmentmembership.ps1
|
# # Identity Security Cloud API - Data Segmentation # Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. 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: v1 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION Contains the segments and types that an identity is associated with .PARAMETER Segments List of segment ids that the identity is associated with. .PARAMETER AllAccessScopes They type of scopes that are assigned to the identity. .PARAMETER RefreshBy Date time string that lets you know when the membership data is going to be refreshed. .OUTPUTS Segmentmembership<PSCustomObject> #> function Initialize-Segmentmembership { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${Segments}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${AllAccessScopes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${RefreshBy} ) Process { 'Creating PSCustomObject: PSSailpoint.DataSegmentation => Segmentmembership' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "segments" = ${Segments} "allAccessScopes" = ${AllAccessScopes} "refreshBy" = ${RefreshBy} } return $PSO } } <# .SYNOPSIS Convert from JSON to Segmentmembership<PSCustomObject> .DESCRIPTION Convert from JSON to Segmentmembership<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Segmentmembership<PSCustomObject> #> function ConvertFrom-JsonToSegmentmembership { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.DataSegmentation => Segmentmembership' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in Segmentmembership $AllProperties = ("segments", "allAccessScopes", "refreshBy") 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 "segments"))) { #optional property not found $Segments = $null } else { $Segments = $JsonParameters.PSobject.Properties["segments"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "allAccessScopes"))) { #optional property not found $AllAccessScopes = $null } else { $AllAccessScopes = $JsonParameters.PSobject.Properties["allAccessScopes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "refreshBy"))) { #optional property not found $RefreshBy = $null } else { $RefreshBy = $JsonParameters.PSobject.Properties["refreshBy"].value } $PSO = [PSCustomObject]@{ "segments" = ${Segments} "allAccessScopes" = ${AllAccessScopes} "refreshBy" = ${RefreshBy} } return $PSO } } |