v2025/src/PSSailpoint.V2025/Model/ManagedClientHealthIndicators.ps1
|
# # Identity Security Cloud V2025 API # 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: v2025 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION Health Indicators for a Managed Client .PARAMETER Body No description available. .PARAMETER Status Top-level status of the Managed Client .PARAMETER Type Type of the Managed Client .PARAMETER Timestamp Timestamp when this report was generated .OUTPUTS ManagedClientHealthIndicators<PSCustomObject> #> function Initialize-V2025ManagedClientHealthIndicators { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Body}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("NORMAL", "UNDEFINED", "WARNING", "ERROR", "FAILED")] [String] ${Status}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("VA", "CCG")] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.DateTime] ${Timestamp} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025ManagedClientHealthIndicators' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Body) { throw "invalid value for 'Body', 'Body' cannot be null." } if (!$Status) { throw "invalid value for 'Status', 'Status' cannot be null." } if (!$Type) { throw "invalid value for 'Type', 'Type' cannot be null." } if (!$Timestamp) { throw "invalid value for 'Timestamp', 'Timestamp' cannot be null." } $PSO = [PSCustomObject]@{ "body" = ${Body} "status" = ${Status} "type" = ${Type} "timestamp" = ${Timestamp} } return $PSO } } <# .SYNOPSIS Convert from JSON to ManagedClientHealthIndicators<PSCustomObject> .DESCRIPTION Convert from JSON to ManagedClientHealthIndicators<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ManagedClientHealthIndicators<PSCustomObject> #> function ConvertFrom-V2025JsonToManagedClientHealthIndicators { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025ManagedClientHealthIndicators' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025ManagedClientHealthIndicators $AllProperties = ("body", "status", "type", "timestamp") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json throw "Error! Empty JSON cannot be serialized due to the required property 'body' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "body"))) { throw "Error! JSON cannot be serialized due to the required property 'body' missing." } else { $Body = $JsonParameters.PSobject.Properties["body"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { throw "Error! JSON cannot be serialized due to the required property 'status' missing." } else { $Status = $JsonParameters.PSobject.Properties["status"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { throw "Error! JSON cannot be serialized due to the required property 'type' missing." } else { $Type = $JsonParameters.PSobject.Properties["type"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "timestamp"))) { throw "Error! JSON cannot be serialized due to the required property 'timestamp' missing." } else { $Timestamp = $JsonParameters.PSobject.Properties["timestamp"].value } $PSO = [PSCustomObject]@{ "body" = ${Body} "status" = ${Status} "type" = ${Type} "timestamp" = ${Timestamp} } return $PSO } } |