v2/src/PSSailpointV2/Model/GetOrgSettings200ResponseSystemNotificationConfigNotificationsInner.ps1

#
# SailPoint SaaS API
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
# Version: 2.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER Type
No description available.
.PARAMETER ByEmail
No description available.
.PARAMETER Thresholds
No description available.
.OUTPUTS

GetOrgSettings200ResponseSystemNotificationConfigNotificationsInner<PSCustomObject>
#>


function Initialize-V2GetOrgSettings200ResponseSystemNotificationConfigNotificationsInner {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Type},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${ByEmail},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Thresholds}
    )

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


        $PSO = [PSCustomObject]@{
            "type" = ${Type}
            "byEmail" = ${ByEmail}
            "thresholds" = ${Thresholds}
        }


        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to GetOrgSettings200ResponseSystemNotificationConfigNotificationsInner<PSCustomObject>

.DESCRIPTION

Convert from JSON to GetOrgSettings200ResponseSystemNotificationConfigNotificationsInner<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

GetOrgSettings200ResponseSystemNotificationConfigNotificationsInner<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2GetOrgSettings200ResponseSystemNotificationConfigNotificationsInner
        $AllProperties = ("type", "byEmail", "thresholds")
        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 "type"))) { #optional property not found
            $Type = $null
        } else {
            $Type = $JsonParameters.PSobject.Properties["type"].value
        }

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

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

        $PSO = [PSCustomObject]@{
            "type" = ${Type}
            "byEmail" = ${ByEmail}
            "thresholds" = ${Thresholds}
        }

        return $PSO
    }

}