custom/autogen-model-cmdlets/New-NmeAutoScaleDefaultConfigurationModel.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 AutoScaleDefaultConfiguration. .Description Create an in-memory object for AutoScaleDefaultConfiguration. .Outputs NmePowershell.Models.AutoScaleDefaultConfiguration #> function New-NmeAutoScaleDefaultConfigurationModel { [NmePowershell.ModelCmdletAttribute()] [OutputType('NmePowershell.Models.AutoScaleDefaultConfiguration')] [CmdletBinding(PositionalBinding=$false)] Param( [Parameter()] [NmePowershell.Models.IAutoHealConfigurationItem[]] $AutoHealConfigs, [Parameter(Mandatory)] [bool] $AutoHealEnable, [Parameter(Mandatory)] [NmePowershell.PSArgumentCompleterAttribute("BreadthFirst", "DepthFirst", "Persistent", "MultiplePersistent")] [string] $AvdPropertyLoadBalancing, [Parameter(Mandatory)] [int] $AvdPropertyMaxSessionsPerHost, [Parameter(Mandatory)] [bool] $AvdPropertyStartVMOnConnect, [Parameter()] [NmePowershell.Models.IAutoHealAction[]] $ConfigActions, [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.PSArgumentCompleterAttribute("WithoutSessions", "WithoutActive", "WithActive")] [string] $ConfigSessionCriteria, [Parameter()] [int] $ConfigStaleHeartbeatMinutes, [Parameter()] [int] $ConfigWaitMinutes, [Parameter()] [int] $ConfigWaitMinutesBeforeFirstAction, [Parameter()] [NmePowershell.PSArgumentCompleterAttribute("Available", "Unavailable", "Shutdown", "Disconnected", "Upgrading", "UpgradeFailed", "NoHeartbeat", "NotJoinedToDomain", "DomainTrustRelationshipLost", "SxSStackListenerNotReady", "FSLogixNotHealthy", "NeedsAssistance")] [string[]] $ConfigWvdStatuses, [Parameter()] [string] $MessagingMessage, [Parameter()] [int] $MessagingMinutesBeforeRemove, [Parameter()] [NmePowershell.Models.IPreStageHostsConfigurationItem[]] $PreStageConfigs, [Parameter(Mandatory)] [bool] $PreStageEnable, [Parameter()] [NmePowershell.PSArgumentCompleterAttribute("Hybrid", "Automated")] [string] $PreStageIntelligentPrestageMode, [Parameter()] [bool] $PreStageIsMultipleConfigsMode, [Parameter(Mandatory)] [bool] $RestrictionEnable, [Parameter(Mandatory)] [bool] $RestrictionPutToDrainMode, [Parameter(Mandatory)] [bool] $RollingDrainModeIsEnabled, [Parameter(Mandatory)] [NmePowershell.Models.IRollingDrainModeWindow[]] $RollingDrainModeWindows, [Parameter(Mandatory)] [NmePowershell.PSArgumentCompleterAttribute("High", "Medium", "Low")] [string] $ScaleInPolicyAggressiveness, [Parameter(Mandatory)] [NmePowershell.PSArgumentCompleterAttribute("Running", "AvailableForConnection")] [string] $SizeActiveHostType, [Parameter(Mandatory)] [int] $SizeBurstCapacity, [Parameter(Mandatory)] [int] $SizeHostPoolCapacity, [Parameter(Mandatory)] [int] $SizeMinActiveHostsCount, [Parameter()] [int] $StartWorkDuration, [Parameter()] [int] $StartWorkHour, [Parameter()] [int] $StartWorkMinutes, [Parameter()] [int] $TimeRangeEndHour, [Parameter()] [int] $TimeRangeEndMinutes, [Parameter()] [int] $TimeRangeStartHour, [Parameter()] [int] $TimeRangeStartMinutes, [Parameter(Mandatory)] [NmePowershell.Models.IDynamicPoolTriggerInfo[]] $Triggers ) process { $Object = [NmePowershell.Models.AutoScaleDefaultConfiguration]::New() if ($PSBoundParameters.ContainsKey('AutoHealConfigs')) { $Object.AutoHealConfigs = $AutoHealConfigs } if ($PSBoundParameters.ContainsKey('AutoHealEnable')) { $Object.AutoHealEnable = $AutoHealEnable } if ($PSBoundParameters.ContainsKey('AvdPropertyLoadBalancing')) { $Object.AvdPropertyLoadBalancing = $AvdPropertyLoadBalancing } if ($PSBoundParameters.ContainsKey('AvdPropertyMaxSessionsPerHost')) { $Object.AvdPropertyMaxSessionsPerHost = $AvdPropertyMaxSessionsPerHost } if ($PSBoundParameters.ContainsKey('AvdPropertyStartVMOnConnect')) { $Object.AvdPropertyStartVMOnConnect = $AvdPropertyStartVMOnConnect } if ($PSBoundParameters.ContainsKey('ConfigActions')) { $Object.ConfigActions = $ConfigActions } 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('ConfigSessionCriteria')) { $Object.ConfigSessionCriteria = $ConfigSessionCriteria } if ($PSBoundParameters.ContainsKey('ConfigStaleHeartbeatMinutes')) { $Object.ConfigStaleHeartbeatMinutes = $ConfigStaleHeartbeatMinutes } if ($PSBoundParameters.ContainsKey('ConfigWaitMinutes')) { $Object.ConfigWaitMinutes = $ConfigWaitMinutes } if ($PSBoundParameters.ContainsKey('ConfigWaitMinutesBeforeFirstAction')) { $Object.ConfigWaitMinutesBeforeFirstAction = $ConfigWaitMinutesBeforeFirstAction } if ($PSBoundParameters.ContainsKey('ConfigWvdStatuses')) { $Object.ConfigWvdStatuses = $ConfigWvdStatuses } if ($PSBoundParameters.ContainsKey('MessagingMessage')) { $Object.MessagingMessage = $MessagingMessage } if ($PSBoundParameters.ContainsKey('MessagingMinutesBeforeRemove')) { $Object.MessagingMinutesBeforeRemove = $MessagingMinutesBeforeRemove } if ($PSBoundParameters.ContainsKey('PreStageConfigs')) { $Object.PreStageConfigs = $PreStageConfigs } if ($PSBoundParameters.ContainsKey('PreStageEnable')) { $Object.PreStageEnable = $PreStageEnable } if ($PSBoundParameters.ContainsKey('PreStageIntelligentPrestageMode')) { $Object.PreStageIntelligentPrestageMode = $PreStageIntelligentPrestageMode } if ($PSBoundParameters.ContainsKey('PreStageIsMultipleConfigsMode')) { $Object.PreStageIsMultipleConfigsMode = $PreStageIsMultipleConfigsMode } if ($PSBoundParameters.ContainsKey('RestrictionEnable')) { $Object.RestrictionEnable = $RestrictionEnable } if ($PSBoundParameters.ContainsKey('RestrictionPutToDrainMode')) { $Object.RestrictionPutToDrainMode = $RestrictionPutToDrainMode } if ($PSBoundParameters.ContainsKey('RollingDrainModeIsEnabled')) { $Object.RollingDrainModeIsEnabled = $RollingDrainModeIsEnabled } if ($PSBoundParameters.ContainsKey('RollingDrainModeWindows')) { $Object.RollingDrainModeWindows = $RollingDrainModeWindows } if ($PSBoundParameters.ContainsKey('ScaleInPolicyAggressiveness')) { $Object.ScaleInPolicyAggressiveness = $ScaleInPolicyAggressiveness } if ($PSBoundParameters.ContainsKey('SizeActiveHostType')) { $Object.SizeActiveHostType = $SizeActiveHostType } if ($PSBoundParameters.ContainsKey('SizeBurstCapacity')) { $Object.SizeBurstCapacity = $SizeBurstCapacity } if ($PSBoundParameters.ContainsKey('SizeHostPoolCapacity')) { $Object.SizeHostPoolCapacity = $SizeHostPoolCapacity } if ($PSBoundParameters.ContainsKey('SizeMinActiveHostsCount')) { $Object.SizeMinActiveHostsCount = $SizeMinActiveHostsCount } if ($PSBoundParameters.ContainsKey('StartWorkDuration')) { $Object.StartWorkDuration = $StartWorkDuration } if ($PSBoundParameters.ContainsKey('StartWorkHour')) { $Object.StartWorkHour = $StartWorkHour } if ($PSBoundParameters.ContainsKey('StartWorkMinutes')) { $Object.StartWorkMinutes = $StartWorkMinutes } if ($PSBoundParameters.ContainsKey('TimeRangeEndHour')) { $Object.TimeRangeEndHour = $TimeRangeEndHour } if ($PSBoundParameters.ContainsKey('TimeRangeEndMinutes')) { $Object.TimeRangeEndMinutes = $TimeRangeEndMinutes } if ($PSBoundParameters.ContainsKey('TimeRangeStartHour')) { $Object.TimeRangeStartHour = $TimeRangeStartHour } if ($PSBoundParameters.ContainsKey('TimeRangeStartMinutes')) { $Object.TimeRangeStartMinutes = $TimeRangeStartMinutes } if ($PSBoundParameters.ContainsKey('Triggers')) { $Object.Triggers = $Triggers } return $Object } } |