Model/CertificationSubjectSummary.ps1
|
# # Identity Security Cloud API - Next Generation Certification Campaigns # 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 The subject being targeted by a certification. .PARAMETER SubjectType The type of subject being targeted by this certification .PARAMETER Id The subject id .PARAMETER SubjectName Name of the target subject .PARAMETER SubjectTargetId The ID of the entity being targeted by a certification .PARAMETER Completed Indicates whether the review items for the linked subject's certification have been completed .PARAMETER SubjectEmail Email of the subject .PARAMETER SubjectManagerName The name of the subject's manager .PARAMETER IdentityState The state of identity/subject .OUTPUTS CertificationSubjectSummary<PSCustomObject> #> function Initialize-CertificationSubjectSummary { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("IDENTITY", "MACHINE_IDENTITY", "ROLE")] [String] ${SubjectType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SubjectName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SubjectTargetId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Completed} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SubjectEmail}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SubjectManagerName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("ACTIVE", "INACTIVE_LONG_TERM", "INACTIVE_SHORT_TERM")] [String] ${IdentityState} ) Process { 'Creating PSCustomObject: PSSailpoint.GovCertification => CertificationSubjectSummary' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "subjectType" = ${SubjectType} "id" = ${Id} "subjectName" = ${SubjectName} "subjectTargetId" = ${SubjectTargetId} "completed" = ${Completed} "subjectEmail" = ${SubjectEmail} "subjectManagerName" = ${SubjectManagerName} "identityState" = ${IdentityState} } return $PSO } } <# .SYNOPSIS Convert from JSON to CertificationSubjectSummary<PSCustomObject> .DESCRIPTION Convert from JSON to CertificationSubjectSummary<PSCustomObject> .PARAMETER Json Json object .OUTPUTS CertificationSubjectSummary<PSCustomObject> #> function ConvertFrom-JsonToCertificationSubjectSummary { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.GovCertification => CertificationSubjectSummary' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in CertificationSubjectSummary $AllProperties = ("subjectType", "id", "subjectName", "subjectTargetId", "completed", "subjectEmail", "subjectManagerName", "identityState") 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 "subjectType"))) { #optional property not found $SubjectType = $null } else { $SubjectType = $JsonParameters.PSobject.Properties["subjectType"].value } 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 "subjectName"))) { #optional property not found $SubjectName = $null } else { $SubjectName = $JsonParameters.PSobject.Properties["subjectName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "subjectTargetId"))) { #optional property not found $SubjectTargetId = $null } else { $SubjectTargetId = $JsonParameters.PSobject.Properties["subjectTargetId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "completed"))) { #optional property not found $Completed = $null } else { $Completed = $JsonParameters.PSobject.Properties["completed"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "subjectEmail"))) { #optional property not found $SubjectEmail = $null } else { $SubjectEmail = $JsonParameters.PSobject.Properties["subjectEmail"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "subjectManagerName"))) { #optional property not found $SubjectManagerName = $null } else { $SubjectManagerName = $JsonParameters.PSobject.Properties["subjectManagerName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "identityState"))) { #optional property not found $IdentityState = $null } else { $IdentityState = $JsonParameters.PSobject.Properties["identityState"].value } $PSO = [PSCustomObject]@{ "subjectType" = ${SubjectType} "id" = ${Id} "subjectName" = ${SubjectName} "subjectTargetId" = ${SubjectTargetId} "completed" = ${Completed} "subjectEmail" = ${SubjectEmail} "subjectManagerName" = ${SubjectManagerName} "identityState" = ${IdentityState} } return $PSO } } |