Model/OutlierContributingFeature.ps1
# # Identity Security Cloud V2024 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: v2024 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Id Contributing feature id .PARAMETER Name The name of the feature .PARAMETER ValueType The data type of the value field .PARAMETER Value No description available. .PARAMETER Importance The importance of the feature. This can also be a negative value .PARAMETER DisplayName The (translated if header is passed) displayName for the feature .PARAMETER Description The (translated if header is passed) description for the feature .PARAMETER TranslationMessages No description available. .OUTPUTS OutlierContributingFeature<PSCustomObject> #> function Initialize-V2024OutlierContributingFeature { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("INTEGER", "FLOAT")] [String] ${ValueType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Value}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Double]] ${Importance}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${DisplayName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Description}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${TranslationMessages} ) Process { 'Creating PSCustomObject: Tm.V2024 => V2024OutlierContributingFeature' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if ($Importance -and $Importance -gt 1.0) { throw "invalid value for 'Importance', must be smaller than or equal to 1.0." } if ($Importance -and $Importance -lt -1.0) { throw "invalid value for 'Importance', must be greater than or equal to -1.0." } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "valueType" = ${ValueType} "value" = ${Value} "importance" = ${Importance} "displayName" = ${DisplayName} "description" = ${Description} "translationMessages" = ${TranslationMessages} } return $PSO } } <# .SYNOPSIS Convert from JSON to OutlierContributingFeature<PSCustomObject> .DESCRIPTION Convert from JSON to OutlierContributingFeature<PSCustomObject> .PARAMETER Json Json object .OUTPUTS OutlierContributingFeature<PSCustomObject> #> function ConvertFrom-V2024JsonToOutlierContributingFeature { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Tm.V2024 => V2024OutlierContributingFeature' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2024OutlierContributingFeature $AllProperties = ("id", "name", "valueType", "value", "importance", "displayName", "description", "translationMessages") 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 "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "valueType"))) { #optional property not found $ValueType = $null } else { $ValueType = $JsonParameters.PSobject.Properties["valueType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "value"))) { #optional property not found $Value = $null } else { $Value = $JsonParameters.PSobject.Properties["value"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "importance"))) { #optional property not found $Importance = $null } else { $Importance = $JsonParameters.PSobject.Properties["importance"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "displayName"))) { #optional property not found $DisplayName = $null } else { $DisplayName = $JsonParameters.PSobject.Properties["displayName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "description"))) { #optional property not found $Description = $null } else { $Description = $JsonParameters.PSobject.Properties["description"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "translationMessages"))) { #optional property not found $TranslationMessages = $null } else { $TranslationMessages = $JsonParameters.PSobject.Properties["translationMessages"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "valueType" = ${ValueType} "value" = ${Value} "importance" = ${Importance} "displayName" = ${DisplayName} "description" = ${Description} "translationMessages" = ${TranslationMessages} } return $PSO } } |