Model/Emailstatusdto.ps1

#
# Identity Security Cloud API - Notifications
# 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: v1
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER Id
Unique identifier for the verified sender address
.PARAMETER Email
The verified sender email address
.PARAMETER IsVerifiedByDomain
Whether the sender address is verified by domain
.PARAMETER VerificationStatus
The verification status of the sender address
.PARAMETER Region
The AWS SES region the sender address is associated with
.OUTPUTS

Emailstatusdto<PSCustomObject>
#>


function Initialize-Emailstatusdto {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Id},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Email},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${IsVerifiedByDomain} = $false,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("PENDING", "SUCCESS", "FAILED", "NA")]
        [String]
        ${VerificationStatus},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Region}
    )

    Process {
        'Creating PSCustomObject: PSSailpoint.Notifications => Emailstatusdto' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "email" = ${Email}
            "isVerifiedByDomain" = ${IsVerifiedByDomain}
            "verificationStatus" = ${VerificationStatus}
            "region" = ${Region}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to Emailstatusdto<PSCustomObject>

.DESCRIPTION

Convert from JSON to Emailstatusdto<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

Emailstatusdto<PSCustomObject>
#>

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

    Process {
        'Converting JSON to PSCustomObject: PSSailpoint.Notifications => Emailstatusdto' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in Emailstatusdto
        $AllProperties = ("id", "email", "isVerifiedByDomain", "verificationStatus", "region")
        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 "email"))) { #optional property not found
            $Email = $null
        } else {
            $Email = $JsonParameters.PSobject.Properties["email"].value
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "email" = ${Email}
            "isVerifiedByDomain" = ${IsVerifiedByDomain}
            "verificationStatus" = ${VerificationStatus}
            "region" = ${Region}
        }

        return $PSO
    }

}