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

.Outputs
NmePowershell.Models.AdConfigPropertiesWithPassword

#>

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

        [Parameter(Mandatory)]
        [NmePowershell.PSArgumentCompleterAttribute("AD", "AzureAD", "AzureADDS")]
        [string]
        $AdIdentityType,
        [Parameter()]
        [string]
        $Domain,
        [Parameter()]
        [bool]
        $EnrollWithIntune,
        [Parameter()]
        [string]
        $FriendlyName,
        [Parameter()]
        [string]
        $OrganizationUnit,
        [Parameter()]
        [string]
        $Password,
        [Parameter()]
        [string]
        $Username
    )

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

        if ($PSBoundParameters.ContainsKey('AdIdentityType')) {
            $Object.AdIdentityType = $AdIdentityType
        }
        if ($PSBoundParameters.ContainsKey('Domain')) {
            $Object.Domain = $Domain
        }
        if ($PSBoundParameters.ContainsKey('EnrollWithIntune')) {
            $Object.EnrollWithIntune = $EnrollWithIntune
        }
        if ($PSBoundParameters.ContainsKey('FriendlyName')) {
            $Object.FriendlyName = $FriendlyName
        }
        if ($PSBoundParameters.ContainsKey('OrganizationUnit')) {
            $Object.OrganizationUnit = $OrganizationUnit
        }
        if ($PSBoundParameters.ContainsKey('Password')) {
            $Object.Password = $Password
        }
        if ($PSBoundParameters.ContainsKey('Username')) {
            $Object.Username = $Username
        }
        return $Object
    }
}