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

.Outputs
NmePowershell.Models.AnyAppScopeCreate

#>

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

        [Parameter()]
        [string[]]
        $DeviceGroups,
        [Parameter()]
        [string[]]
        $HostPools,
        [Parameter()]
        [string[]]
        $Hosts,
        [Parameter()]
        [string]
        $TenantId,
        [Parameter(Mandatory)]
        [NmePowershell.PSArgumentCompleterAttribute("AVD_PersonalPools", "AVD_PooledPools", "AVD_ExactHosts", "Intune", "AVD_Workspaces")]
        [string]
        $Type,
        [Parameter()]
        [NmePowershell.Models.IAdObjectCreate[]]
        $Users,
        [Parameter()]
        [string[]]
        $Workspaces
    )

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

        if ($PSBoundParameters.ContainsKey('DeviceGroups')) {
            $Object.DeviceGroups = $DeviceGroups
        }
        if ($PSBoundParameters.ContainsKey('HostPools')) {
            $Object.HostPools = $HostPools
        }
        if ($PSBoundParameters.ContainsKey('Hosts')) {
            $Object.Hosts = $Hosts
        }
        if ($PSBoundParameters.ContainsKey('TenantId')) {
            $Object.TenantId = $TenantId
        }
        if ($PSBoundParameters.ContainsKey('Type')) {
            $Object.Type = $Type
        }
        if ($PSBoundParameters.ContainsKey('Users')) {
            $Object.Users = $Users
        }
        if ($PSBoundParameters.ContainsKey('Workspaces')) {
            $Object.Workspaces = $Workspaces
        }
        return $Object
    }
}