custom/autogen-model-cmdlets/New-RwJobScheduleObject.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
RunwaySdk.PowerShell.Models.JobSchedule
.Link
https://docs.microsoft.com/en-us/powershell/module/az./new-RwJobScheduleObject
#>

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

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

    process {
        $Object = [RunwaySdk.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
    }
}