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

.Outputs
NmePowershell.Models.ImageFromLibraryCreate

#>

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

        [Parameter()]
        [bool]
        $FailurePolicyCleanup,
        [Parameter()]
        [bool]
        $FailurePolicyRestart,
        [Parameter(Mandatory)]
        [NmePowershell.Models.IImageFromLibraryCreateParams]
        $JobPayload
    )

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

        if ($PSBoundParameters.ContainsKey('FailurePolicyCleanup')) {
            $Object.FailurePolicyCleanup = $FailurePolicyCleanup
        }
        if ($PSBoundParameters.ContainsKey('FailurePolicyRestart')) {
            $Object.FailurePolicyRestart = $FailurePolicyRestart
        }
        if ($PSBoundParameters.ContainsKey('JobPayload')) {
            $Object.JobPayload = $JobPayload
        }
        return $Object
    }
}