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

#>

function New-NmeAutoScaleProfileOverrideUpdateModel {
[OutputType([NmePowershell.Models.AutoScaleProfileOverrideUpdate])]
[CmdletBinding(PositionalBinding=$false)]
param(
    [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.Category('Body')]
    [System.Boolean]
    ${FlagPreStage},

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

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

    [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]
    ${RollingDrainModeIsEnabled},

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

    [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}
)

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-NmeAutoScaleProfileOverrideUpdateModel';
        }
        $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
    }
} 
}