Public/Get-GCUserOutOfOffice.ps1

<#
.SYNOPSIS
    Retrieves the out of office settings for a user in Genesys Cloud.

.DESCRIPTION
    Queries the Genesys Cloud API to retrieve the out of office configuration
    for a specific user, including start/end dates and activity information.
    API Endpoint: GET /api/v2/users/{userId}/outofoffice

.PARAMETER UserId
    The unique identifier of the user.

.EXAMPLE
    Get-GCUserOutOfOffice -UserId '12345678-1234-1234-1234-123456789012'
    Retrieves the out of office settings for the specified user.

.NOTES
    Genesys Cloud API: GET /api/v2/users/{userId}/outofoffice
#>

function Get-GCUserOutOfOffice {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$UserId
    )

    $endpoint = "users/$UserId/outofoffice"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET
}