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

.Outputs
NmePowershell.Models.LinkedSubscriptionCreate

#>

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

        [Parameter(Mandatory)]
        [bool]
        $AvdEnabled,
        [Parameter(Mandatory)]
        [bool]
        $CostManagementEnabled,
        [Parameter()]
        [string]
        $ServicePrincipalAppId,
        [Parameter()]
        [string]
        $ServicePrincipalAppName,
        [Parameter()]
        [string]
        $ServicePrincipalAppSecret,
        [Parameter()]
        [NmePowershell.PSArgumentCompleterAttribute("AzureCloud", "AzureUSGovernment", "AzureChina")]
        [string]
        $ServicePrincipalAzureType,
        [Parameter(Mandatory)]
        [string]
        $SubscriptionId,
        [Parameter(Mandatory)]
        [string]
        $TenantId
    )

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

        if ($PSBoundParameters.ContainsKey('AvdEnabled')) {
            $Object.AvdEnabled = $AvdEnabled
        }
        if ($PSBoundParameters.ContainsKey('CostManagementEnabled')) {
            $Object.CostManagementEnabled = $CostManagementEnabled
        }
        if ($PSBoundParameters.ContainsKey('ServicePrincipalAppId')) {
            $Object.ServicePrincipalAppId = $ServicePrincipalAppId
        }
        if ($PSBoundParameters.ContainsKey('ServicePrincipalAppName')) {
            $Object.ServicePrincipalAppName = $ServicePrincipalAppName
        }
        if ($PSBoundParameters.ContainsKey('ServicePrincipalAppSecret')) {
            $Object.ServicePrincipalAppSecret = $ServicePrincipalAppSecret
        }
        if ($PSBoundParameters.ContainsKey('ServicePrincipalAzureType')) {
            $Object.ServicePrincipalAzureType = $ServicePrincipalAzureType
        }
        if ($PSBoundParameters.ContainsKey('SubscriptionId')) {
            $Object.SubscriptionId = $SubscriptionId
        }
        if ($PSBoundParameters.ContainsKey('TenantId')) {
            $Object.TenantId = $TenantId
        }
        return $Object
    }
}