v3/src/PSSailpoint/Model/NetworkConfiguration.ps1
# # IdentityNow V3 API # Use these APIs to interact with the IdentityNow 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(Position = 0, ValueFromPipelineByPropertyName = $true)] [String[]] ${Range}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] [String[]] ${Geolocation}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Whitelisted} = $false ) Process { 'Creating PSCustomObject: PSSailpoint => 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 => 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 } } |