intelligence/src/PSSailpoint.Intelligence/Model/Intelprivilegedaccessitemwire.ps1
|
# # Identity Security Cloud API - Intelligence # 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: v1 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Privileged True when this item is classified as privileged access for the identity. .PARAMETER Id Identifier of the privileged access item. .PARAMETER Type Type of privileged access object. .PARAMETER DisplayName Display label for the privileged access item in administrative experiences. .PARAMETER Name Technical name of the privileged access item. .PARAMETER Source No description available. .PARAMETER Attribute Source attribute name that carries the privileged value when applicable. .PARAMETER Value Privileged value on the source attribute when applicable. .OUTPUTS Intelprivilegedaccessitemwire<PSCustomObject> #> function Initialize-Intelprivilegedaccessitemwire { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [Boolean] ${Privileged}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${DisplayName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Source}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Attribute}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Value} ) Process { 'Creating PSCustomObject: PSSailpoint.Intelligence => Intelprivilegedaccessitemwire' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Privileged) { throw "invalid value for 'Privileged', 'Privileged' cannot be null." } if (!$Id) { throw "invalid value for 'Id', 'Id' cannot be null." } if (!$Type) { throw "invalid value for 'Type', 'Type' cannot be null." } $PSO = [PSCustomObject]@{ "privileged" = ${Privileged} "id" = ${Id} "type" = ${Type} "displayName" = ${DisplayName} "name" = ${Name} "source" = ${Source} "attribute" = ${Attribute} "value" = ${Value} } return $PSO } } <# .SYNOPSIS Convert from JSON to Intelprivilegedaccessitemwire<PSCustomObject> .DESCRIPTION Convert from JSON to Intelprivilegedaccessitemwire<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Intelprivilegedaccessitemwire<PSCustomObject> #> function ConvertFrom-JsonToIntelprivilegedaccessitemwire { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Intelligence => Intelprivilegedaccessitemwire' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in Intelprivilegedaccessitemwire $AllProperties = ("privileged", "id", "type", "displayName", "name", "source", "attribute", "value") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json throw "Error! Empty JSON cannot be serialized due to the required property 'privileged' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "privileged"))) { throw "Error! JSON cannot be serialized due to the required property 'privileged' missing." } else { $Privileged = $JsonParameters.PSobject.Properties["privileged"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { throw "Error! JSON cannot be serialized due to the required property 'id' missing." } else { $Id = $JsonParameters.PSobject.Properties["id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { throw "Error! JSON cannot be serialized due to the required property 'type' missing." } else { $Type = $JsonParameters.PSobject.Properties["type"].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 "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "source"))) { #optional property not found $Source = $null } else { $Source = $JsonParameters.PSobject.Properties["source"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "attribute"))) { #optional property not found $Attribute = $null } else { $Attribute = $JsonParameters.PSobject.Properties["attribute"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "value"))) { #optional property not found $Value = $null } else { $Value = $JsonParameters.PSobject.Properties["value"].value } $PSO = [PSCustomObject]@{ "privileged" = ${Privileged} "id" = ${Id} "type" = ${Type} "displayName" = ${DisplayName} "name" = ${Name} "source" = ${Source} "attribute" = ${Attribute} "value" = ${Value} } return $PSO } } |