VaporShell.SSMContacts.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 'SSMContactsContactTargets'"

class SSMContactsContactTargets : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSSSMContactsContactTargets'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmcontacts-contact-targets.html'

    hidden [VSJson] $_contactTargetInfo
    hidden [VSJson] $_channelTargetInfo

    [VSJson] $ContactTargetInfo
    [VSJson] $ChannelTargetInfo

    hidden [void] _addAccessors() {
        $this | Add-Member -Force -MemberType ScriptProperty -Name ContactTargetInfo -Value {
            $this._contactTargetInfo
        } -SecondValue {
            param([ValidateType(([string], [VSJson], [VSYaml], [psobject], [IDictionary]))][object] $value)
            $this._contactTargetInfo = [VSJson]::Transform($value)
            Write-Debug $this._contactTargetInfo
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ChannelTargetInfo -Value {
            $this._channelTargetInfo
        } -SecondValue {
            param([ValidateType(([string], [VSJson], [VSYaml], [psobject], [IDictionary]))][object] $value)
            $this._channelTargetInfo = [VSJson]::Transform($value)
            Write-Debug $this._channelTargetInfo
        }
    }

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

Write-Verbose "Importing class 'SSMContactsContactStage'"

class SSMContactsContactStage : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSSSMContactsContactStage'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmcontacts-contact-stage.html'

    hidden [object] $_durationInMinutes
    hidden [object] $_targets

    [int] $DurationInMinutes
    [SSMContactsContactTargets[]] $Targets

    hidden [void] _addAccessors() {
        $this | Add-Member -Force -MemberType ScriptProperty -Name DurationInMinutes -Value {
            $this._durationInMinutes
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._durationInMinutes = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Targets -Value {
            $this._targets
        } -SecondValue {
            param([ValidateType(([SSMContactsContactTargets], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this._targets = $value
        }
    }

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

Write-Verbose "Importing class 'SSMContactsContact'"

class SSMContactsContact : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSSSMContactsContact'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssmcontacts-contact.html'

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

    [string] $Type = 'AWS::SSMContacts::Contact'
    [string] $Alias
    [string] $DisplayName
    [string] $ContactType
    [SSMContactsContactStage[]] $Plan
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name Alias -Value {
            $this.Properties['Alias']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['Alias'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $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 ContactType -Value {
            $this.Properties['ContactType']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ContactType'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Plan -Value {
            $this.Properties['Plan']
        } -SecondValue {
            param([ValidateType(([SSMContactsContactStage], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['Plan'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Condition -Value {
            $this._condition
        } -SecondValue {
            param(
                [ValidateType(([string], [IntrinsicFunction], [ConditionFunction]))] [object]
                $value
            )
            $this._condition = $value
        }
    }

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

Write-Verbose "Importing class 'SSMContactsContactChannel'"

class SSMContactsContactChannel : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSSSMContactsContactChannel'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssmcontacts-contactchannel.html'

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

    [string] $Type = 'AWS::SSMContacts::ContactChannel'
    [string] $ContactId
    [string] $ChannelName
    [string] $ChannelType
    [bool] $DeferActivation
    [string] $ChannelAddress
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name ContactId -Value {
            $this.Properties['ContactId']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ContactId'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ChannelName -Value {
            $this.Properties['ChannelName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ChannelName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ChannelType -Value {
            $this.Properties['ChannelType']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ChannelType'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name DeferActivation -Value {
            $this.Properties['DeferActivation']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['DeferActivation'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ChannelAddress -Value {
            $this.Properties['ChannelAddress']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ChannelAddress'] = 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
        }
    }

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