exports/New-NmeAutoScaleDefaultConfigurationUpdateModel.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 AutoScaleDefaultConfigurationUpdate.
.Description
Create an in-memory object for AutoScaleDefaultConfigurationUpdate.

#>

function New-NmeAutoScaleDefaultConfigurationUpdateModel {
[OutputType([NmePowershell.Models.AutoScaleDefaultConfigurationUpdate])]
[CmdletBinding(PositionalBinding=$false)]
param(
    [Parameter()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IAutoHealConfigurationItem[]]
    #
    ${AutoHealConfigs},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Boolean]
    ${AutoHealEnable},

    [Parameter()]
    [NmePowershell.PSArgumentCompleterAttribute("BreadthFirst", "DepthFirst", "Persistent", "MultiplePersistent")]
    [NmePowershell.Category('Body')]
    [System.String]
    ${AvdPropertyLoadBalancing},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${AvdPropertyMaxSessionsPerHost},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Boolean]
    ${AvdPropertyStartVMOnConnect},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IAutoHealAction[]]
    #
    ${ConfigActions},

    [Parameter()]
    [NmePowershell.PSArgumentCompleterAttribute("0", "1", "2", "3", "4", "5", "6")]
    [NmePowershell.Category('Body')]
    [System.Int32[]]
    ${ConfigDays},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${ConfigHostsToBeReady},

    [Parameter()]
    [NmePowershell.PSArgumentCompleterAttribute("Count", "Percent")]
    [NmePowershell.Category('Body')]
    [System.String]
    ${ConfigHostsToBeReadyMeasureType},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Boolean]
    ${ConfigPreStageDiskType},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Boolean]
    ${ConfigPreStageUnassigned},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Boolean]
    ${ConfigPreStageUnassignedHosts},

    [Parameter()]
    [NmePowershell.PSArgumentCompleterAttribute("WithoutSessions", "WithoutActive", "WithActive")]
    [NmePowershell.Category('Body')]
    [System.String]
    ${ConfigSessionCriteria},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${ConfigStaleHeartbeatMinutes},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${ConfigWaitMinutes},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${ConfigWaitMinutesBeforeFirstAction},

    [Parameter()]
    [NmePowershell.PSArgumentCompleterAttribute("Available", "Unavailable", "Shutdown", "Disconnected", "Upgrading", "UpgradeFailed", "NoHeartbeat", "NotJoinedToDomain", "DomainTrustRelationshipLost", "SxSStackListenerNotReady", "FSLogixNotHealthy", "NeedsAssistance")]
    [NmePowershell.Category('Body')]
    [System.String[]]
    ${ConfigWvdStatuses},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.String]
    ${MessagingMessage},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${MessagingMinutesBeforeRemove},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IPreStageHostsConfigurationItem[]]
    #
    ${PreStageConfigs},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Boolean]
    ${PreStageEnable},

    [Parameter()]
    [NmePowershell.PSArgumentCompleterAttribute("Hybrid", "Automated")]
    [NmePowershell.Category('Body')]
    [System.String]
    ${PreStageIntelligentPrestageMode},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Boolean]
    ${PreStageIsMultipleConfigsMode},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Boolean]
    ${RestrictionEnable},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Boolean]
    ${RestrictionPutToDrainMode},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Boolean]
    ${RollingDrainModeIsEnabled},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IRollingDrainModeWindow[]]
    #
    ${RollingDrainModeWindows},

    [Parameter()]
    [NmePowershell.PSArgumentCompleterAttribute("High", "Medium", "Low")]
    [NmePowershell.Category('Body')]
    [System.String]
    ${ScaleInPolicyAggressiveness},

    [Parameter()]
    [NmePowershell.PSArgumentCompleterAttribute("Running", "AvailableForConnection")]
    [NmePowershell.Category('Body')]
    [System.String]
    ${SizeActiveHostType},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${SizeBurstCapacity},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${SizeHostPoolCapacity},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${SizeMinActiveHostsCount},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${StartWorkDuration},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${StartWorkHour},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${StartWorkMinutes},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${TimeRangeEndHour},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${TimeRangeEndMinutes},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${TimeRangeStartHour},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [System.Int32]
    ${TimeRangeStartMinutes},

    [Parameter()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IDynamicPoolTriggerInfo[]]
    #
    ${Triggers}
)

begin {
    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
            $PSBoundParameters['OutBuffer'] = 1
        }
        $parameterSet = $PSCmdlet.ParameterSetName
        
        $testPlayback = $false
        $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('NmePowershell.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }

        $mapping = @{
            __AllParameterSets = 'NerdioManagerPowerShell.custom\New-NmeAutoScaleDefaultConfigurationUpdateModel';
        }
        $cmdInfo = Get-Command -Name $mapping[$parameterSet]
        [NmePowershell.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
        [NmePowershell.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        if ($wrappedCmd -eq $null) {
            $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
        }
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {

        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {

        throw
    }

}
end {
    try {
        $steppablePipeline.End()

    } catch {

        throw
    }
} 
}