Model/PageContentTranslation.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 Locale The language locale this translation contains. .PARAMETER Value The translated string to present in the user interface. .OUTPUTS PageContentTranslation<PSCustomObject> #> function Initialize-NERMPageContentTranslation { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Uid}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Locale}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Value} ) Process { 'Creating PSCustomObject: PSSailpoint.NERM => NERMPageContentTranslation' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "uid" = ${Uid} "locale" = ${Locale} "value" = ${Value} } return $PSO } } <# .SYNOPSIS Convert from JSON to PageContentTranslation<PSCustomObject> .DESCRIPTION Convert from JSON to PageContentTranslation<PSCustomObject> .PARAMETER Json Json object .OUTPUTS PageContentTranslation<PSCustomObject> #> function ConvertFrom-NERMJsonToPageContentTranslation { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.NERM => NERMPageContentTranslation' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in NERMPageContentTranslation $AllProperties = ("id", "uid", "locale", "value", "created_at", "updated_at") 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 "uid"))) { #optional property not found $Uid = $null } else { $Uid = $JsonParameters.PSobject.Properties["uid"].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 } if (!([bool]($JsonParameters.PSobject.Properties.name -match "created_at"))) { #optional property not found $CreatedAt = $null } else { $CreatedAt = $JsonParameters.PSobject.Properties["created_at"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "updated_at"))) { #optional property not found $UpdatedAt = $null } else { $UpdatedAt = $JsonParameters.PSobject.Properties["updated_at"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "uid" = ${Uid} "locale" = ${Locale} "value" = ${Value} "created_at" = ${CreatedAt} "updated_at" = ${UpdatedAt} } return $PSO } } |