exports/Set-NmeNetAppFilesAutoscale.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
Set Net App Files auto-scale
.Description
Set Net App Files auto-scale

#>

function Set-NmeNetAppFilesAutoscale {
[OutputType([NmePowershell.Models.IResponseWithJob])]
[CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
    [Parameter(Mandatory)]
    [NmePowershell.Category('Path')]
    [System.String]
    # .
    ${AccountName},

    [Parameter(Mandatory)]
    [NmePowershell.Category('Path')]
    [System.String]
    # .
    ${PoolName},

    [Parameter(Mandatory)]
    [NmePowershell.Category('Path')]
    [System.String]
    # .
    ${ResourceGroupName},

    [Parameter(Mandatory)]
    [NmePowershell.Category('Path')]
    [System.String]
    # .
    ${SubscriptionId},

    [Parameter(Mandatory)]
    [NmePowershell.Category('Path')]
    [System.String]
    # .
    ${VolumeName},

    [Parameter(ParameterSetName='Set', Mandatory, ValueFromPipeline)]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.INetAppFilesAutoscaleConfig]
    # .
    ${Body},

    [Parameter(ParameterSetName='SetExpanded', Mandatory)]
    [NmePowershell.Category('Body')]
    [System.Double]
    # .
    ${BasicMaxSizeBuffer},

    [Parameter(ParameterSetName='SetExpanded', Mandatory)]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${BasicMaxSizeLimit},

    [Parameter(ParameterSetName='SetExpanded', Mandatory)]
    [NmePowershell.Category('Body')]
    [System.Double]
    # .
    ${BasicMinSizeBuffer},

    [Parameter(ParameterSetName='SetExpanded', Mandatory)]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${BasicNonGreedyStrategicEnabled},

    [Parameter(ParameterSetName='SetExpanded', Mandatory)]
    [NmePowershell.PSArgumentCompleterAttribute("VolumeOnly", "VolumeAndPool")]
    [NmePowershell.Category('Body')]
    [System.String]
    # .
    ${BasicScalingMode},

    [Parameter(ParameterSetName='SetExpanded', Mandatory)]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${BasicTriggerLimitExceedingError},

    [Parameter(ParameterSetName='SetExpanded', Mandatory)]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${IsEnabled},

    [Parameter(ParameterSetName='SetExpanded', Mandatory)]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${PreStageIsEnabled},

    [Parameter(ParameterSetName='SetExpanded', Mandatory)]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${ScalingIsEnabled},

    [Parameter(ParameterSetName='SetExpanded', Mandatory)]
    [NmePowershell.PSArgumentCompleterAttribute("Percent", "SizeGb", "SizeTb")]
    [NmePowershell.Category('Body')]
    [System.String]
    # .
    ${Unit},

    [Parameter(ParameterSetName='SetExpanded')]
    [NmePowershell.Category('Body')]
    [System.String]
    # .
    ${PreStageTimezoneId},

    [Parameter(ParameterSetName='SetExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.INetAppFilesWorkTimeSet[]]
    # .
    ${PreStageWorkTimeSets},

    [Parameter(ParameterSetName='SetExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${ScalingScaleInBy},

    [Parameter(ParameterSetName='SetExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${ScalingScaleInInterval},

    [Parameter(ParameterSetName='SetExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${ScalingScaleInLowLatency},

    [Parameter(ParameterSetName='SetExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${ScalingScaleOutBy},

    [Parameter(ParameterSetName='SetExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${ScalingScaleOutHighLatency},

    [Parameter(ParameterSetName='SetExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${ScalingScaleOutInterval},

    [Parameter(ParameterSetName='SetExpanded')]
    [NmePowershell.PSArgumentCompleterAttribute("AvgReadLatency", "AvgWriteLatency", "AvgReadOrWriteLatency")]
    [NmePowershell.Category('Body')]
    [System.String]
    # .
    ${ScalingTrigger},

    [Parameter(DontShow)]
    [NmePowershell.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [NmePowershell.Category('Runtime')]
    [NmePowershell.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [NmePowershell.Category('Runtime')]
    [NmePowershell.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [NmePowershell.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [NmePowershell.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [NmePowershell.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Use the default credentials for the proxy
    ${ProxyUseDefaultCredentials}
)

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 = @{
            Set = 'NerdioManagerPowerShell.private\Set-NmeNetAppFilesAutoscale_Set';
            SetExpanded = 'NerdioManagerPowerShell.private\Set-NmeNetAppFilesAutoscale_SetExpanded';
        }
        $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
    }
} 
}