cc/src/PSSailpointCC/Model/ListApplications200ResponseInnerHealth.ps1

#
# IdentityNow cc (private) APIs
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER Status
No description available.
.PARAMETER LastChanged
No description available.
.PARAMETER Since
No description available.
.PARAMETER Healthy
No description available.
.OUTPUTS

ListApplications200ResponseInnerHealth<PSCustomObject>
#>


function Initialize-CCListApplications200ResponseInnerHealth {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Status},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${LastChanged},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Decimal]]
        ${Since},
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Healthy}
    )

    Process {
        'Creating PSCustomObject: PSSailpointCC => CCListApplications200ResponseInnerHealth' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "status" = ${Status}
            "lastChanged" = ${LastChanged}
            "since" = ${Since}
            "healthy" = ${Healthy}
        }


        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to ListApplications200ResponseInnerHealth<PSCustomObject>

.DESCRIPTION

Convert from JSON to ListApplications200ResponseInnerHealth<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

ListApplications200ResponseInnerHealth<PSCustomObject>
#>

function ConvertFrom-CCJsonToListApplications200ResponseInnerHealth {
    Param(
        [AllowEmptyString()]
        [string]$Json
    )

    Process {
        'Converting JSON to PSCustomObject: PSSailpointCC => CCListApplications200ResponseInnerHealth' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in CCListApplications200ResponseInnerHealth
        $AllProperties = ("status", "lastChanged", "since", "healthy")
        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 "status"))) { #optional property not found
            $Status = $null
        } else {
            $Status = $JsonParameters.PSobject.Properties["status"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastChanged"))) { #optional property not found
            $LastChanged = $null
        } else {
            $LastChanged = $JsonParameters.PSobject.Properties["lastChanged"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "since"))) { #optional property not found
            $Since = $null
        } else {
            $Since = $JsonParameters.PSobject.Properties["since"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "healthy"))) { #optional property not found
            $Healthy = $null
        } else {
            $Healthy = $JsonParameters.PSobject.Properties["healthy"].value
        }

        $PSO = [PSCustomObject]@{
            "status" = ${Status}
            "lastChanged" = ${LastChanged}
            "since" = ${Since}
            "healthy" = ${Healthy}
        }

        return $PSO
    }

}