VaporShell.SQS.Classes.ps1

using namespace System
using namespace System.Collections
using namespace System.Collections.Generic
using namespace System.IO
using namespace System.Management.Automation
[CmdletBinding()]
Param()

Write-Verbose "Importing class 'SQSQueuePolicy'"

class SQSQueuePolicy : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSSQSQueuePolicy'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-policy.html'

    hidden [object] $_condition

    [string] $Type = 'AWS::SQS::QueuePolicy'
    [VSJson] $PolicyDocument
    [string[]] $Queues
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name PolicyDocument -Value {
            $this.Properties['PolicyDocument']
        } -SecondValue {
            param([ValidateType(([string], [VSJson], [VSYaml], [psobject], [IDictionary]))][object] $value)
            $this.Properties['PolicyDocument'] = [VSJson]::Transform($value)
            Write-Debug $this.Properties['PolicyDocument']
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Queues -Value {
            $this.Properties['Queues']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['Queues'] = @($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Condition -Value {
            $this._condition
        } -SecondValue {
            param(
                [ValidateType(([string], [IntrinsicFunction], [ConditionFunction]))] [object]
                $value
            )
            $this._condition = $value
        }
    }

    SQSQueuePolicy() : base() {}
    SQSQueuePolicy([IDictionary] $props) : base($props) {}
    SQSQueuePolicy([psobject] $props) : base($props) {}
}

Write-Verbose "Importing class 'SQSQueue'"

class SQSQueue : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSSQSQueue'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html'

    hidden [string[]] $_attributes = @('Arn','QueueName')
    hidden [object] $_condition

    [string] $Type = 'AWS::SQS::Queue'
    [bool] $ContentBasedDeduplication
    [string] $DeduplicationScope
    [int] $DelaySeconds
    [bool] $FifoQueue
    [string] $FifoThroughputLimit
    [int] $KmsDataKeyReusePeriodSeconds
    [string] $KmsMasterKeyId
    [int] $MaximumMessageSize
    [int] $MessageRetentionPeriod
    [string] $QueueName
    [int] $ReceiveMessageWaitTimeSeconds
    [VSJson] $RedrivePolicy
    [VSTag[]] $Tags
    [int] $VisibilityTimeout
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name ContentBasedDeduplication -Value {
            $this.Properties['ContentBasedDeduplication']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ContentBasedDeduplication'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name DeduplicationScope -Value {
            $this.Properties['DeduplicationScope']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['DeduplicationScope'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name DelaySeconds -Value {
            $this.Properties['DelaySeconds']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['DelaySeconds'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name FifoQueue -Value {
            $this.Properties['FifoQueue']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['FifoQueue'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name FifoThroughputLimit -Value {
            $this.Properties['FifoThroughputLimit']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['FifoThroughputLimit'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name KmsDataKeyReusePeriodSeconds -Value {
            $this.Properties['KmsDataKeyReusePeriodSeconds']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['KmsDataKeyReusePeriodSeconds'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name KmsMasterKeyId -Value {
            $this.Properties['KmsMasterKeyId']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['KmsMasterKeyId'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name MaximumMessageSize -Value {
            $this.Properties['MaximumMessageSize']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['MaximumMessageSize'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name MessageRetentionPeriod -Value {
            $this.Properties['MessageRetentionPeriod']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['MessageRetentionPeriod'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name QueueName -Value {
            $this.Properties['QueueName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['QueueName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ReceiveMessageWaitTimeSeconds -Value {
            $this.Properties['ReceiveMessageWaitTimeSeconds']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ReceiveMessageWaitTimeSeconds'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name RedrivePolicy -Value {
            $this.Properties['RedrivePolicy']
        } -SecondValue {
            param([ValidateType(([string], [VSJson], [VSYaml], [psobject], [IDictionary]))][object] $value)
            $this.Properties['RedrivePolicy'] = [VSJson]::Transform($value)
            Write-Debug $this.Properties['RedrivePolicy']
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Tags -Value {
            $this.Properties['Tags']
        } -SecondValue {
            param([TransformTag()] [ValidateType(([IDictionary], [psobject], [VSTag]))] [object] $value)
            $this.Properties['Tags'] = [VSTag]::TransformTag($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name VisibilityTimeout -Value {
            $this.Properties['VisibilityTimeout']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['VisibilityTimeout'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Condition -Value {
            $this._condition
        } -SecondValue {
            param(
                [ValidateType(([string], [IntrinsicFunction], [ConditionFunction]))] [object]
                $value
            )
            $this._condition = $value
        }
    }

    SQSQueue() : base() {}
    SQSQueue([IDictionary] $props) : base($props) {}
    SQSQueue([psobject] $props) : base($props) {}
}