beta/src/PSSailpointBeta/Model/DkimAttributesDto.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

DKIM attributes for a domain / identity

.PARAMETER Address
The identity or domain address
.PARAMETER DkimEnabled
Whether or not DKIM has been enabled for this domain / identity
.PARAMETER DkimTokens
The tokens to be added to a DNS for verification
.PARAMETER DkimVerificationStatus
The current status if the domain /identity has been verified. Ie Success, Failed, Pending
.OUTPUTS

DkimAttributesDto<PSCustomObject>
#>


function Initialize-BetaDkimAttributesDto {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Address},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${DkimEnabled},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${DkimTokens},
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${DkimVerificationStatus}
    )

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


        $PSO = [PSCustomObject]@{
            "address" = ${Address}
            "dkimEnabled" = ${DkimEnabled}
            "dkimTokens" = ${DkimTokens}
            "dkimVerificationStatus" = ${DkimVerificationStatus}
        }


        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to DkimAttributesDto<PSCustomObject>

.DESCRIPTION

Convert from JSON to DkimAttributesDto<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

DkimAttributesDto<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in BetaDkimAttributesDto
        $AllProperties = ("address", "dkimEnabled", "dkimTokens", "dkimVerificationStatus")
        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 "address"))) { #optional property not found
            $Address = $null
        } else {
            $Address = $JsonParameters.PSobject.Properties["address"].value
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "address" = ${Address}
            "dkimEnabled" = ${DkimEnabled}
            "dkimTokens" = ${DkimTokens}
            "dkimVerificationStatus" = ${DkimVerificationStatus}
        }

        return $PSO
    }

}