Public/New-GCArchitectSchedule.ps1

<#
.SYNOPSIS
    Creates a new architect schedule in Genesys Cloud.

.DESCRIPTION
    Creates a new architect schedule using the Genesys Cloud API.
    API Endpoint: POST /api/v2/architect/schedules

.PARAMETER Body
    The schedule definition object to create. Should include properties such as name, start, end, and rrule.

.EXAMPLE
    $scheduleBody = @{ name = 'Business Hours'; start = '2024-01-01T08:00:00Z'; end = '2024-01-01T17:00:00Z' }
    New-GCArchitectSchedule -Body $scheduleBody
    Creates a new architect schedule.

.NOTES
    Genesys Cloud API: POST /api/v2/architect/schedules
#>

function New-GCArchitectSchedule {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [object]$Body
    )

    $endpoint = "architect/schedules"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method POST -Body $Body
}