Model/Identitycollectorcollectionsettings.ps1
|
# # Identity Security Cloud API - Data Access Security # 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 No description available. .PARAMETER Properties Source attribute names to register as datasource columns for this collection. These names must match the attributes sent by Identity Security Cloud. Use an empty array when no custom attributes are required. .PARAMETER FieldMappings Maps source attributes to data dictionary fields and DAS custom field slots. Each `sourceAttributeName` must be either a built-in attribute for the identity collector type or listed in `properties`. Use an empty array when no dynamic field mappings are configured. .OUTPUTS Identitycollectorcollectionsettings<PSCustomObject> #> function Initialize-Identitycollectorcollectionsettings { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${Properties}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${FieldMappings} ) Process { 'Creating PSCustomObject: PSSailpoint.DataAccessSecurity => Identitycollectorcollectionsettings' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Properties) { throw "invalid value for 'Properties', 'Properties' cannot be null." } if (!$FieldMappings) { throw "invalid value for 'FieldMappings', 'FieldMappings' cannot be null." } $PSO = [PSCustomObject]@{ "properties" = ${Properties} "fieldMappings" = ${FieldMappings} } return $PSO } } <# .SYNOPSIS Convert from JSON to Identitycollectorcollectionsettings<PSCustomObject> .DESCRIPTION Convert from JSON to Identitycollectorcollectionsettings<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Identitycollectorcollectionsettings<PSCustomObject> #> function ConvertFrom-JsonToIdentitycollectorcollectionsettings { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.DataAccessSecurity => Identitycollectorcollectionsettings' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in Identitycollectorcollectionsettings $AllProperties = ("properties", "fieldMappings") 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 'properties' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "properties"))) { throw "Error! JSON cannot be serialized due to the required property 'properties' missing." } else { $Properties = $JsonParameters.PSobject.Properties["properties"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "fieldMappings"))) { throw "Error! JSON cannot be serialized due to the required property 'fieldMappings' missing." } else { $FieldMappings = $JsonParameters.PSobject.Properties["fieldMappings"].value } $PSO = [PSCustomObject]@{ "properties" = ${Properties} "fieldMappings" = ${FieldMappings} } return $PSO } } |