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


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

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

.Outputs
NmePowershell.Models.TimeInterval

#>

function New-NmeTimeIntervalModel {
    [NmePowershell.ModelCmdletAttribute()]
    [OutputType('NmePowershell.Models.TimeInterval')]
    [CmdletBinding(PositionalBinding=$false)]
    Param(

        [Parameter(Mandatory)]
        [int]
        $Duration,
        [Parameter(Mandatory)]
        [int]
        $Hour,
        [Parameter()]
        [int]
        $Minutes
    )

    process {
        $Object = [NmePowershell.Models.TimeInterval]::New()

        if ($PSBoundParameters.ContainsKey('Duration')) {
            $Object.Duration = $Duration
        }
        if ($PSBoundParameters.ContainsKey('Hour')) {
            $Object.Hour = $Hour
        }
        if ($PSBoundParameters.ContainsKey('Minutes')) {
            $Object.Minutes = $Minutes
        }
        return $Object
    }
}