VaporShell.SNS.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 'SNSTopicSubscription'"

class SNSTopicSubscription : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSSNSTopicSubscription'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-subscription.html'

    hidden [object] $_endpoint
    hidden [object] $_protocol

    [string] $Endpoint
    [string] $Protocol

    hidden [void] _addAccessors() {
        $this | Add-Member -Force -MemberType ScriptProperty -Name Endpoint -Value {
            $this._endpoint
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._endpoint = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Protocol -Value {
            $this._protocol
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._protocol = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
    }

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

Write-Verbose "Importing class 'SNSSubscription'"

class SNSSubscription : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSSNSSubscription'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html'

    hidden [object] $_condition

    [string] $Type = 'AWS::SNS::Subscription'
    [VSJson] $DeliveryPolicy
    [string] $Endpoint
    [VSJson] $FilterPolicy
    [string] $Protocol
    [bool] $RawMessageDelivery
    [VSJson] $RedrivePolicy
    [string] $Region
    [string] $SubscriptionRoleArn
    [string] $TopicArn
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name DeliveryPolicy -Value {
            $this.Properties['DeliveryPolicy']
        } -SecondValue {
            param([ValidateType(([string], [VSJson], [VSYaml], [psobject], [IDictionary]))][object] $value)
            $this.Properties['DeliveryPolicy'] = [VSJson]::Transform($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Endpoint -Value {
            $this.Properties['Endpoint']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['Endpoint'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name FilterPolicy -Value {
            $this.Properties['FilterPolicy']
        } -SecondValue {
            param([ValidateType(([string], [VSJson], [VSYaml], [psobject], [IDictionary]))][object] $value)
            $this.Properties['FilterPolicy'] = [VSJson]::Transform($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Protocol -Value {
            $this.Properties['Protocol']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['Protocol'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name RawMessageDelivery -Value {
            $this.Properties['RawMessageDelivery']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['RawMessageDelivery'] = $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)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Region -Value {
            $this.Properties['Region']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['Region'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SubscriptionRoleArn -Value {
            $this.Properties['SubscriptionRoleArn']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['SubscriptionRoleArn'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name TopicArn -Value {
            $this.Properties['TopicArn']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['TopicArn'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Condition -Value {
            $this._condition
        } -SecondValue {
            param(
                [ValidateType(([string], [IntrinsicFunction], [ConditionFunction]))] [object]
                $value
            )
            $this._condition = $value
        }
    }

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

Write-Verbose "Importing class 'SNSTopic'"

class SNSTopic : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSSNSTopic'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html'

    hidden [string[]] $_attributes = @('TopicName')
    hidden [object] $_condition

    [string] $Type = 'AWS::SNS::Topic'
    [bool] $ContentBasedDeduplication
    [string] $DisplayName
    [bool] $FifoTopic
    [string] $KmsMasterKeyId
    [SNSTopicSubscription[]] $Subscription
    [VSTag[]] $Tags
    [string] $TopicName
    [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 DisplayName -Value {
            $this.Properties['DisplayName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['DisplayName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name FifoTopic -Value {
            $this.Properties['FifoTopic']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['FifoTopic'] = $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 Subscription -Value {
            $this.Properties['Subscription']
        } -SecondValue {
            param([ValidateType(([SNSTopicSubscription], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['Subscription'] = $value
        }
        $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 TopicName -Value {
            $this.Properties['TopicName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['TopicName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Condition -Value {
            $this._condition
        } -SecondValue {
            param(
                [ValidateType(([string], [IntrinsicFunction], [ConditionFunction]))] [object]
                $value
            )
            $this._condition = $value
        }
    }

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

Write-Verbose "Importing class 'SNSTopicPolicy'"

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

    hidden [object] $_condition

    [string] $Type = 'AWS::SNS::TopicPolicy'
    [VSJson] $PolicyDocument
    [string[]] $Topics
    [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)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Topics -Value {
            $this.Properties['Topics']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['Topics'] = @($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Condition -Value {
            $this._condition
        } -SecondValue {
            param(
                [ValidateType(([string], [IntrinsicFunction], [ConditionFunction]))] [object]
                $value
            )
            $this._condition = $value
        }
    }

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