machine-identities-lifecycle-actions/src/PSSailpoint.MachineIdentitiesLifecycleActions/Model/LifecycleResourceSummary.ps1
|
# # Identity Security Cloud API - Machine Identity Lifecycle Actions # Use these APIs to submit, list, retrieve, and cancel machine identity lifecycle actions (for example agent activate and deactivate). 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 Cached resource context for the lifecycle target. .PARAMETER Id Internal machine identity UUID for the lifecycle target. .PARAMETER ResourceId Connector resource id for the lifecycle target. .PARAMETER Name Display name of the lifecycle target. .PARAMETER SourceId Source identifier for the lifecycle target. .PARAMETER SourceName Source name for the lifecycle target. .PARAMETER Subtype Machine identity subtype for the lifecycle target. .OUTPUTS LifecycleResourceSummary<PSCustomObject> #> function Initialize-LifecycleResourceSummary { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ResourceId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SourceId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SourceName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Subtype} ) Process { 'Creating PSCustomObject: PSSailpoint.MachineIdentitiesLifecycleActions => LifecycleResourceSummary' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "id" = ${Id} "resourceId" = ${ResourceId} "name" = ${Name} "sourceId" = ${SourceId} "sourceName" = ${SourceName} "subtype" = ${Subtype} } return $PSO } } <# .SYNOPSIS Convert from JSON to LifecycleResourceSummary<PSCustomObject> .DESCRIPTION Convert from JSON to LifecycleResourceSummary<PSCustomObject> .PARAMETER Json Json object .OUTPUTS LifecycleResourceSummary<PSCustomObject> #> function ConvertFrom-JsonToLifecycleResourceSummary { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.MachineIdentitiesLifecycleActions => LifecycleResourceSummary' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in LifecycleResourceSummary $AllProperties = ("id", "resourceId", "name", "sourceId", "sourceName", "subtype") 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 "resourceId"))) { #optional property not found $ResourceId = $null } else { $ResourceId = $JsonParameters.PSobject.Properties["resourceId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "sourceId"))) { #optional property not found $SourceId = $null } else { $SourceId = $JsonParameters.PSobject.Properties["sourceId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "sourceName"))) { #optional property not found $SourceName = $null } else { $SourceName = $JsonParameters.PSobject.Properties["sourceName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "subtype"))) { #optional property not found $Subtype = $null } else { $Subtype = $JsonParameters.PSobject.Properties["subtype"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "resourceId" = ${ResourceId} "name" = ${Name} "sourceId" = ${SourceId} "sourceName" = ${SourceName} "subtype" = ${Subtype} } return $PSO } } |