custom/autogen-model-cmdlets/New-NmePreStageHostsConfigurationItemModel.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 PreStageHostsConfigurationItem.
.Description
Create an in-memory object for PreStageHostsConfigurationItem.

.Outputs
NmePowershell.Models.PreStageHostsConfigurationItem

#>

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

        [Parameter(Mandatory)]
        [NmePowershell.PSArgumentCompleterAttribute("0", "1", "2", "3", "4", "5", "6")]
        [int[]]
        $Days,
        [Parameter(Mandatory)]
        [int]
        $HostsToBeReady,
        [Parameter(Mandatory)]
        [NmePowershell.PSArgumentCompleterAttribute("Count", "Percent")]
        [string]
        $HostsToBeReadyMeasureType,
        [Parameter(Mandatory)]
        [bool]
        $PreStageDiskType,
        [Parameter(Mandatory)]
        [bool]
        $PreStageUnassigned,
        [Parameter(Mandatory)]
        [bool]
        $PreStageUnassignedHosts,
        [Parameter(Mandatory)]
        [int]
        $StartWorkDuration,
        [Parameter(Mandatory)]
        [int]
        $StartWorkHour,
        [Parameter()]
        [int]
        $StartWorkMinutes
    )

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

        if ($PSBoundParameters.ContainsKey('Days')) {
            $Object.Days = $Days
        }
        if ($PSBoundParameters.ContainsKey('HostsToBeReady')) {
            $Object.HostsToBeReady = $HostsToBeReady
        }
        if ($PSBoundParameters.ContainsKey('HostsToBeReadyMeasureType')) {
            $Object.HostsToBeReadyMeasureType = $HostsToBeReadyMeasureType
        }
        if ($PSBoundParameters.ContainsKey('PreStageDiskType')) {
            $Object.PreStageDiskType = $PreStageDiskType
        }
        if ($PSBoundParameters.ContainsKey('PreStageUnassigned')) {
            $Object.PreStageUnassigned = $PreStageUnassigned
        }
        if ($PSBoundParameters.ContainsKey('PreStageUnassignedHosts')) {
            $Object.PreStageUnassignedHosts = $PreStageUnassignedHosts
        }
        if ($PSBoundParameters.ContainsKey('StartWorkDuration')) {
            $Object.StartWorkDuration = $StartWorkDuration
        }
        if ($PSBoundParameters.ContainsKey('StartWorkHour')) {
            $Object.StartWorkHour = $StartWorkHour
        }
        if ($PSBoundParameters.ContainsKey('StartWorkMinutes')) {
            $Object.StartWorkMinutes = $StartWorkMinutes
        }
        return $Object
    }
}