beta/src/PSSailpointBeta/Model/TriggerInputVAClusterStatusChangeEvent.ps1
# # IdentityNow Beta API # Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. These APIs are in beta and are subject to change. 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: 3.1.0-beta # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Created The date and time the status change occurred. .PARAMETER Type The type of the object that initiated this event. .PARAMETER Application No description available. .PARAMETER HealthCheckResult No description available. .PARAMETER PreviousHealthCheckResult No description available. .OUTPUTS TriggerInputVAClusterStatusChangeEvent<PSCustomObject> #> function Initialize-BetaTriggerInputVAClusterStatusChangeEvent { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [System.DateTime] ${Created}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] [ValidateSet("SOURCE", "CLUSTER")] [PSCustomObject] ${Type}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Application}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${HealthCheckResult}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${PreviousHealthCheckResult} ) Process { 'Creating PSCustomObject: PSSailpointBeta => BetaTriggerInputVAClusterStatusChangeEvent' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if ($null -eq $Created) { throw "invalid value for 'Created', 'Created' cannot be null." } if ($null -eq $Type) { throw "invalid value for 'Type', 'Type' cannot be null." } if ($null -eq $Application) { throw "invalid value for 'Application', 'Application' cannot be null." } if ($null -eq $HealthCheckResult) { throw "invalid value for 'HealthCheckResult', 'HealthCheckResult' cannot be null." } if ($null -eq $PreviousHealthCheckResult) { throw "invalid value for 'PreviousHealthCheckResult', 'PreviousHealthCheckResult' cannot be null." } $PSO = [PSCustomObject]@{ "created" = ${Created} "type" = ${Type} "application" = ${Application} "healthCheckResult" = ${HealthCheckResult} "previousHealthCheckResult" = ${PreviousHealthCheckResult} } return $PSO } } <# .SYNOPSIS Convert from JSON to TriggerInputVAClusterStatusChangeEvent<PSCustomObject> .DESCRIPTION Convert from JSON to TriggerInputVAClusterStatusChangeEvent<PSCustomObject> .PARAMETER Json Json object .OUTPUTS TriggerInputVAClusterStatusChangeEvent<PSCustomObject> #> function ConvertFrom-BetaJsonToTriggerInputVAClusterStatusChangeEvent { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpointBeta => BetaTriggerInputVAClusterStatusChangeEvent' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BetaTriggerInputVAClusterStatusChangeEvent $AllProperties = ("created", "type", "application", "healthCheckResult", "previousHealthCheckResult") 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 'created' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "created"))) { throw "Error! JSON cannot be serialized due to the required property 'created' missing." } else { $Created = $JsonParameters.PSobject.Properties["created"].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 "application"))) { throw "Error! JSON cannot be serialized due to the required property 'application' missing." } else { $Application = $JsonParameters.PSobject.Properties["application"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "healthCheckResult"))) { throw "Error! JSON cannot be serialized due to the required property 'healthCheckResult' missing." } else { $HealthCheckResult = $JsonParameters.PSobject.Properties["healthCheckResult"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "previousHealthCheckResult"))) { throw "Error! JSON cannot be serialized due to the required property 'previousHealthCheckResult' missing." } else { $PreviousHealthCheckResult = $JsonParameters.PSobject.Properties["previousHealthCheckResult"].value } $PSO = [PSCustomObject]@{ "created" = ${Created} "type" = ${Type} "application" = ${Application} "healthCheckResult" = ${HealthCheckResult} "previousHealthCheckResult" = ${PreviousHealthCheckResult} } return $PSO } } |