Model/WorkflowActionPerformers1.ps1
|
# # NERM API # The NERM API accesss and modifies resources in your environment. # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER ContributorAttributeId Specify the id of the user attribute to perform the action. .PARAMETER Contributors Set to true to allow profile contributor to perform the action. .PARAMETER ContributorsManagerAttributeId Specify the id of the user attribute to perform the action. .PARAMETER Owner Set to true to allow profile owner to perform the action. .PARAMETER ProfilesContributorsAttributeId Specify the id of the profile attribute to perform the action. .PARAMETER Requester Set to true to allow requester from the request to perform the action. .PARAMETER RequestersManager Set to true to allow the requester's manager from the request to perform the action. .PARAMETER WorkflowActionId Specify the id of the workflow action you would like to create the workflow action performer/s for. .OUTPUTS WorkflowActionPerformers1<PSCustomObject> #> function Initialize-NERMWorkflowActionPerformers1 { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ContributorAttributeId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Contributors} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ContributorsManagerAttributeId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Owner} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ProfilesContributorsAttributeId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Requester} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${RequestersManager} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${WorkflowActionId} ) Process { 'Creating PSCustomObject: PSSailpoint.NERM => NERMWorkflowActionPerformers1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "contributor_attribute_id" = ${ContributorAttributeId} "contributors" = ${Contributors} "contributors_manager_attribute_id" = ${ContributorsManagerAttributeId} "owner" = ${Owner} "profiles_contributors_attribute_id" = ${ProfilesContributorsAttributeId} "requester" = ${Requester} "requesters_manager" = ${RequestersManager} "workflow_action_id" = ${WorkflowActionId} } return $PSO } } <# .SYNOPSIS Convert from JSON to WorkflowActionPerformers1<PSCustomObject> .DESCRIPTION Convert from JSON to WorkflowActionPerformers1<PSCustomObject> .PARAMETER Json Json object .OUTPUTS WorkflowActionPerformers1<PSCustomObject> #> function ConvertFrom-NERMJsonToWorkflowActionPerformers1 { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.NERM => NERMWorkflowActionPerformers1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in NERMWorkflowActionPerformers1 $AllProperties = ("contributor_attribute_id", "contributors", "contributors_manager_attribute_id", "owner", "profiles_contributors_attribute_id", "requester", "requesters_manager", "workflow_action_id") 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 "contributor_attribute_id"))) { #optional property not found $ContributorAttributeId = $null } else { $ContributorAttributeId = $JsonParameters.PSobject.Properties["contributor_attribute_id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "contributors"))) { #optional property not found $Contributors = $null } else { $Contributors = $JsonParameters.PSobject.Properties["contributors"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "contributors_manager_attribute_id"))) { #optional property not found $ContributorsManagerAttributeId = $null } else { $ContributorsManagerAttributeId = $JsonParameters.PSobject.Properties["contributors_manager_attribute_id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "owner"))) { #optional property not found $Owner = $null } else { $Owner = $JsonParameters.PSobject.Properties["owner"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "profiles_contributors_attribute_id"))) { #optional property not found $ProfilesContributorsAttributeId = $null } else { $ProfilesContributorsAttributeId = $JsonParameters.PSobject.Properties["profiles_contributors_attribute_id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "requester"))) { #optional property not found $Requester = $null } else { $Requester = $JsonParameters.PSobject.Properties["requester"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "requesters_manager"))) { #optional property not found $RequestersManager = $null } else { $RequestersManager = $JsonParameters.PSobject.Properties["requesters_manager"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "workflow_action_id"))) { #optional property not found $WorkflowActionId = $null } else { $WorkflowActionId = $JsonParameters.PSobject.Properties["workflow_action_id"].value } $PSO = [PSCustomObject]@{ "contributor_attribute_id" = ${ContributorAttributeId} "contributors" = ${Contributors} "contributors_manager_attribute_id" = ${ContributorsManagerAttributeId} "owner" = ${Owner} "profiles_contributors_attribute_id" = ${ProfilesContributorsAttributeId} "requester" = ${Requester} "requesters_manager" = ${RequestersManager} "workflow_action_id" = ${WorkflowActionId} } return $PSO } } |