Model/EntitlementrecommendationassigneeOneOf1.ps1
|
# # Identity Security Cloud API - Suggested Entitlement Description # 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 Assign to the source owner or entitlement owner role. No value field is required. .PARAMETER Type The type of assignee. .OUTPUTS EntitlementrecommendationassigneeOneOf1<PSCustomObject> #> function Initialize-EntitlementrecommendationassigneeOneOf1 { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("SOURCE_OWNER", "ENTITLEMENT_OWNER")] [String] ${Type} ) Process { 'Creating PSCustomObject: PSSailpoint.SuggestedEntitlementDescription => EntitlementrecommendationassigneeOneOf1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Type) { throw "invalid value for 'Type', 'Type' cannot be null." } $PSO = [PSCustomObject]@{ "type" = ${Type} } return $PSO } } <# .SYNOPSIS Convert from JSON to EntitlementrecommendationassigneeOneOf1<PSCustomObject> .DESCRIPTION Convert from JSON to EntitlementrecommendationassigneeOneOf1<PSCustomObject> .PARAMETER Json Json object .OUTPUTS EntitlementrecommendationassigneeOneOf1<PSCustomObject> #> function ConvertFrom-JsonToEntitlementrecommendationassigneeOneOf1 { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.SuggestedEntitlementDescription => EntitlementrecommendationassigneeOneOf1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in EntitlementrecommendationassigneeOneOf1 $AllProperties = ("type") 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 'type' missing." } 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 } $PSO = [PSCustomObject]@{ "type" = ${Type} } return $PSO } } |