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

.Outputs
NmePowershell.Models.ImageFromLibraryCreateParams

#>

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

        [Parameter()]
        [int]
        $AdConfigId,
        [Parameter(Mandatory)]
        [NmePowershell.PSArgumentCompleterAttribute("Clone", "Source")]
        [string]
        $ApplicationsTarget,
        [Parameter()]
        [string]
        $Description,
        [Parameter()]
        [string]
        $DiskPerformanceTier,
        [Parameter(Mandatory)]
        [int]
        $DiskSize,
        [Parameter()]
        [bool]
        $EnableAppvClientService,
        [Parameter()]
        [bool]
        $EnableTimezoneRedirection,
        [Parameter()]
        [string]
        $GalleryImageGalleryId,
        [Parameter()]
        [bool]
        $GalleryImageHibernationSupported,
        [Parameter()]
        [NmePowershell.PSArgumentCompleterAttribute("Generalized", "Specialized")]
        [string]
        $GalleryImageOSState,
        [Parameter()]
        [int]
        $GalleryImageReplicaCount,
        [Parameter()]
        [NmePowershell.PSArgumentCompleterAttribute("None", "TrustedLaunch", "Confidential", "TrustedLaunchSupported", "ConfidentialSupported", "TrustedLaunchAndConfidentialSupported")]
        [string]
        $GalleryImageSecurityType,
        [Parameter()]
        [bool]
        $GalleryImageSetInactive,
        [Parameter()]
        [string[]]
        $GalleryImageTargetRegions,
        [Parameter()]
        [NmePowershell.PSArgumentCompleterAttribute("Major", "Minor", "Revision")]
        [string]
        $GalleryImageVersionIncrementType,
        [Parameter(Mandatory)]
        [string]
        $ImageIdName,
        [Parameter(Mandatory)]
        [string]
        $ImageIdResourceGroup,
        [Parameter(Mandatory)]
        [string]
        $ImageIdSubscriptionId,
        [Parameter()]
        [bool]
        $InstallCertificates,
        [Parameter()]
        [bool]
        $LocalAdminCredentialsDisableAccount,
        [Parameter()]
        [string]
        $LocalAdminCredentialsPassword,
        [Parameter()]
        [string]
        $LocalAdminCredentialsUserName,
        [Parameter(Mandatory)]
        [string]
        $NetworkId,
        [Parameter()]
        [bool]
        $NoImageObjectRequired,
        [Parameter(Mandatory)]
        [NmePowershell.PSArgumentCompleterAttribute("Clone", "Source")]
        [string]
        $ScriptedActionTarget,
        [Parameter(Mandatory)]
        [NmePowershell.Models.IScriptedActionOption[]]
        $ScriptedActions,
        [Parameter()]
        [bool]
        $SecurityProfileSecureBootEnabled,
        [Parameter()]
        [NmePowershell.PSArgumentCompleterAttribute("None", "TrustedLaunch", "Confidential")]
        [string]
        $SecurityProfileSecurityType,
        [Parameter()]
        [bool]
        $SecurityProfileVTpmEnabled,
        [Parameter()]
        [bool]
        $SkipRemoveProfiles,
        [Parameter(Mandatory)]
        [string]
        $SourceImageId,
        [Parameter(Mandatory)]
        [string]
        $StorageType,
        [Parameter(Mandatory)]
        [string]
        $Subnet,
        [Parameter(HelpMessage="Dictionary of <string>.")]
        [NmePowershell.Models.IImageFromLibraryCreateParamsTags]
        $Tags,
        [Parameter()]
        [bool]
        $UninstallFsLogix,
        [Parameter(Mandatory)]
        [string]
        $VMSize,
        [Parameter()]
        [string]
        $VMTimezone
    )

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

        if ($PSBoundParameters.ContainsKey('AdConfigId')) {
            $Object.AdConfigId = $AdConfigId
        }
        if ($PSBoundParameters.ContainsKey('ApplicationsTarget')) {
            $Object.ApplicationsTarget = $ApplicationsTarget
        }
        if ($PSBoundParameters.ContainsKey('Description')) {
            $Object.Description = $Description
        }
        if ($PSBoundParameters.ContainsKey('DiskPerformanceTier')) {
            $Object.DiskPerformanceTier = $DiskPerformanceTier
        }
        if ($PSBoundParameters.ContainsKey('DiskSize')) {
            $Object.DiskSize = $DiskSize
        }
        if ($PSBoundParameters.ContainsKey('EnableAppvClientService')) {
            $Object.EnableAppvClientService = $EnableAppvClientService
        }
        if ($PSBoundParameters.ContainsKey('EnableTimezoneRedirection')) {
            $Object.EnableTimezoneRedirection = $EnableTimezoneRedirection
        }
        if ($PSBoundParameters.ContainsKey('GalleryImageGalleryId')) {
            $Object.GalleryImageGalleryId = $GalleryImageGalleryId
        }
        if ($PSBoundParameters.ContainsKey('GalleryImageHibernationSupported')) {
            $Object.GalleryImageHibernationSupported = $GalleryImageHibernationSupported
        }
        if ($PSBoundParameters.ContainsKey('GalleryImageOSState')) {
            $Object.GalleryImageOSState = $GalleryImageOSState
        }
        if ($PSBoundParameters.ContainsKey('GalleryImageReplicaCount')) {
            $Object.GalleryImageReplicaCount = $GalleryImageReplicaCount
        }
        if ($PSBoundParameters.ContainsKey('GalleryImageSecurityType')) {
            $Object.GalleryImageSecurityType = $GalleryImageSecurityType
        }
        if ($PSBoundParameters.ContainsKey('GalleryImageSetInactive')) {
            $Object.GalleryImageSetInactive = $GalleryImageSetInactive
        }
        if ($PSBoundParameters.ContainsKey('GalleryImageTargetRegions')) {
            $Object.GalleryImageTargetRegions = $GalleryImageTargetRegions
        }
        if ($PSBoundParameters.ContainsKey('GalleryImageVersionIncrementType')) {
            $Object.GalleryImageVersionIncrementType = $GalleryImageVersionIncrementType
        }
        if ($PSBoundParameters.ContainsKey('ImageIdName')) {
            $Object.ImageIdName = $ImageIdName
        }
        if ($PSBoundParameters.ContainsKey('ImageIdResourceGroup')) {
            $Object.ImageIdResourceGroup = $ImageIdResourceGroup
        }
        if ($PSBoundParameters.ContainsKey('ImageIdSubscriptionId')) {
            $Object.ImageIdSubscriptionId = $ImageIdSubscriptionId
        }
        if ($PSBoundParameters.ContainsKey('InstallCertificates')) {
            $Object.InstallCertificates = $InstallCertificates
        }
        if ($PSBoundParameters.ContainsKey('LocalAdminCredentialsDisableAccount')) {
            $Object.LocalAdminCredentialsDisableAccount = $LocalAdminCredentialsDisableAccount
        }
        if ($PSBoundParameters.ContainsKey('LocalAdminCredentialsPassword')) {
            $Object.LocalAdminCredentialsPassword = $LocalAdminCredentialsPassword
        }
        if ($PSBoundParameters.ContainsKey('LocalAdminCredentialsUserName')) {
            $Object.LocalAdminCredentialsUserName = $LocalAdminCredentialsUserName
        }
        if ($PSBoundParameters.ContainsKey('NetworkId')) {
            $Object.NetworkId = $NetworkId
        }
        if ($PSBoundParameters.ContainsKey('NoImageObjectRequired')) {
            $Object.NoImageObjectRequired = $NoImageObjectRequired
        }
        if ($PSBoundParameters.ContainsKey('ScriptedActionTarget')) {
            $Object.ScriptedActionTarget = $ScriptedActionTarget
        }
        if ($PSBoundParameters.ContainsKey('ScriptedActions')) {
            $Object.ScriptedActions = $ScriptedActions
        }
        if ($PSBoundParameters.ContainsKey('SecurityProfileSecureBootEnabled')) {
            $Object.SecurityProfileSecureBootEnabled = $SecurityProfileSecureBootEnabled
        }
        if ($PSBoundParameters.ContainsKey('SecurityProfileSecurityType')) {
            $Object.SecurityProfileSecurityType = $SecurityProfileSecurityType
        }
        if ($PSBoundParameters.ContainsKey('SecurityProfileVTpmEnabled')) {
            $Object.SecurityProfileVTpmEnabled = $SecurityProfileVTpmEnabled
        }
        if ($PSBoundParameters.ContainsKey('SkipRemoveProfiles')) {
            $Object.SkipRemoveProfiles = $SkipRemoveProfiles
        }
        if ($PSBoundParameters.ContainsKey('SourceImageId')) {
            $Object.SourceImageId = $SourceImageId
        }
        if ($PSBoundParameters.ContainsKey('StorageType')) {
            $Object.StorageType = $StorageType
        }
        if ($PSBoundParameters.ContainsKey('Subnet')) {
            $Object.Subnet = $Subnet
        }
        if ($PSBoundParameters.ContainsKey('Tags')) {
            $Object.Tags = $Tags
        }
        if ($PSBoundParameters.ContainsKey('UninstallFsLogix')) {
            $Object.UninstallFsLogix = $UninstallFsLogix
        }
        if ($PSBoundParameters.ContainsKey('VMSize')) {
            $Object.VMSize = $VMSize
        }
        if ($PSBoundParameters.ContainsKey('VMTimezone')) {
            $Object.VMTimezone = $VMTimezone
        }
        return $Object
    }
}