custom/autogen-model-cmdlets/New-BcJobScheduleObject.ps1


# ----------------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.7.2, generator: @autorest/powershell@3.0.471)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Create an in-memory object for JobSchedule.
.Description
Create an in-memory object for JobSchedule.

.Outputs
BrazenCloudSdk.PowerShell.Models.JobSchedule
.Link
https://docs.microsoft.com/en-us/powershell/module/az./new-BcJobScheduleObject
#>

function New-BcJobScheduleObject {
    [OutputType('BrazenCloudSdk.PowerShell.Models.JobSchedule')]
    [CmdletBinding(PositionalBinding=$false)]
    Param(

        [Parameter(Mandatory)]
        [int]
        $RepeatMinutes,
        [Parameter(Mandatory)]
        [string]
        $ScheduleType,
        [Parameter()]
        [string]
        $Time,
        [Parameter()]
        [string]
        $Weekdays
    )

    process {
        $Object = [BrazenCloudSdk.PowerShell.Models.JobSchedule]::New()

        if ($PSBoundParameters.ContainsKey('RepeatMinutes')) {
            $Object.RepeatMinutes = $RepeatMinutes
        }
        if ($PSBoundParameters.ContainsKey('ScheduleType')) {
            $Object.ScheduleType = $ScheduleType
        }
        if ($PSBoundParameters.ContainsKey('Time')) {
            $Object.Time = $Time
        }
        if ($PSBoundParameters.ContainsKey('Weekdays')) {
            $Object.Weekdays = $Weekdays
        }
        return $Object
    }
}