Model/PageContentTranslation1.ps1

#
# NERM API
# The NERM API accesss and modifies resources in your environment.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER Uid
The user-specified identifier for the record
.PARAMETER PageContentUid
The user-specified identifier of the page content record this translation applies to; one of page_content_id or page_content_uid must be present.
.PARAMETER PageContentId
The id of the page content record this translation applies to; one of page_content_id or page_content_uid must be present.
.PARAMETER Locale
The language locale this translation contains.
.PARAMETER Value
The translated string to present in the user interface.
.OUTPUTS

PageContentTranslation1<PSCustomObject>
#>


function Initialize-NERMPageContentTranslation1 {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Uid},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${PageContentUid},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${PageContentId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Locale},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Value}
    )

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


        $PSO = [PSCustomObject]@{
            "uid" = ${Uid}
            "page_content_uid" = ${PageContentUid}
            "page_content_id" = ${PageContentId}
            "locale" = ${Locale}
            "value" = ${Value}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to PageContentTranslation1<PSCustomObject>

.DESCRIPTION

Convert from JSON to PageContentTranslation1<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

PageContentTranslation1<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in NERMPageContentTranslation1
        $AllProperties = ("uid", "page_content_uid", "page_content_id", "locale", "value")
        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 "uid"))) { #optional property not found
            $Uid = $null
        } else {
            $Uid = $JsonParameters.PSobject.Properties["uid"].value
        }

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

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

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

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

        $PSO = [PSCustomObject]@{
            "uid" = ${Uid}
            "page_content_uid" = ${PageContentUid}
            "page_content_id" = ${PageContentId}
            "locale" = ${Locale}
            "value" = ${Value}
        }

        return $PSO
    }

}