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

.Outputs
NmePowershell.Models.HostPoolScriptedActionProfileUpdate

#>

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

        [Parameter()]
        [string]
        $Description,
        [Parameter()]
        [string]
        $Name,
        [Parameter()]
        [int]
        $OnHostCreateActiveDirectoryId,
        [Parameter()]
        [bool]
        $OnHostCreateEnabled,
        [Parameter()]
        [NmePowershell.Models.IScriptedActionOption[]]
        $OnHostCreateScriptedActions,
        [Parameter()]
        [int]
        $OnRemoveActiveDirectoryId,
        [Parameter()]
        [bool]
        $OnRemoveEnabled,
        [Parameter()]
        [NmePowershell.Models.IScriptedActionOption[]]
        $OnRemoveScriptedActions,
        [Parameter()]
        [int]
        $OnStartActiveDirectoryId,
        [Parameter()]
        [bool]
        $OnStartEnabled,
        [Parameter()]
        [NmePowershell.Models.IScriptedActionOption[]]
        $OnStartScriptedActions,
        [Parameter()]
        [int]
        $OnStopActiveDirectoryId,
        [Parameter()]
        [bool]
        $OnStopEnabled,
        [Parameter()]
        [NmePowershell.Models.IScriptedActionOption[]]
        $OnStopScriptedActions,
        [Parameter()]
        [int]
        $OnVMCreateActiveDirectoryId,
        [Parameter()]
        [bool]
        $OnVMCreateEnabled,
        [Parameter()]
        [NmePowershell.Models.IScriptedActionOption[]]
        $OnVMCreateScriptedActions
    )

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

        if ($PSBoundParameters.ContainsKey('Description')) {
            $Object.Description = $Description
        }
        if ($PSBoundParameters.ContainsKey('Name')) {
            $Object.Name = $Name
        }
        if ($PSBoundParameters.ContainsKey('OnHostCreateActiveDirectoryId')) {
            $Object.OnHostCreateActiveDirectoryId = $OnHostCreateActiveDirectoryId
        }
        if ($PSBoundParameters.ContainsKey('OnHostCreateEnabled')) {
            $Object.OnHostCreateEnabled = $OnHostCreateEnabled
        }
        if ($PSBoundParameters.ContainsKey('OnHostCreateScriptedActions')) {
            $Object.OnHostCreateScriptedActions = $OnHostCreateScriptedActions
        }
        if ($PSBoundParameters.ContainsKey('OnRemoveActiveDirectoryId')) {
            $Object.OnRemoveActiveDirectoryId = $OnRemoveActiveDirectoryId
        }
        if ($PSBoundParameters.ContainsKey('OnRemoveEnabled')) {
            $Object.OnRemoveEnabled = $OnRemoveEnabled
        }
        if ($PSBoundParameters.ContainsKey('OnRemoveScriptedActions')) {
            $Object.OnRemoveScriptedActions = $OnRemoveScriptedActions
        }
        if ($PSBoundParameters.ContainsKey('OnStartActiveDirectoryId')) {
            $Object.OnStartActiveDirectoryId = $OnStartActiveDirectoryId
        }
        if ($PSBoundParameters.ContainsKey('OnStartEnabled')) {
            $Object.OnStartEnabled = $OnStartEnabled
        }
        if ($PSBoundParameters.ContainsKey('OnStartScriptedActions')) {
            $Object.OnStartScriptedActions = $OnStartScriptedActions
        }
        if ($PSBoundParameters.ContainsKey('OnStopActiveDirectoryId')) {
            $Object.OnStopActiveDirectoryId = $OnStopActiveDirectoryId
        }
        if ($PSBoundParameters.ContainsKey('OnStopEnabled')) {
            $Object.OnStopEnabled = $OnStopEnabled
        }
        if ($PSBoundParameters.ContainsKey('OnStopScriptedActions')) {
            $Object.OnStopScriptedActions = $OnStopScriptedActions
        }
        if ($PSBoundParameters.ContainsKey('OnVMCreateActiveDirectoryId')) {
            $Object.OnVMCreateActiveDirectoryId = $OnVMCreateActiveDirectoryId
        }
        if ($PSBoundParameters.ContainsKey('OnVMCreateEnabled')) {
            $Object.OnVMCreateEnabled = $OnVMCreateEnabled
        }
        if ($PSBoundParameters.ContainsKey('OnVMCreateScriptedActions')) {
            $Object.OnVMCreateScriptedActions = $OnVMCreateScriptedActions
        }
        return $Object
    }
}