|
| 1 | +# |
| 2 | +# Identity Security Cloud Beta API |
| 3 | +# 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. |
| 4 | +# Version: 3.1.0-beta |
| 5 | +# Generated by OpenAPI Generator: https://openapi-generator.tech |
| 6 | +# |
| 7 | + |
| 8 | +<# |
| 9 | +.SYNOPSIS |
| 10 | +
|
| 11 | +No summary available. |
| 12 | +
|
| 13 | +.DESCRIPTION |
| 14 | +
|
| 15 | +Reference to identity object who owns the source. |
| 16 | +
|
| 17 | +.PARAMETER Type |
| 18 | +Type of object being referenced. |
| 19 | +.PARAMETER Id |
| 20 | +Owner identity's ID. |
| 21 | +.PARAMETER Name |
| 22 | +Owner identity's human-readable display name. |
| 23 | +.OUTPUTS |
| 24 | +
|
| 25 | +SourceOwner<PSCustomObject> |
| 26 | +#> |
| 27 | + |
| 28 | +function Initialize-BetaSourceOwner { |
| 29 | + [CmdletBinding()] |
| 30 | + Param ( |
| 31 | + [Parameter(ValueFromPipelineByPropertyName = $true)] |
| 32 | + [ValidateSet("IDENTITY")] |
| 33 | + [String] |
| 34 | + ${Type}, |
| 35 | + [Parameter(ValueFromPipelineByPropertyName = $true)] |
| 36 | + [String] |
| 37 | + ${Id}, |
| 38 | + [Parameter(ValueFromPipelineByPropertyName = $true)] |
| 39 | + [String] |
| 40 | + ${Name} |
| 41 | + ) |
| 42 | + |
| 43 | + Process { |
| 44 | + 'Creating PSCustomObject: PSSailpoint.Beta => BetaSourceOwner' | Write-Debug |
| 45 | + $PSBoundParameters | Out-DebugParameter | Write-Debug |
| 46 | + |
| 47 | + |
| 48 | + $PSO = [PSCustomObject]@{ |
| 49 | + "type" = ${Type} |
| 50 | + "id" = ${Id} |
| 51 | + "name" = ${Name} |
| 52 | + } |
| 53 | + |
| 54 | + return $PSO |
| 55 | + } |
| 56 | +} |
| 57 | + |
| 58 | +<# |
| 59 | +.SYNOPSIS |
| 60 | +
|
| 61 | +Convert from JSON to SourceOwner<PSCustomObject> |
| 62 | +
|
| 63 | +.DESCRIPTION |
| 64 | +
|
| 65 | +Convert from JSON to SourceOwner<PSCustomObject> |
| 66 | +
|
| 67 | +.PARAMETER Json |
| 68 | +
|
| 69 | +Json object |
| 70 | +
|
| 71 | +.OUTPUTS |
| 72 | +
|
| 73 | +SourceOwner<PSCustomObject> |
| 74 | +#> |
| 75 | +function ConvertFrom-BetaJsonToSourceOwner { |
| 76 | + Param( |
| 77 | + [AllowEmptyString()] |
| 78 | + [string]$Json |
| 79 | + ) |
| 80 | + |
| 81 | + Process { |
| 82 | + 'Converting JSON to PSCustomObject: PSSailpoint.Beta => BetaSourceOwner' | Write-Debug |
| 83 | + $PSBoundParameters | Out-DebugParameter | Write-Debug |
| 84 | + |
| 85 | + $JsonParameters = ConvertFrom-Json -InputObject $Json |
| 86 | + |
| 87 | + # check if Json contains properties not defined in BetaSourceOwner |
| 88 | + $AllProperties = ("type", "id", "name") |
| 89 | + foreach ($name in $JsonParameters.PsObject.Properties.Name) { |
| 90 | + if (!($AllProperties.Contains($name))) { |
| 91 | + throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" |
| 92 | + } |
| 93 | + } |
| 94 | + |
| 95 | + if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { #optional property not found |
| 96 | + $Type = $null |
| 97 | + } else { |
| 98 | + $Type = $JsonParameters.PSobject.Properties["type"].value |
| 99 | + } |
| 100 | + |
| 101 | + if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { #optional property not found |
| 102 | + $Id = $null |
| 103 | + } else { |
| 104 | + $Id = $JsonParameters.PSobject.Properties["id"].value |
| 105 | + } |
| 106 | + |
| 107 | + if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found |
| 108 | + $Name = $null |
| 109 | + } else { |
| 110 | + $Name = $JsonParameters.PSobject.Properties["name"].value |
| 111 | + } |
| 112 | + |
| 113 | + $PSO = [PSCustomObject]@{ |
| 114 | + "type" = ${Type} |
| 115 | + "id" = ${Id} |
| 116 | + "name" = ${Name} |
| 117 | + } |
| 118 | + |
| 119 | + return $PSO |
| 120 | + } |
| 121 | + |
| 122 | +} |
| 123 | + |
0 commit comments