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

.Outputs
NmePowershell.Models.NotificationConditionCreate

#>

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

        [Parameter(Mandatory)]
        [string[]]
        $ExclusionKeywords,
        [Parameter(Mandatory)]
        [string]
        $Name,
        [Parameter(Mandatory)]
        [NmePowershell.Models.INotificationConditionRunByUser[]]
        $RunByUsers,
        [Parameter(Mandatory)]
        [NmePowershell.PSArgumentCompleterAttribute("Pending", "Running", "Completed", "Failed", "Cancelled")]
        [string[]]
        $Statuses,
        [Parameter(Mandatory)]
        [NmePowershell.Models.INotificationConditionTarget[]]
        $Targets,
        [Parameter(Mandatory)]
        [string[]]
        $Tasks
    )

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

        if ($PSBoundParameters.ContainsKey('ExclusionKeywords')) {
            $Object.ExclusionKeywords = $ExclusionKeywords
        }
        if ($PSBoundParameters.ContainsKey('Name')) {
            $Object.Name = $Name
        }
        if ($PSBoundParameters.ContainsKey('RunByUsers')) {
            $Object.RunByUsers = $RunByUsers
        }
        if ($PSBoundParameters.ContainsKey('Statuses')) {
            $Object.Statuses = $Statuses
        }
        if ($PSBoundParameters.ContainsKey('Targets')) {
            $Object.Targets = $Targets
        }
        if ($PSBoundParameters.ContainsKey('Tasks')) {
            $Object.Tasks = $Tasks
        }
        return $Object
    }
}