nerm/src/PSSailpoint.NERM/Model/WorkflowActionPerformers.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 Id The id of the workflow action performer that was created. .PARAMETER ContributorAttributeId The id of the user attribute to perform the action. .PARAMETER Contributors Set to allow profile contributor to perform the action. .PARAMETER ContributorsManagerAttributeId The id of the user attribute to perform the action. .PARAMETER Owner Set to allow profile owner to perform the action. .PARAMETER ProfilesContributorsAttributeId The id of the profile attribute to perform the action. .PARAMETER Requester Set to allow requester from the request to perform the action. .PARAMETER RequestersManager Set to allow the requester's manager from the request to perform the action. .PARAMETER WorkflowActionId The id of the workflow action. .OUTPUTS WorkflowActionPerformers<PSCustomObject> #> function Initialize-NERMWorkflowActionPerformers { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [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 => NERMWorkflowActionPerformers' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "id" = ${Id} "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 WorkflowActionPerformers<PSCustomObject> .DESCRIPTION Convert from JSON to WorkflowActionPerformers<PSCustomObject> .PARAMETER Json Json object .OUTPUTS WorkflowActionPerformers<PSCustomObject> #> function ConvertFrom-NERMJsonToWorkflowActionPerformers { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.NERM => NERMWorkflowActionPerformers' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in NERMWorkflowActionPerformers $AllProperties = ("id", "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 "id"))) { #optional property not found $Id = $null } else { $Id = $JsonParameters.PSobject.Properties["id"].value } 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]@{ "id" = ${Id} "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 } } |