Model/TenantUiMetadataItemUpdateRequest.ps1

#
# Identity Security Cloud API - UI Metadata
# 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 IframeWhiteList
Parameter that organizational administrators can adjust to permit another domain to encapsulate IDN within an iframe. If you would like to reset the value use ""null"". It will only allow include into iframe non authenticated portions of the product, such as password reset.
.PARAMETER UsernameLabel
Descriptor for the username input field. If you would like to reset the value use ""null"".
.PARAMETER UsernameEmptyText
Placeholder text displayed in the username input field. If you would like to reset the value use ""null"".
.PARAMETER InstanceBadgeDisplayName
Display name for the instance badge. Optional. Omit this property to leave the stored value unchanged. Use null to clear it.
.PARAMETER InstanceBadgeColor
Hex value of color for the instance badge. Optional. Omit this property to leave the stored value unchanged. Use null to clear it.
.PARAMETER InstanceBadgeVisible
Visibility toggle for the instance badge. Optional. Omit this property to leave the stored value unchanged. Null is stored as false.
.OUTPUTS

TenantUiMetadataItemUpdateRequest<PSCustomObject>
#>


function Initialize-TenantUiMetadataItemUpdateRequest {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${IframeWhiteList},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${UsernameLabel},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${UsernameEmptyText},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${InstanceBadgeDisplayName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${InstanceBadgeColor},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${InstanceBadgeVisible}
    )

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


        $PSO = [PSCustomObject]@{
            "iframeWhiteList" = ${IframeWhiteList}
            "usernameLabel" = ${UsernameLabel}
            "usernameEmptyText" = ${UsernameEmptyText}
            "instanceBadgeDisplayName" = ${InstanceBadgeDisplayName}
            "instanceBadgeColor" = ${InstanceBadgeColor}
            "instanceBadgeVisible" = ${InstanceBadgeVisible}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to TenantUiMetadataItemUpdateRequest<PSCustomObject>

.DESCRIPTION

Convert from JSON to TenantUiMetadataItemUpdateRequest<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

TenantUiMetadataItemUpdateRequest<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in TenantUiMetadataItemUpdateRequest
        $AllProperties = ("iframeWhiteList", "usernameLabel", "usernameEmptyText", "instanceBadgeDisplayName", "instanceBadgeColor", "instanceBadgeVisible")
        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 "iframeWhiteList"))) { #optional property not found
            $IframeWhiteList = $null
        } else {
            $IframeWhiteList = $JsonParameters.PSobject.Properties["iframeWhiteList"].value
        }

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "iframeWhiteList" = ${IframeWhiteList}
            "usernameLabel" = ${UsernameLabel}
            "usernameEmptyText" = ${UsernameEmptyText}
            "instanceBadgeDisplayName" = ${InstanceBadgeDisplayName}
            "instanceBadgeColor" = ${InstanceBadgeColor}
            "instanceBadgeVisible" = ${InstanceBadgeVisible}
        }

        return $PSO
    }

}