branding/src/PSSailpoint.Branding/Model/BrandingItem.ps1

#
# SailPoint Identity Security API - Branding
# Use these APIs to interact with the SailPoint Identity Security 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 Name
name of branding item
.PARAMETER ProductName
product name
.PARAMETER ActionButtonColor
hex value of color for action button
.PARAMETER DarkActionButtonColor
hex value of color for action button in dark mode
.PARAMETER ActiveLinkColor
hex value of color for link
.PARAMETER DarkActiveLinkColor
hex value of color for link in dark mode
.PARAMETER NavigationColor
hex value of color for navigation bar
.PARAMETER DarkNavigationColor
hex value of color for navigation bar in dark mode
.PARAMETER EmailFromAddress
email from address
.PARAMETER StandardLogoURL
url to standard logo
.PARAMETER DarkStandardLogoURL
url to dark-mode logo
.PARAMETER LoginInformationalMessage
login information message
.OUTPUTS

BrandingItem<PSCustomObject>
#>


function Initialize-BrandingItem {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Name},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ProductName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ActionButtonColor},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${DarkActionButtonColor},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ActiveLinkColor},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${DarkActiveLinkColor},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${NavigationColor},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${DarkNavigationColor},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${EmailFromAddress},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${StandardLogoURL},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${DarkStandardLogoURL},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${LoginInformationalMessage}
    )

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


        $PSO = [PSCustomObject]@{
            "name" = ${Name}
            "productName" = ${ProductName}
            "actionButtonColor" = ${ActionButtonColor}
            "darkActionButtonColor" = ${DarkActionButtonColor}
            "activeLinkColor" = ${ActiveLinkColor}
            "darkActiveLinkColor" = ${DarkActiveLinkColor}
            "navigationColor" = ${NavigationColor}
            "darkNavigationColor" = ${DarkNavigationColor}
            "emailFromAddress" = ${EmailFromAddress}
            "standardLogoURL" = ${StandardLogoURL}
            "darkStandardLogoURL" = ${DarkStandardLogoURL}
            "loginInformationalMessage" = ${LoginInformationalMessage}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to BrandingItem<PSCustomObject>

.DESCRIPTION

Convert from JSON to BrandingItem<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

BrandingItem<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in BrandingItem
        $AllProperties = ("name", "productName", "actionButtonColor", "darkActionButtonColor", "activeLinkColor", "darkActiveLinkColor", "navigationColor", "darkNavigationColor", "emailFromAddress", "standardLogoURL", "darkStandardLogoURL", "loginInformationalMessage")
        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 "name"))) { #optional property not found
            $Name = $null
        } else {
            $Name = $JsonParameters.PSobject.Properties["name"].value
        }

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

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

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

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

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

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

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "name" = ${Name}
            "productName" = ${ProductName}
            "actionButtonColor" = ${ActionButtonColor}
            "darkActionButtonColor" = ${DarkActionButtonColor}
            "activeLinkColor" = ${ActiveLinkColor}
            "darkActiveLinkColor" = ${DarkActiveLinkColor}
            "navigationColor" = ${NavigationColor}
            "darkNavigationColor" = ${DarkNavigationColor}
            "emailFromAddress" = ${EmailFromAddress}
            "standardLogoURL" = ${StandardLogoURL}
            "darkStandardLogoURL" = ${DarkStandardLogoURL}
            "loginInformationalMessage" = ${LoginInformationalMessage}
        }

        return $PSO
    }

}