Model/Machinesubtypeapprovalconfig.ps1
|
# # Identity Security Cloud API - Machine Account Subtypes # 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 Approvers Comma separated string of approvers. Following are the options for approver types: manager, sourceOwner, accountOwner, workgroup:[workgroupId] (Governance group). Approval request will be assigned based on the order of the approvers passed. Multiple workgroups(governance groups) can be selected as an approver. >**Note:** accountOwner approver type is only for machine account delete approval settings. .PARAMETER Comments Comment configurations for the approval request. Following are the options for comments: ALL, OFF, APPROVAL, REJECT. .OUTPUTS Machinesubtypeapprovalconfig<PSCustomObject> #> function Initialize-Machinesubtypeapprovalconfig { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Approvers}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Comments} ) Process { 'Creating PSCustomObject: PSSailpoint.MachineAccountSubtypes => Machinesubtypeapprovalconfig' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "approvers" = ${Approvers} "comments" = ${Comments} } return $PSO } } <# .SYNOPSIS Convert from JSON to Machinesubtypeapprovalconfig<PSCustomObject> .DESCRIPTION Convert from JSON to Machinesubtypeapprovalconfig<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Machinesubtypeapprovalconfig<PSCustomObject> #> function ConvertFrom-JsonToMachinesubtypeapprovalconfig { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.MachineAccountSubtypes => Machinesubtypeapprovalconfig' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in Machinesubtypeapprovalconfig $AllProperties = ("approvers", "comments") 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 "approvers"))) { #optional property not found $Approvers = $null } else { $Approvers = $JsonParameters.PSobject.Properties["approvers"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "comments"))) { #optional property not found $Comments = $null } else { $Comments = $JsonParameters.PSobject.Properties["comments"].value } $PSO = [PSCustomObject]@{ "approvers" = ${Approvers} "comments" = ${Comments} } return $PSO } } |