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

.Outputs
NmePowershell.Models.ScriptedActionCreate

#>

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

        [Parameter()]
        [string]
        $Description,
        [Parameter(Mandatory)]
        [NmePowershell.PSArgumentCompleterAttribute("CustomScript", "AzureAutomation")]
        [string]
        $ExecutionEnvironment,
        [Parameter(Mandatory)]
        [NmePowershell.PSArgumentCompleterAttribute("Combined", "Individual", "IndividualWithRestart")]
        [string]
        $ExecutionMode,
        [Parameter()]
        [int]
        $ExecutionTimeout,
        [Parameter(Mandatory)]
        [string]
        $Name,
        [Parameter(Mandatory)]
        [string]
        $Script,
        [Parameter()]
        [string[]]
        $Tags
    )

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

        if ($PSBoundParameters.ContainsKey('Description')) {
            $Object.Description = $Description
        }
        if ($PSBoundParameters.ContainsKey('ExecutionEnvironment')) {
            $Object.ExecutionEnvironment = $ExecutionEnvironment
        }
        if ($PSBoundParameters.ContainsKey('ExecutionMode')) {
            $Object.ExecutionMode = $ExecutionMode
        }
        if ($PSBoundParameters.ContainsKey('ExecutionTimeout')) {
            $Object.ExecutionTimeout = $ExecutionTimeout
        }
        if ($PSBoundParameters.ContainsKey('Name')) {
            $Object.Name = $Name
        }
        if ($PSBoundParameters.ContainsKey('Script')) {
            $Object.Script = $Script
        }
        if ($PSBoundParameters.ContainsKey('Tags')) {
            $Object.Tags = $Tags
        }
        return $Object
    }
}