Model/BackupOptions.ps1
# # Identity Security Cloud V3 API # 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: 3.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION Backup options control what will be included in the backup. .PARAMETER IncludeTypes Object type names to be included in a Configuration Hub backup command. .PARAMETER ObjectOptions Additional options targeting specific objects related to each item in the includeTypes field. .OUTPUTS BackupOptions<PSCustomObject> #> function Initialize-BackupOptions { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("ACCESS_PROFILE", "ACCESS_REQUEST_CONFIG", "ATTR_SYNC_SOURCE_CONFIG", "AUTH_ORG", "CAMPAIGN_FILTER", "FORM_DEFINITION", "GOVERNANCE_GROUP", "IDENTITY_OBJECT_CONFIG", "IDENTITY_PROFILE", "LIFECYCLE_STATE", "NOTIFICATION_TEMPLATE", "PASSWORD_POLICY", "PASSWORD_SYNC_GROUP", "PUBLIC_IDENTITIES_CONFIG", "ROLE", "RULE", "SEGMENT", "SERVICE_DESK_INTEGRATION", "SOD_POLICY", "SOURCE", "TAG", "TRANSFORM", "TRIGGER_SUBSCRIPTION", "WORKFLOW")] [String[]] ${IncludeTypes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${ObjectOptions} ) Process { 'Creating PSCustomObject: PSSailpoint.V3 => BackupOptions' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "includeTypes" = ${IncludeTypes} "objectOptions" = ${ObjectOptions} } return $PSO } } <# .SYNOPSIS Convert from JSON to BackupOptions<PSCustomObject> .DESCRIPTION Convert from JSON to BackupOptions<PSCustomObject> .PARAMETER Json Json object .OUTPUTS BackupOptions<PSCustomObject> #> function ConvertFrom-JsonToBackupOptions { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V3 => BackupOptions' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BackupOptions $AllProperties = ("includeTypes", "objectOptions") 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 "includeTypes"))) { #optional property not found $IncludeTypes = $null } else { $IncludeTypes = $JsonParameters.PSobject.Properties["includeTypes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "objectOptions"))) { #optional property not found $ObjectOptions = $null } else { $ObjectOptions = $JsonParameters.PSobject.Properties["objectOptions"].value } $PSO = [PSCustomObject]@{ "includeTypes" = ${IncludeTypes} "objectOptions" = ${ObjectOptions} } return $PSO } } |