VaporShell.Timestream.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 'TimestreamDatabase'"

class TimestreamDatabase : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSTimestreamDatabase'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-database.html'

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

    [string] $Type = 'AWS::Timestream::Database'
    [string] $DatabaseName
    [string] $KmsKeyId
    [VSTag[]] $Tags
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

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

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

Write-Verbose "Importing class 'TimestreamTable'"

class TimestreamTable : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSTimestreamTable'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-table.html'

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

    [string] $Type = 'AWS::Timestream::Table'
    [string] $DatabaseName
    [string] $TableName
    [VSJson] $RetentionProperties
    [VSTag[]] $Tags
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name DatabaseName -Value {
            $this.Properties['DatabaseName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['DatabaseName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name TableName -Value {
            $this.Properties['TableName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['TableName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name RetentionProperties -Value {
            $this.Properties['RetentionProperties']
        } -SecondValue {
            param([ValidateType(([string], [VSJson], [VSYaml], [psobject], [IDictionary]))][object] $value)
            $this.Properties['RetentionProperties'] = [VSJson]::Transform($value)
            Write-Debug $this.Properties['RetentionProperties']
        }
        $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 Condition -Value {
            $this._condition
        } -SecondValue {
            param(
                [ValidateType(([string], [IntrinsicFunction], [ConditionFunction]))] [object]
                $value
            )
            $this._condition = $value
        }
    }

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