Model/NetworkConfiguration.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 No description available. .PARAMETER Range The collection of ip ranges. .PARAMETER Geolocation The collection of country codes. .PARAMETER Whitelisted Denotes whether the provided lists are whitelisted or blacklisted for geo location. .OUTPUTS NetworkConfiguration<PSCustomObject> #> function Initialize-NetworkConfiguration { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${Range}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${Geolocation}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Whitelisted} = $false ) Process { 'Creating PSCustomObject: PSSailpoint.V3 => NetworkConfiguration' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "range" = ${Range} "geolocation" = ${Geolocation} "whitelisted" = ${Whitelisted} } return $PSO } } <# .SYNOPSIS Convert from JSON to NetworkConfiguration<PSCustomObject> .DESCRIPTION Convert from JSON to NetworkConfiguration<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NetworkConfiguration<PSCustomObject> #> function ConvertFrom-JsonToNetworkConfiguration { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V3 => NetworkConfiguration' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in NetworkConfiguration $AllProperties = ("range", "geolocation", "whitelisted") 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 "range"))) { #optional property not found $Range = $null } else { $Range = $JsonParameters.PSobject.Properties["range"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "geolocation"))) { #optional property not found $Geolocation = $null } else { $Geolocation = $JsonParameters.PSobject.Properties["geolocation"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "whitelisted"))) { #optional property not found $Whitelisted = $null } else { $Whitelisted = $JsonParameters.PSobject.Properties["whitelisted"].value } $PSO = [PSCustomObject]@{ "range" = ${Range} "geolocation" = ${Geolocation} "whitelisted" = ${Whitelisted} } return $PSO } } |