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

.Outputs
NmePowershell.Models.ScriptedActionOption

#>

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

        [Parameter(Mandatory, HelpMessage="Dictionary of <components·3b70dp·schemas·scriptedactionoption·properties·groupparams·additionalproperties>.")]
        [NmePowershell.Models.IScriptedActionOptionGroupParams]
        $GroupParams,
        [Parameter(Mandatory)]
        [int]
        $Id,
        [Parameter(Mandatory, HelpMessage="Dictionary of <ScriptedActionParamValue>.")]
        [NmePowershell.Models.IScriptedActionOptionParams]
        $Params,
        [Parameter(Mandatory)]
        [NmePowershell.PSArgumentCompleterAttribute("Action", "Group")]
        [string]
        $Type
    )

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

        if ($PSBoundParameters.ContainsKey('GroupParams')) {
            $Object.GroupParams = $GroupParams
        }
        if ($PSBoundParameters.ContainsKey('Id')) {
            $Object.Id = $Id
        }
        if ($PSBoundParameters.ContainsKey('Params')) {
            $Object.Params = $Params
        }
        if ($PSBoundParameters.ContainsKey('Type')) {
            $Object.Type = $Type
        }
        return $Object
    }
}