Model/SpConfigRule.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 Format of Config Hub Object Rules .PARAMETER Path JSONPath expression denoting the path within the object where a value substitution should be applied .PARAMETER Value Value to be assigned at the jsonPath location within the object .PARAMETER Mode Draft modes to which this rule will apply .OUTPUTS SpConfigRule<PSCustomObject> #> function Initialize-BetaSpConfigRule { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Path}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Value}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("RESTORE", "PROMOTE", "UPLOAD")] [String[]] ${Mode} ) Process { 'Creating PSCustomObject: PSSailpoint.Beta => BetaSpConfigRule' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "path" = ${Path} "value" = ${Value} "mode" = ${Mode} } return $PSO } } <# .SYNOPSIS Convert from JSON to SpConfigRule<PSCustomObject> .DESCRIPTION Convert from JSON to SpConfigRule<PSCustomObject> .PARAMETER Json Json object .OUTPUTS SpConfigRule<PSCustomObject> #> function ConvertFrom-BetaJsonToSpConfigRule { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Beta => BetaSpConfigRule' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BetaSpConfigRule $AllProperties = ("path", "value", "mode") 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 "path"))) { #optional property not found $Path = $null } else { $Path = $JsonParameters.PSobject.Properties["path"].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 "mode"))) { #optional property not found $Mode = $null } else { $Mode = $JsonParameters.PSobject.Properties["mode"].value } $PSO = [PSCustomObject]@{ "path" = ${Path} "value" = ${Value} "mode" = ${Mode} } return $PSO } } |