VaporShell.IoTEvents.psm1

# PSM1 Contents
function Format-Json {
    [CmdletBinding()]
    Param (
        [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
        [String]
        $Json
    )
    Begin {
        $cleaner = {
            param([String]$Line)
            Process{
                [Regex]::Replace(
                    $Line,
                    "\\u(?<Value>[a-zA-Z0-9]{4})",
                    {
                        param($m)([char]([int]::Parse(
                            $m.Groups['Value'].Value,
                            [System.Globalization.NumberStyles]::HexNumber
                        ))).ToString()
                    }
                )
            }
        }
    }
    Process {
        if ($PSVersionTable.PSVersion.Major -lt 6) {
            try {
                $indent = 0;
                $res = $Json -split '\n' | ForEach-Object {
                    if ($_ -match '[\}\]]') {
                        # This line contains ] or }, decrement the indentation level
                        $indent--
                    }
                    $line = (' ' * $indent * 2) + $_.TrimStart().Replace(': ', ': ')
                    if ($_ -match '[\{\[]') {
                        # This line contains [ or {, increment the indentation level
                        $indent++
                    }
                    $cleaner.Invoke($line)
                }
                $res -join "`n"
            }
            catch {
                ($Json -split '\n' | ForEach-Object {$cleaner.Invoke($_)}) -join "`n"
            }
        }
        else {
            ($Json -split '\n' | ForEach-Object {$cleaner.Invoke($_)}) -join "`n"
        }
    }
}

function Get-TrueCount {
    Param
    (
        [parameter(Mandatory = $false,Position = 0,ValueFromPipeline = $true)]
        $Array
    )
    Process {
        if ($array) {
            if ($array.Count) {
                $count = $array.Count
            }
            else {
                $count = 1
            }
        }
        else {
            $count = 0
        }
    }
    End {
        return $count
    }
}

function New-VSError {
    <#
    .SYNOPSIS
    Error generator function to use in tandem with $PSCmdlet.ThrowTerminatingError()
    
    .PARAMETER Result
    Allows input of an error from AWS SDK, resulting in the Exception message being parsed out.
    
    .PARAMETER String
    Used to create basic String message errors in the same wrapper
    #>

    [cmdletbinding(DefaultParameterSetName="Result")]
    param(
        [parameter(Position=0,ParameterSetName="Result")]
        $Result,
        [parameter(Position=0,ParameterSetName="String")]
        $String
    )
    switch ($PSCmdlet.ParameterSetName) {
        Result { $Exception = "$($result.Exception.InnerException.Message)" }
        String { $Exception = "$String" }
    }
    $e = New-Object "System.Exception" $Exception
    $errorRecord = New-Object 'System.Management.Automation.ErrorRecord' $e, $null, ([System.Management.Automation.ErrorCategory]::InvalidOperation), $null
    return $errorRecord
}

function ResolveS3Endpoint {
    <#
    .SYNOPSIS
    Resolves the S3 endpoint most appropriate for each region.
    #>

    Param
    (
      [parameter(Mandatory=$true,Position=0)]
      [ValidateSet("eu-west-2","ap-south-1","us-east-2","sa-east-1","us-west-1","us-west-2","eu-west-1","ap-southeast-2","ca-central-1","ap-northeast-2","us-east-1","eu-central-1","ap-southeast-1","ap-northeast-1")]
      [String]
      $Region
    )
    $endpointMap = @{
        "us-east-2" = "s3.us-east-2.amazonaws.com"
        "us-east-1" = "s3.amazonaws.com"
        "us-west-1" = "s3-us-west-1.amazonaws.com"
        "us-west-2" = "s3-us-west-2.amazonaws.com"
        "ca-central-1" = "s3.ca-central-1.amazonaws.com"
        "ap-south-1" = "s3.ap-south-1.amazonaws.com"
        "ap-northeast-2" = "s3.ap-northeast-2.amazonaws.com"
        "ap-southeast-1" = "s3-ap-southeast-1.amazonaws.com"
        "ap-southeast-2" = "s3-ap-southeast-2.amazonaws.com"
        "ap-northeast-1" = "s3-ap-northeast-1.amazonaws.com"
        "eu-central-1" = "s3.eu-central-1.amazonaws.com"
        "eu-west-1" = "s3-eu-west-1.amazonaws.com"
        "eu-west-2" = "s3.eu-west-2.amazonaws.com"
        "sa-east-1" = "s3-sa-east-1.amazonaws.com"
    }
    return $endpointMap[$Region]
}

function Add-VSIoTEventsDetectorModelAction {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.Action resource property to the template. An action to be performed when the condition is TRUE.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.Action resource property to the template.
An action to be performed when the condition is TRUE.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html

    .PARAMETER IotEvents
        Sends an IoT Events input, passing in information about the detector model instance and the event which triggered the action.

        Type: IotEvents
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-iotevents
        UpdateType: Mutable

    .PARAMETER Firehose
        Sends information about the detector model instance and the event which triggered the action to a Kinesis Data Firehose delivery stream.

        Type: Firehose
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-firehose
        UpdateType: Mutable

    .PARAMETER IotTopicPublish
        Publishes an MQTT message with the given topic to the AWS IoT message broker.

        Type: IotTopicPublish
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-iottopicpublish
        UpdateType: Mutable

    .PARAMETER DynamoDB
        *Update requires*: No interruption: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt

        Type: DynamoDB
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-dynamodb
        UpdateType: Mutable

    .PARAMETER DynamoDBv2
        *Update requires*: No interruption: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt

        Type: DynamoDBv2
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-dynamodbv2
        UpdateType: Mutable

    .PARAMETER IotSiteWise
        *Update requires*: No interruption: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt

        Type: IotSiteWise
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-iotsitewise
        UpdateType: Mutable

    .PARAMETER ResetTimer
        Information needed to reset the timer.

        Type: ResetTimer
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-resettimer
        UpdateType: Mutable

    .PARAMETER Sqs
        Sends information about the detector model instance and the event which triggered the action to an Amazon SQS queue.

        Type: Sqs
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-sqs
        UpdateType: Mutable

    .PARAMETER Sns
        Sends an Amazon SNS message.

        Type: Sns
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-sns
        UpdateType: Mutable

    .PARAMETER SetTimer
        Information needed to set the timer.

        Type: SetTimer
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-settimer
        UpdateType: Mutable

    .PARAMETER ClearTimer
        Information needed to clear the timer.

        Type: ClearTimer
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-cleartimer
        UpdateType: Mutable

    .PARAMETER Lambda
        Calls an AWS Lambda function, passing in information about the detector model instance and the event which triggered the action.

        Type: Lambda
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-lambda
        UpdateType: Mutable

    .PARAMETER SetVariable
        Sets a variable to a specified value.

        Type: SetVariable
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-action.html#cfn-iotevents-detectormodel-action-setvariable
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelAction])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        $IotEvents,
        [parameter(Mandatory = $false)]
        $Firehose,
        [parameter(Mandatory = $false)]
        $IotTopicPublish,
        [parameter(Mandatory = $false)]
        $DynamoDB,
        [parameter(Mandatory = $false)]
        $DynamoDBv2,
        [parameter(Mandatory = $false)]
        $IotSiteWise,
        [parameter(Mandatory = $false)]
        $ResetTimer,
        [parameter(Mandatory = $false)]
        $Sqs,
        [parameter(Mandatory = $false)]
        $Sns,
        [parameter(Mandatory = $false)]
        $SetTimer,
        [parameter(Mandatory = $false)]
        $ClearTimer,
        [parameter(Mandatory = $false)]
        $Lambda,
        [parameter(Mandatory = $false)]
        $SetVariable
    )
    Process {
        $obj = [IoTEventsDetectorModelAction]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelAction'

function Add-VSIoTEventsDetectorModelAssetPropertyTimestamp {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.AssetPropertyTimestamp resource property to the template.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.AssetPropertyTimestamp resource property to the template.


    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertytimestamp.html

    .PARAMETER TimeInSeconds
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertytimestamp.html#cfn-iotevents-detectormodel-assetpropertytimestamp-timeinseconds
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER OffsetInNanos
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertytimestamp.html#cfn-iotevents-detectormodel-assetpropertytimestamp-offsetinnanos
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelAssetPropertyTimestamp])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $TimeInSeconds,
        [parameter(Mandatory = $false)]
        [object]
        $OffsetInNanos
    )
    Process {
        $obj = [IoTEventsDetectorModelAssetPropertyTimestamp]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelAssetPropertyTimestamp'

function Add-VSIoTEventsDetectorModelAssetPropertyValue {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.AssetPropertyValue resource property to the template.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.AssetPropertyValue resource property to the template.


    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertyvalue.html

    .PARAMETER Quality
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertyvalue.html#cfn-iotevents-detectormodel-assetpropertyvalue-quality
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Value
        Type: AssetPropertyVariant
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertyvalue.html#cfn-iotevents-detectormodel-assetpropertyvalue-value
        UpdateType: Mutable

    .PARAMETER Timestamp
        Type: AssetPropertyTimestamp
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertyvalue.html#cfn-iotevents-detectormodel-assetpropertyvalue-timestamp
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelAssetPropertyValue])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $Quality,
        [parameter(Mandatory = $false)]
        $Value,
        [parameter(Mandatory = $false)]
        $Timestamp
    )
    Process {
        $obj = [IoTEventsDetectorModelAssetPropertyValue]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelAssetPropertyValue'

function Add-VSIoTEventsDetectorModelAssetPropertyVariant {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.AssetPropertyVariant resource property to the template.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.AssetPropertyVariant resource property to the template.


    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertyvariant.html

    .PARAMETER DoubleValue
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertyvariant.html#cfn-iotevents-detectormodel-assetpropertyvariant-doublevalue
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER IntegerValue
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertyvariant.html#cfn-iotevents-detectormodel-assetpropertyvariant-integervalue
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER BooleanValue
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertyvariant.html#cfn-iotevents-detectormodel-assetpropertyvariant-booleanvalue
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER StringValue
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-assetpropertyvariant.html#cfn-iotevents-detectormodel-assetpropertyvariant-stringvalue
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelAssetPropertyVariant])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $DoubleValue,
        [parameter(Mandatory = $false)]
        [object]
        $IntegerValue,
        [parameter(Mandatory = $false)]
        [object]
        $BooleanValue,
        [parameter(Mandatory = $false)]
        [object]
        $StringValue
    )
    Process {
        $obj = [IoTEventsDetectorModelAssetPropertyVariant]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelAssetPropertyVariant'

function Add-VSIoTEventsDetectorModelClearTimer {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.ClearTimer resource property to the template. Information needed to clear the timer.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.ClearTimer resource property to the template.
Information needed to clear the timer.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-cleartimer.html

    .PARAMETER TimerName
        The name of the timer.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-cleartimer.html#cfn-iotevents-detectormodel-cleartimer-timername
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelClearTimer])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $TimerName
    )
    Process {
        $obj = [IoTEventsDetectorModelClearTimer]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelClearTimer'

function Add-VSIoTEventsDetectorModelDetectorModelDefinition {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.DetectorModelDefinition resource property to the template. Information that defines how a detector operates.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.DetectorModelDefinition resource property to the template.
Information that defines how a detector operates.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-detectormodeldefinition.html

    .PARAMETER States
        Information about the states of the detector.

        Type: List
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-detectormodeldefinition.html#cfn-iotevents-detectormodel-detectormodeldefinition-states
        ItemType: State
        UpdateType: Mutable

    .PARAMETER InitialStateName
        The state that is entered at the creation of each detector instance.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-detectormodeldefinition.html#cfn-iotevents-detectormodel-detectormodeldefinition-initialstatename
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelDetectorModelDefinition])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $States,
        [parameter(Mandatory = $false)]
        [object]
        $InitialStateName
    )
    Process {
        $obj = [IoTEventsDetectorModelDetectorModelDefinition]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelDetectorModelDefinition'

function Add-VSIoTEventsDetectorModelDynamoDB {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.DynamoDB resource property to the template.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.DynamoDB resource property to the template.


    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html

    .PARAMETER TableName
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html#cfn-iotevents-detectormodel-dynamodb-tablename
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER PayloadField
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html#cfn-iotevents-detectormodel-dynamodb-payloadfield
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER RangeKeyField
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html#cfn-iotevents-detectormodel-dynamodb-rangekeyfield
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER HashKeyField
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html#cfn-iotevents-detectormodel-dynamodb-hashkeyfield
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER RangeKeyValue
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html#cfn-iotevents-detectormodel-dynamodb-rangekeyvalue
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER RangeKeyType
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html#cfn-iotevents-detectormodel-dynamodb-rangekeytype
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER HashKeyType
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html#cfn-iotevents-detectormodel-dynamodb-hashkeytype
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER HashKeyValue
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html#cfn-iotevents-detectormodel-dynamodb-hashkeyvalue
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Payload
        Type: Payload
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html#cfn-iotevents-detectormodel-dynamodb-payload
        UpdateType: Mutable

    .PARAMETER Operation
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodb.html#cfn-iotevents-detectormodel-dynamodb-operation
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelDynamoDB])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $TableName,
        [parameter(Mandatory = $false)]
        [object]
        $PayloadField,
        [parameter(Mandatory = $false)]
        [object]
        $RangeKeyField,
        [parameter(Mandatory = $false)]
        [object]
        $HashKeyField,
        [parameter(Mandatory = $false)]
        [object]
        $RangeKeyValue,
        [parameter(Mandatory = $false)]
        [object]
        $RangeKeyType,
        [parameter(Mandatory = $false)]
        [object]
        $HashKeyType,
        [parameter(Mandatory = $false)]
        [object]
        $HashKeyValue,
        [parameter(Mandatory = $false)]
        $Payload,
        [parameter(Mandatory = $false)]
        [object]
        $Operation
    )
    Process {
        $obj = [IoTEventsDetectorModelDynamoDB]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelDynamoDB'

function Add-VSIoTEventsDetectorModelDynamoDBv2 {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.DynamoDBv2 resource property to the template.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.DynamoDBv2 resource property to the template.


    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodbv2.html

    .PARAMETER TableName
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodbv2.html#cfn-iotevents-detectormodel-dynamodbv2-tablename
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Payload
        Type: Payload
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-dynamodbv2.html#cfn-iotevents-detectormodel-dynamodbv2-payload
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelDynamoDBv2])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $TableName,
        [parameter(Mandatory = $false)]
        $Payload
    )
    Process {
        $obj = [IoTEventsDetectorModelDynamoDBv2]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelDynamoDBv2'

function Add-VSIoTEventsDetectorModelEvent {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.Event resource property to the template. Specifies the actions to be performed when the condition evaluates to TRUE.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.Event resource property to the template.
Specifies the actions to be performed when the condition evaluates to TRUE.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-event.html

    .PARAMETER Condition
        Optional. The Boolean expression that, when TRUE, causes the actions to be performed. If not present, the actions are performed =TRUE. If the expression result is not a Boolean value, the actions are not performed =FALSE.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-event.html#cfn-iotevents-detectormodel-event-condition
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Actions
        The actions to be performed.

        Type: List
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-event.html#cfn-iotevents-detectormodel-event-actions
        ItemType: Action
        UpdateType: Mutable

    .PARAMETER EventName
        The name of the event.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-event.html#cfn-iotevents-detectormodel-event-eventname
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelEvent])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $Condition,
        [parameter(Mandatory = $false)]
        [object]
        $Actions,
        [parameter(Mandatory = $false)]
        [object]
        $EventName
    )
    Process {
        $obj = [IoTEventsDetectorModelEvent]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelEvent'

function Add-VSIoTEventsDetectorModelFirehose {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.Firehose resource property to the template. Sends information about the detector model instance and the event which triggered the action to a Kinesis Data Firehose delivery stream.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.Firehose resource property to the template.
Sends information about the detector model instance and the event which triggered the action to a Kinesis Data Firehose delivery stream.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-firehose.html

    .PARAMETER DeliveryStreamName
        The name of the Kinesis Data Firehose delivery stream where the data is written.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-firehose.html#cfn-iotevents-detectormodel-firehose-deliverystreamname
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Payload
        *Update requires*: No interruption: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt

        Type: Payload
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-firehose.html#cfn-iotevents-detectormodel-firehose-payload
        UpdateType: Mutable

    .PARAMETER Separator
        A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' newline, 't' tab, 'rn' Windows newline, ',' comma.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-firehose.html#cfn-iotevents-detectormodel-firehose-separator
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelFirehose])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $DeliveryStreamName,
        [parameter(Mandatory = $false)]
        $Payload,
        [parameter(Mandatory = $false)]
        [object]
        $Separator
    )
    Process {
        $obj = [IoTEventsDetectorModelFirehose]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelFirehose'

function Add-VSIoTEventsDetectorModelIotEvents {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.IotEvents resource property to the template. Sends an IoT Events input, passing in information about the detector model instance and the event which triggered the action.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.IotEvents resource property to the template.
Sends an IoT Events input, passing in information about the detector model instance and the event which triggered the action.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iotevents.html

    .PARAMETER InputName
        The name of the AWS IoT Events input where the data is sent.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iotevents.html#cfn-iotevents-detectormodel-iotevents-inputname
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Payload
        *Update requires*: No interruption: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt

        Type: Payload
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iotevents.html#cfn-iotevents-detectormodel-iotevents-payload
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelIotEvents])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $InputName,
        [parameter(Mandatory = $false)]
        $Payload
    )
    Process {
        $obj = [IoTEventsDetectorModelIotEvents]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelIotEvents'

function Add-VSIoTEventsDetectorModelIotSiteWise {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.IotSiteWise resource property to the template.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.IotSiteWise resource property to the template.


    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iotsitewise.html

    .PARAMETER EntryId
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iotsitewise.html#cfn-iotevents-detectormodel-iotsitewise-entryid
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER PropertyAlias
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iotsitewise.html#cfn-iotevents-detectormodel-iotsitewise-propertyalias
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER PropertyValue
        Type: AssetPropertyValue
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iotsitewise.html#cfn-iotevents-detectormodel-iotsitewise-propertyvalue
        UpdateType: Mutable

    .PARAMETER AssetId
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iotsitewise.html#cfn-iotevents-detectormodel-iotsitewise-assetid
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER PropertyId
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iotsitewise.html#cfn-iotevents-detectormodel-iotsitewise-propertyid
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelIotSiteWise])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $EntryId,
        [parameter(Mandatory = $false)]
        [object]
        $PropertyAlias,
        [parameter(Mandatory = $false)]
        $PropertyValue,
        [parameter(Mandatory = $false)]
        [object]
        $AssetId,
        [parameter(Mandatory = $false)]
        [object]
        $PropertyId
    )
    Process {
        $obj = [IoTEventsDetectorModelIotSiteWise]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelIotSiteWise'

function Add-VSIoTEventsDetectorModelIotTopicPublish {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.IotTopicPublish resource property to the template. Sends information about the detector model instance and the event which triggered the action in an MQTT message with the given topic to the AWS IoT message broker.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.IotTopicPublish resource property to the template.
Sends information about the detector model instance and the event which triggered the action in an MQTT message with the given topic to the AWS IoT message broker.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iottopicpublish.html

    .PARAMETER MqttTopic
        The MQTT topic of the message.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iottopicpublish.html#cfn-iotevents-detectormodel-iottopicpublish-mqtttopic
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Payload
        *Update requires*: No interruption: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt

        Type: Payload
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-iottopicpublish.html#cfn-iotevents-detectormodel-iottopicpublish-payload
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelIotTopicPublish])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $MqttTopic,
        [parameter(Mandatory = $false)]
        $Payload
    )
    Process {
        $obj = [IoTEventsDetectorModelIotTopicPublish]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelIotTopicPublish'

function Add-VSIoTEventsDetectorModelLambda {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.Lambda resource property to the template. Calls an AWS Lambda function, passing in information about the detector model instance and the event which triggered the action.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.Lambda resource property to the template.
Calls an AWS Lambda function, passing in information about the detector model instance and the event which triggered the action.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-lambda.html

    .PARAMETER FunctionArn
        The ARN of the AWS Lambda function which is executed.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-lambda.html#cfn-iotevents-detectormodel-lambda-functionarn
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Payload
        *Update requires*: No interruption: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt

        Type: Payload
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-lambda.html#cfn-iotevents-detectormodel-lambda-payload
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelLambda])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $FunctionArn,
        [parameter(Mandatory = $false)]
        $Payload
    )
    Process {
        $obj = [IoTEventsDetectorModelLambda]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelLambda'

function Add-VSIoTEventsDetectorModelOnEnter {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.OnEnter resource property to the template. When entering this state, perform these "actions" if the "condition" is TRUE.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.OnEnter resource property to the template.
When entering this state, perform these "actions" if the "condition" is TRUE.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-onenter.html

    .PARAMETER Events
        Specifies the actions that are performed when the state is entered and the "condition" is TRUE.

        Type: List
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-onenter.html#cfn-iotevents-detectormodel-onenter-events
        ItemType: Event
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelOnEnter])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $Events
    )
    Process {
        $obj = [IoTEventsDetectorModelOnEnter]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelOnEnter'

function Add-VSIoTEventsDetectorModelOnExit {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.OnExit resource property to the template. When exiting this state, perform these "actions" if the "condition" is TRUE.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.OnExit resource property to the template.
When exiting this state, perform these "actions" if the "condition" is TRUE.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-onexit.html

    .PARAMETER Events
        Specifies the actions that are performed when the state is exited and the "condition" is TRUE.

        Type: List
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-onexit.html#cfn-iotevents-detectormodel-onexit-events
        ItemType: Event
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelOnExit])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $Events
    )
    Process {
        $obj = [IoTEventsDetectorModelOnExit]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelOnExit'

function Add-VSIoTEventsDetectorModelOnInput {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.OnInput resource property to the template. When an input is received and the "condition" is TRUE, perform the specified "actions".

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.OnInput resource property to the template.
When an input is received and the "condition" is TRUE, perform the specified "actions".

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-oninput.html

    .PARAMETER Events
        Specifies the actions that are performed when an input is received and the "condition" is TRUE.

        Type: List
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-oninput.html#cfn-iotevents-detectormodel-oninput-events
        ItemType: Event
        UpdateType: Mutable

    .PARAMETER TransitionEvents
        Specifies the actions performed, and the next state entered, when an input is received and a "condition" evaluates to TRUE.

        Type: List
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-oninput.html#cfn-iotevents-detectormodel-oninput-transitionevents
        ItemType: TransitionEvent
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelOnInput])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $Events,
        [parameter(Mandatory = $false)]
        [object]
        $TransitionEvents
    )
    Process {
        $obj = [IoTEventsDetectorModelOnInput]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelOnInput'

function Add-VSIoTEventsDetectorModelPayload {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.Payload resource property to the template.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.Payload resource property to the template.


    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-payload.html

    .PARAMETER ContentExpression
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-payload.html#cfn-iotevents-detectormodel-payload-contentexpression
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Type
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-payload.html#cfn-iotevents-detectormodel-payload-type
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelPayload])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $ContentExpression,
        [parameter(Mandatory = $false)]
        [object]
        $Type
    )
    Process {
        $obj = [IoTEventsDetectorModelPayload]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelPayload'

function Add-VSIoTEventsDetectorModelResetTimer {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.ResetTimer resource property to the template. Information needed to reset the timer.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.ResetTimer resource property to the template.
Information needed to reset the timer.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-resettimer.html

    .PARAMETER TimerName
        The name of the timer.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-resettimer.html#cfn-iotevents-detectormodel-resettimer-timername
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelResetTimer])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $TimerName
    )
    Process {
        $obj = [IoTEventsDetectorModelResetTimer]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelResetTimer'

function Add-VSIoTEventsDetectorModelSetTimer {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.SetTimer resource property to the template. Information needed to set the timer.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.SetTimer resource property to the template.
Information needed to set the timer.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-settimer.html

    .PARAMETER Seconds
        The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-settimer.html#cfn-iotevents-detectormodel-settimer-seconds
        PrimitiveType: Integer
        UpdateType: Mutable

    .PARAMETER TimerName
        The name of the timer.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-settimer.html#cfn-iotevents-detectormodel-settimer-timername
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER DurationExpression
        Not currently supported by AWS CloudFormation.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-settimer.html#cfn-iotevents-detectormodel-settimer-durationexpression
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelSetTimer])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $Seconds,
        [parameter(Mandatory = $false)]
        [object]
        $TimerName,
        [parameter(Mandatory = $false)]
        [object]
        $DurationExpression
    )
    Process {
        $obj = [IoTEventsDetectorModelSetTimer]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelSetTimer'

function Add-VSIoTEventsDetectorModelSetVariable {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.SetVariable resource property to the template. Sets a variable to a specified value.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.SetVariable resource property to the template.
Sets a variable to a specified value.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-setvariable.html

    .PARAMETER VariableName
        The name of the variable.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-setvariable.html#cfn-iotevents-detectormodel-setvariable-variablename
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Value
        The new value of the variable.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-setvariable.html#cfn-iotevents-detectormodel-setvariable-value
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelSetVariable])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $VariableName,
        [parameter(Mandatory = $false)]
        [object]
        $Value
    )
    Process {
        $obj = [IoTEventsDetectorModelSetVariable]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelSetVariable'

function Add-VSIoTEventsDetectorModelSns {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.Sns resource property to the template. Sends an Amazon SNS message.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.Sns resource property to the template.
Sends an Amazon SNS message.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-sns.html

    .PARAMETER TargetArn
        The ARN of the Amazon SNS target where the message is sent.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-sns.html#cfn-iotevents-detectormodel-sns-targetarn
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Payload
        *Update requires*: No interruption: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt

        Type: Payload
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-sns.html#cfn-iotevents-detectormodel-sns-payload
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelSns])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $TargetArn,
        [parameter(Mandatory = $false)]
        $Payload
    )
    Process {
        $obj = [IoTEventsDetectorModelSns]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelSns'

function Add-VSIoTEventsDetectorModelSqs {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.Sqs resource property to the template. Sends information about the detector model instance and the event which triggered the action to an Amazon SQS queue.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.Sqs resource property to the template.
Sends information about the detector model instance and the event which triggered the action to an Amazon SQS queue.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-sqs.html

    .PARAMETER UseBase64
        Set this to TRUE if you want the data to be Base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-sqs.html#cfn-iotevents-detectormodel-sqs-usebase64
        PrimitiveType: Boolean
        UpdateType: Mutable

    .PARAMETER Payload
        *Update requires*: No interruption: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt

        Type: Payload
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-sqs.html#cfn-iotevents-detectormodel-sqs-payload
        UpdateType: Mutable

    .PARAMETER QueueUrl
        The URL of the Amazon SQS queue where the data is written.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-sqs.html#cfn-iotevents-detectormodel-sqs-queueurl
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelSqs])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $UseBase64,
        [parameter(Mandatory = $false)]
        $Payload,
        [parameter(Mandatory = $false)]
        [object]
        $QueueUrl
    )
    Process {
        $obj = [IoTEventsDetectorModelSqs]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelSqs'

function Add-VSIoTEventsDetectorModelState {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.State resource property to the template. Information that defines a state of a detector.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.State resource property to the template.
Information that defines a state of a detector.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-state.html

    .PARAMETER OnInput
        When an input is received and the condition is TRUE, perform the specified actions.

        Type: OnInput
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-state.html#cfn-iotevents-detectormodel-state-oninput
        UpdateType: Mutable

    .PARAMETER OnExit
        When exiting this state, perform these actions if the specified condition is TRUE.

        Type: OnExit
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-state.html#cfn-iotevents-detectormodel-state-onexit
        UpdateType: Mutable

    .PARAMETER StateName
        The name of the state.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-state.html#cfn-iotevents-detectormodel-state-statename
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER OnEnter
        When entering this state, perform these actions if the condition is TRUE.

        Type: OnEnter
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-state.html#cfn-iotevents-detectormodel-state-onenter
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelState])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        $OnInput,
        [parameter(Mandatory = $false)]
        $OnExit,
        [parameter(Mandatory = $false)]
        [object]
        $StateName,
        [parameter(Mandatory = $false)]
        $OnEnter
    )
    Process {
        $obj = [IoTEventsDetectorModelState]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelState'

function Add-VSIoTEventsDetectorModelTransitionEvent {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel.TransitionEvent resource property to the template. Specifies the actions performed and the next state entered when a condition evaluates to TRUE.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel.TransitionEvent resource property to the template.
Specifies the actions performed and the next state entered when a condition evaluates to TRUE.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-transitionevent.html

    .PARAMETER Condition
        Required. A Boolean expression that when TRUE causes the actions to be performed and the nextState to be entered.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-transitionevent.html#cfn-iotevents-detectormodel-transitionevent-condition
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Actions
        The actions to be performed.

        Type: List
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-transitionevent.html#cfn-iotevents-detectormodel-transitionevent-actions
        ItemType: Action
        UpdateType: Mutable

    .PARAMETER NextState
        The next state to enter.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-transitionevent.html#cfn-iotevents-detectormodel-transitionevent-nextstate
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER EventName
        The name of the transition event.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-detectormodel-transitionevent.html#cfn-iotevents-detectormodel-transitionevent-eventname
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModelTransitionEvent])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $Condition,
        [parameter(Mandatory = $false)]
        [object]
        $Actions,
        [parameter(Mandatory = $false)]
        [object]
        $NextState,
        [parameter(Mandatory = $false)]
        [object]
        $EventName
    )
    Process {
        $obj = [IoTEventsDetectorModelTransitionEvent]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsDetectorModelTransitionEvent'

function Add-VSIoTEventsInputAttribute {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::Input.Attribute resource property to the template. The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events system using BatchPutMessage. Each such message contains a JSON payload. Those attributes (and their paired values specified here are available for use in the condition expressions used by detectors.

    .DESCRIPTION
        Adds an AWS::IoTEvents::Input.Attribute resource property to the template.
The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events system using BatchPutMessage. Each such message contains a JSON payload. Those attributes (and their paired values specified here are available for use in the condition expressions used by detectors.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-input-attribute.html

    .PARAMETER JsonPath
        An expression that specifies an attribute-value pair in a JSON structure. Use this to specify an attribute from the JSON payload that is made available by the input. Inputs are derived from messages sent to AWS IoT Events BatchPutMessage. Each such message contains a JSON payload. The attribute and its paired value specified here are available for use in the condition expressions used by detectors.
Syntax: <field-name>.<field-name>...

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-input-attribute.html#cfn-iotevents-input-attribute-jsonpath
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsInputAttribute])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $JsonPath
    )
    Process {
        $obj = [IoTEventsInputAttribute]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsInputAttribute'

function Add-VSIoTEventsInputInputDefinition {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::Input.InputDefinition resource property to the template. The definition of the input.

    .DESCRIPTION
        Adds an AWS::IoTEvents::Input.InputDefinition resource property to the template.
The definition of the input.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-input-inputdefinition.html

    .PARAMETER Attributes
        The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events system using BatchPutMessage. Each such message contains a JSON payload, and those attributes and their paired values specified here are available for use in the condition expressions used by detectors that monitor this input.

        Type: List
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-input-inputdefinition.html#cfn-iotevents-input-inputdefinition-attributes
        ItemType: Attribute
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsInputInputDefinition])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $false)]
        [object]
        $Attributes
    )
    Process {
        $obj = [IoTEventsInputInputDefinition]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'Add-VSIoTEventsInputInputDefinition'

function New-VSIoTEventsDetectorModel {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::DetectorModel resource to the template. The AWS::IoTEvents::DetectorModel resource creates a detector model. You create a *detector model* (a model of your equipment or process using *states*. For each state, you define conditional (Boolean logic that evaluates the incoming inputs to detect significant events. When an event is detected, it can change the state or trigger custom-built or predefined actions using other AWS services. You can define additional events that trigger actions when entering or exiting a state and, optionally, when a condition is met. For more information, see How to Use AWS IoT Events: https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html in the *AWS IoT Events Developer Guide*.

    .DESCRIPTION
        Adds an AWS::IoTEvents::DetectorModel resource to the template. The AWS::IoTEvents::DetectorModel resource creates a detector model. You create a *detector model* (a model of your equipment or process using *states*. For each state, you define conditional (Boolean logic that evaluates the incoming inputs to detect significant events. When an event is detected, it can change the state or trigger custom-built or predefined actions using other AWS services. You can define additional events that trigger actions when entering or exiting a state and, optionally, when a condition is met. For more information, see How to Use AWS IoT Events: https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html in the *AWS IoT Events Developer Guide*.

**Note**

When you successfully update a detector model (using the AWS IoT Events console, AWS IoT Events API or CLI commands, or AWS CloudFormation all detector instances created by the model are reset to their initial states. (The detector's state, and the values of any variables and timers are reset.

When you successfully update a detector model (using the AWS IoT Events console, AWS IoT Events API or CLI commands, or AWS CloudFormation the version number of the detector model is incremented. (A detector model with version number 1 before the update has version number 2 after the update succeeds.

If you attempt to update a detector model using AWS CloudFormation and the update does not succeed, the system may, in some cases, restore the original detector model. When this occurs, the detector model's version is incremented twice (for example, from version 1 to version 3 and the detector instances are reset.

Also, be aware that if you attempt to update several detector models at once using AWS CloudFormation, some updates may succeed and others fail. In this case, the effects on each detector model's detector instances and version number depend on whether the update succeeded or failed, with the results as stated.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-detectormodel.html

    .PARAMETER LogicalId
        The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.

    .PARAMETER DetectorModelDefinition
        Information that defines how a detector operates.

        Type: DetectorModelDefinition
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-detectormodel.html#cfn-iotevents-detectormodel-detectormodeldefinition
        UpdateType: Mutable

    .PARAMETER EvaluationMethod
        Information about the order in which events are evaluated and how actions are executed.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-detectormodel.html#cfn-iotevents-detectormodel-evaluationmethod
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER DetectorModelName
        The name of the detector model.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-detectormodel.html#cfn-iotevents-detectormodel-detectormodelname
        PrimitiveType: String
        UpdateType: Immutable

    .PARAMETER DetectorModelDescription
        A brief description of the detector model.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-detectormodel.html#cfn-iotevents-detectormodel-detectormodeldescription
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Key
        The value used to identify a detector instance. When a device or system sends input, a new detector instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding detector instance based on this identifying information.
This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct detector instance, the device must send a message payload that contains the same attribute-value.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-detectormodel.html#cfn-iotevents-detectormodel-key
        PrimitiveType: String
        UpdateType: Immutable

    .PARAMETER RoleArn
        The ARN of the role that grants permission to AWS IoT Events to perform its operations.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-detectormodel.html#cfn-iotevents-detectormodel-rolearn
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Tags
        An array of key-value pairs to apply to this resource.
For more information, see Tag: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html.

        Type: List
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-detectormodel.html#cfn-iotevents-detectormodel-tags
        ItemType: Tag
        UpdateType: Mutable

    .PARAMETER DeletionPolicy
        With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.

        To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.

        You must use one of the following options: "Delete","Retain","Snapshot"

    .PARAMETER UpdateReplacePolicy
        Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation.

        When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource.

        For resources that support snapshots, such as AWS::EC2::Volume, specify Snapshot to have AWS CloudFormation create a snapshot before deleting the old resource instance.

        You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy is only executed if you update a resource property whose update behavior is specified as Replacement, thereby causing AWS CloudFormation to replace the old resource with a new one with a new physical ID. For example, if you update the Engine property of an AWS::RDS::DBInstance resource type, AWS CloudFormation creates a new resource and replaces the current DB instance resource with the new one. The UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted, retained, or created a snapshot of the old DB instance. The update behavior for each property of a resource is specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack Resources.

        The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets.

        Note
        Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope.

        UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update.

        You must use one of the following options: "Delete","Retain","Snapshot"

    .PARAMETER DependsOn
        With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.

        This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.


    .PARAMETER Metadata
        The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.

        This will be returned when describing the resource using AWS CLI.


    .PARAMETER UpdatePolicy
        Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.

        You must use the "Add-UpdatePolicy" function or the [UpdatePolicy] class here.
    .PARAMETER Condition
        Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsDetectorModel])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $true,Position = 0)]
        [ValidateLogicalId()]
        [string]
        $LogicalId,
        [parameter(Mandatory = $false)]
        $DetectorModelDefinition,
        [parameter(Mandatory = $false)]
        [object]
        $EvaluationMethod,
        [parameter(Mandatory = $false)]
        [object]
        $DetectorModelName,
        [parameter(Mandatory = $false)]
        [object]
        $DetectorModelDescription,
        [parameter(Mandatory = $false)]
        [object]
        $Key,
        [parameter(Mandatory = $false)]
        [object]
        $RoleArn,
        [TransformTag()]
        [object]
        [parameter(Mandatory = $false)]
        $Tags,
        [parameter()]
        [DeletionPolicy]
        $DeletionPolicy,
        [parameter()]
        [UpdateReplacePolicy]
        $UpdateReplacePolicy,
        [parameter(Mandatory = $false)]
        [string[]]
        $DependsOn,
        [parameter(Mandatory = $false)]
        [VSJson]
        $Metadata,
        [parameter(Mandatory = $false)]
        [UpdatePolicy]
        $UpdatePolicy,
        [parameter(Mandatory = $false)]
        [string]
        $Condition
    )
    Process {
        $obj = [IoTEventsDetectorModel]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'New-VSIoTEventsDetectorModel'

function New-VSIoTEventsInput {
    <#
    .SYNOPSIS
        Adds an AWS::IoTEvents::Input resource to the template. The AWS::IoTEvents::Input resource creates an input. To monitor your devices and processes, they must have a way to get telemetry data into AWS IoT Events. This is done by sending messages as *inputs* to AWS IoT Events. For more information, see How to Use AWS IoT Events: https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html in the *AWS IoT Events Developer Guide*.

    .DESCRIPTION
        Adds an AWS::IoTEvents::Input resource to the template. The AWS::IoTEvents::Input resource creates an input. To monitor your devices and processes, they must have a way to get telemetry data into AWS IoT Events. This is done by sending messages as *inputs* to AWS IoT Events. For more information, see How to Use AWS IoT Events: https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html in the *AWS IoT Events Developer Guide*.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-input.html

    .PARAMETER LogicalId
        The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.

    .PARAMETER InputDefinition
        The definition of the input.

        Type: InputDefinition
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-input.html#cfn-iotevents-input-inputdefinition
        UpdateType: Mutable

    .PARAMETER InputName
        The name of the input.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-input.html#cfn-iotevents-input-inputname
        PrimitiveType: String
        UpdateType: Immutable

    .PARAMETER InputDescription
        A brief description of the input.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-input.html#cfn-iotevents-input-inputdescription
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Tags
        An array of key-value pairs to apply to this resource.
For more information, see Tag: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html.

        Type: List
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-input.html#cfn-iotevents-input-tags
        ItemType: Tag
        UpdateType: Mutable

    .PARAMETER DeletionPolicy
        With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.

        To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.

        You must use one of the following options: "Delete","Retain","Snapshot"

    .PARAMETER UpdateReplacePolicy
        Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation.

        When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource.

        For resources that support snapshots, such as AWS::EC2::Volume, specify Snapshot to have AWS CloudFormation create a snapshot before deleting the old resource instance.

        You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy is only executed if you update a resource property whose update behavior is specified as Replacement, thereby causing AWS CloudFormation to replace the old resource with a new one with a new physical ID. For example, if you update the Engine property of an AWS::RDS::DBInstance resource type, AWS CloudFormation creates a new resource and replaces the current DB instance resource with the new one. The UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted, retained, or created a snapshot of the old DB instance. The update behavior for each property of a resource is specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack Resources.

        The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets.

        Note
        Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope.

        UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update.

        You must use one of the following options: "Delete","Retain","Snapshot"

    .PARAMETER DependsOn
        With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.

        This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.


    .PARAMETER Metadata
        The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.

        This will be returned when describing the resource using AWS CLI.


    .PARAMETER UpdatePolicy
        Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.

        You must use the "Add-UpdatePolicy" function or the [UpdatePolicy] class here.
    .PARAMETER Condition
        Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.

    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType([IoTEventsInput])]
    [cmdletbinding()]
    Param(
        [parameter(Mandatory = $true,Position = 0)]
        [ValidateLogicalId()]
        [string]
        $LogicalId,
        [parameter(Mandatory = $false)]
        $InputDefinition,
        [parameter(Mandatory = $false)]
        [object]
        $InputName,
        [parameter(Mandatory = $false)]
        [object]
        $InputDescription,
        [TransformTag()]
        [object]
        [parameter(Mandatory = $false)]
        $Tags,
        [parameter()]
        [DeletionPolicy]
        $DeletionPolicy,
        [parameter()]
        [UpdateReplacePolicy]
        $UpdateReplacePolicy,
        [parameter(Mandatory = $false)]
        [string[]]
        $DependsOn,
        [parameter(Mandatory = $false)]
        [VSJson]
        $Metadata,
        [parameter(Mandatory = $false)]
        [UpdatePolicy]
        $UpdatePolicy,
        [parameter(Mandatory = $false)]
        [string]
        $Condition
    )
    Process {
        $obj = [IoTEventsInput]::new($PSBoundParameters)
        Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)"
        Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)"
        $obj
    }
}

Export-ModuleMember -Function 'New-VSIoTEventsInput'