branding/src/PSSailpoint.Branding/Api/BrandingApi.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

Create a branding item

.DESCRIPTION

This API endpoint creates a branding item.

.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 LoginInformationalMessage
login information message

.PARAMETER FileStandard
png file with logo. To remove an existing logo, delete the branding item and create it again. Omitting this field on update keeps the current logo.

.PARAMETER DarkFileStandard
png file with dark-mode logo. To remove an existing dark-mode logo, delete the branding item and create it again. Omitting this field on update keeps the current dark-mode logo.

.PARAMETER WithHttpInfo

A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response

.OUTPUTS

BrandingItem
#>

function New-BrandingItemV1 {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${Name},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ProductName},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ActionButtonColor},
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${DarkActionButtonColor},
        [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ActiveLinkColor},
        [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${DarkActiveLinkColor},
        [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${NavigationColor},
        [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${DarkNavigationColor},
        [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${EmailFromAddress},
        [Parameter(Position = 9, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${LoginInformationalMessage},
        [Parameter(Position = 10, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [System.IO.FileInfo]
        ${FileStandard},
        [Parameter(Position = 11, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [System.IO.FileInfo]
        ${DarkFileStandard},
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: New-BrandingItemV1' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('application/json')

        # HTTP header 'Content-Type'
        $LocalVarContentTypes = @('multipart/form-data')

        $LocalVarUri = '/brandings/v1'

        if (!$Name) {
            throw "Error! The required parameter `Name` missing when calling createBrandingItemV1."
        }
        $LocalVarFormParameters['name'] = $Name

        if ($ActionButtonColor) {
            $LocalVarFormParameters['actionButtonColor'] = $ActionButtonColor
        }

        if ($DarkActionButtonColor) {
            $LocalVarFormParameters['darkActionButtonColor'] = $DarkActionButtonColor
        }

        if ($ActiveLinkColor) {
            $LocalVarFormParameters['activeLinkColor'] = $ActiveLinkColor
        }

        if ($DarkActiveLinkColor) {
            $LocalVarFormParameters['darkActiveLinkColor'] = $DarkActiveLinkColor
        }

        if ($NavigationColor) {
            $LocalVarFormParameters['navigationColor'] = $NavigationColor
        }

        if ($DarkNavigationColor) {
            $LocalVarFormParameters['darkNavigationColor'] = $DarkNavigationColor
        }

        if ($EmailFromAddress) {
            $LocalVarFormParameters['emailFromAddress'] = $EmailFromAddress
        }

        if ($LoginInformationalMessage) {
            $LocalVarFormParameters['loginInformationalMessage'] = $LoginInformationalMessage
        }

        if ($FileStandard) {
            $LocalVarFormParameters['fileStandard'] = $FileStandard | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
        }

        if ($DarkFileStandard) {
            $LocalVarFormParameters['darkFileStandard'] = $DarkFileStandard | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
        }

        $LocalVarResult = Invoke-ApiClient -Method 'POST' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "BrandingItem" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}

<#
.SYNOPSIS

Delete a branding item

.DESCRIPTION

This API endpoint delete information for an existing branding item by name.

.PARAMETER Name
The name of the branding item to be deleted

.PARAMETER WithHttpInfo

A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response

.OUTPUTS

None
#>

function Remove-BrandingV1 {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${Name},
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Remove-BrandingV1' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('application/json')

        $LocalVarUri = '/brandings/v1/{name}'
        if (!$Name) {
            throw "Error! The required parameter `Name` missing when calling deleteBrandingV1."
        }
        $LocalVarUri = $LocalVarUri.replace('{name}', [System.Web.HTTPUtility]::UrlEncode($Name))

        $LocalVarResult = Invoke-ApiClient -Method 'DELETE' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}

<#
.SYNOPSIS

Clear the default branding item

.DESCRIPTION

This API endpoint clears the customizable properties of the default branding item. The default item is kept.

.PARAMETER WithHttpInfo

A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response

.OUTPUTS

None
#>

function Remove-DefaultBrandingV1 {
    [CmdletBinding()]
    Param (
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Remove-DefaultBrandingV1' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('application/json')

        $LocalVarUri = '/brandings/v1/default'

        $LocalVarResult = Invoke-ApiClient -Method 'DELETE' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}

<#
.SYNOPSIS

List of branding items

.DESCRIPTION

This API endpoint returns a list of branding items.

.PARAMETER WithHttpInfo

A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response

.OUTPUTS

BrandingItem[]
#>

function Get-BrandingListV1 {
    [CmdletBinding()]
    Param (
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Get-BrandingListV1' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('application/json')

        $LocalVarUri = '/brandings/v1'

        $LocalVarResult = Invoke-ApiClient -Method 'GET' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "BrandingItem[]" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}

<#
.SYNOPSIS

Get a branding item

.DESCRIPTION

This API endpoint retrieves information for an existing branding item by name.

.PARAMETER Name
The name of the branding item to be retrieved

.PARAMETER WithHttpInfo

A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response

.OUTPUTS

BrandingItem
#>

function Get-BrandingV1 {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${Name},
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Get-BrandingV1' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('application/json')

        $LocalVarUri = '/brandings/v1/{name}'
        if (!$Name) {
            throw "Error! The required parameter `Name` missing when calling getBrandingV1."
        }
        $LocalVarUri = $LocalVarUri.replace('{name}', [System.Web.HTTPUtility]::UrlEncode($Name))

        $LocalVarResult = Invoke-ApiClient -Method 'GET' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "BrandingItem" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}

<#
.SYNOPSIS

Update a branding item

.DESCRIPTION

This API endpoint updates information for an existing branding item.

.PARAMETER Name
The name of the branding item to be retrieved

.PARAMETER Name2
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 LoginInformationalMessage
login information message

.PARAMETER FileStandard
png file with logo. To remove an existing logo, delete the branding item and create it again. Omitting this field on update keeps the current logo.

.PARAMETER DarkFileStandard
png file with dark-mode logo. To remove an existing dark-mode logo, delete the branding item and create it again. Omitting this field on update keeps the current dark-mode logo.

.PARAMETER WithHttpInfo

A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response

.OUTPUTS

BrandingItem
#>

function Set-BrandingItemV1 {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${Name},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${Name2},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ProductName},
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ActionButtonColor},
        [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${DarkActionButtonColor},
        [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ActiveLinkColor},
        [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${DarkActiveLinkColor},
        [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${NavigationColor},
        [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${DarkNavigationColor},
        [Parameter(Position = 9, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${EmailFromAddress},
        [Parameter(Position = 10, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${LoginInformationalMessage},
        [Parameter(Position = 11, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [System.IO.FileInfo]
        ${FileStandard},
        [Parameter(Position = 12, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [System.IO.FileInfo]
        ${DarkFileStandard},
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Set-BrandingItemV1' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('application/json')

        # HTTP header 'Content-Type'
        $LocalVarContentTypes = @('multipart/form-data')

        $LocalVarUri = '/brandings/v1/{name}'
        if (!$Name) {
            throw "Error! The required parameter `Name` missing when calling setBrandingItemV1."
        }
        $LocalVarUri = $LocalVarUri.replace('{name}', [System.Web.HTTPUtility]::UrlEncode($Name))

        if (!$Name2) {
            throw "Error! The required parameter `Name2` missing when calling setBrandingItemV1."
        }
        $LocalVarFormParameters['name'] = $Name2

        if ($ActionButtonColor) {
            $LocalVarFormParameters['actionButtonColor'] = $ActionButtonColor
        }

        if ($DarkActionButtonColor) {
            $LocalVarFormParameters['darkActionButtonColor'] = $DarkActionButtonColor
        }

        if ($ActiveLinkColor) {
            $LocalVarFormParameters['activeLinkColor'] = $ActiveLinkColor
        }

        if ($DarkActiveLinkColor) {
            $LocalVarFormParameters['darkActiveLinkColor'] = $DarkActiveLinkColor
        }

        if ($NavigationColor) {
            $LocalVarFormParameters['navigationColor'] = $NavigationColor
        }

        if ($DarkNavigationColor) {
            $LocalVarFormParameters['darkNavigationColor'] = $DarkNavigationColor
        }

        if ($EmailFromAddress) {
            $LocalVarFormParameters['emailFromAddress'] = $EmailFromAddress
        }

        if ($LoginInformationalMessage) {
            $LocalVarFormParameters['loginInformationalMessage'] = $LoginInformationalMessage
        }

        if ($FileStandard) {
            $LocalVarFormParameters['fileStandard'] = $FileStandard | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
        }

        if ($DarkFileStandard) {
            $LocalVarFormParameters['darkFileStandard'] = $DarkFileStandard | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
        }

        $LocalVarResult = Invoke-ApiClient -Method 'PUT' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "BrandingItem" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}