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

.Outputs
NmePowershell.Models.PreStageHostsConfiguration

#>

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

        [Parameter()]
        [NmePowershell.PSArgumentCompleterAttribute("0", "1", "2", "3", "4", "5", "6")]
        [int[]]
        $ConfigDays,
        [Parameter()]
        [int]
        $ConfigHostsToBeReady,
        [Parameter()]
        [NmePowershell.PSArgumentCompleterAttribute("Count", "Percent")]
        [string]
        $ConfigHostsToBeReadyMeasureType,
        [Parameter()]
        [bool]
        $ConfigPreStageDiskType,
        [Parameter()]
        [bool]
        $ConfigPreStageUnassigned,
        [Parameter()]
        [bool]
        $ConfigPreStageUnassignedHosts,
        [Parameter()]
        [NmePowershell.Models.IPreStageHostsConfigurationItem[]]
        $Configs,
        [Parameter(Mandatory)]
        [bool]
        $Enable,
        [Parameter()]
        [NmePowershell.PSArgumentCompleterAttribute("Hybrid", "Automated")]
        [string]
        $IntelligentPrestageMode,
        [Parameter()]
        [bool]
        $IsMultipleConfigsMode,
        [Parameter()]
        [int]
        $StartWorkDuration,
        [Parameter()]
        [int]
        $StartWorkHour,
        [Parameter()]
        [int]
        $StartWorkMinutes
    )

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

        if ($PSBoundParameters.ContainsKey('ConfigDays')) {
            $Object.ConfigDays = $ConfigDays
        }
        if ($PSBoundParameters.ContainsKey('ConfigHostsToBeReady')) {
            $Object.ConfigHostsToBeReady = $ConfigHostsToBeReady
        }
        if ($PSBoundParameters.ContainsKey('ConfigHostsToBeReadyMeasureType')) {
            $Object.ConfigHostsToBeReadyMeasureType = $ConfigHostsToBeReadyMeasureType
        }
        if ($PSBoundParameters.ContainsKey('ConfigPreStageDiskType')) {
            $Object.ConfigPreStageDiskType = $ConfigPreStageDiskType
        }
        if ($PSBoundParameters.ContainsKey('ConfigPreStageUnassigned')) {
            $Object.ConfigPreStageUnassigned = $ConfigPreStageUnassigned
        }
        if ($PSBoundParameters.ContainsKey('ConfigPreStageUnassignedHosts')) {
            $Object.ConfigPreStageUnassignedHosts = $ConfigPreStageUnassignedHosts
        }
        if ($PSBoundParameters.ContainsKey('Configs')) {
            $Object.Configs = $Configs
        }
        if ($PSBoundParameters.ContainsKey('Enable')) {
            $Object.Enable = $Enable
        }
        if ($PSBoundParameters.ContainsKey('IntelligentPrestageMode')) {
            $Object.IntelligentPrestageMode = $IntelligentPrestageMode
        }
        if ($PSBoundParameters.ContainsKey('IsMultipleConfigsMode')) {
            $Object.IsMultipleConfigsMode = $IsMultipleConfigsMode
        }
        if ($PSBoundParameters.ContainsKey('StartWorkDuration')) {
            $Object.StartWorkDuration = $StartWorkDuration
        }
        if ($PSBoundParameters.ContainsKey('StartWorkHour')) {
            $Object.StartWorkHour = $StartWorkHour
        }
        if ($PSBoundParameters.ContainsKey('StartWorkMinutes')) {
            $Object.StartWorkMinutes = $StartWorkMinutes
        }
        return $Object
    }
}