VaporShell.MemoryDB.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 'MemoryDBClusterEndpoint'"

class MemoryDBClusterEndpoint : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSMemoryDBClusterEndpoint'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-memorydb-cluster-endpoint.html'

    hidden [object] $_address
    hidden [object] $_port

    [string] $Address
    [int] $Port

    hidden [void] _addAccessors() {
        $this | Add-Member -Force -MemberType ScriptProperty -Name Address -Value {
            $this._address
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._address = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Port -Value {
            $this._port
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this._port = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
    }

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

Write-Verbose "Importing class 'MemoryDBParameterGroup'"

class MemoryDBParameterGroup : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSMemoryDBParameterGroup'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-memorydb-parametergroup.html'

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

    [string] $Type = 'AWS::MemoryDB::ParameterGroup'
    [string] $ParameterGroupName
    [string] $Family
    [string] $Description
    [VSTag[]] $Tags
    [VSJson] $Parameters
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

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

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

Write-Verbose "Importing class 'MemoryDBACL'"

class MemoryDBACL : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSMemoryDBACL'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-memorydb-acl.html'

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

    [string] $Type = 'AWS::MemoryDB::ACL'
    [string] $ACLName
    [string[]] $UserNames
    [VSTag[]] $Tags
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

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

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

Write-Verbose "Importing class 'MemoryDBUser'"

class MemoryDBUser : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSMemoryDBUser'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-memorydb-user.html'

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

    [string] $Type = 'AWS::MemoryDB::User'
    [string] $UserName
    [string] $AccessString
    [VSJson] $AuthenticationMode
    [VSTag[]] $Tags
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

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

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

Write-Verbose "Importing class 'MemoryDBSubnetGroup'"

class MemoryDBSubnetGroup : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSMemoryDBSubnetGroup'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-memorydb-subnetgroup.html'

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

    [string] $Type = 'AWS::MemoryDB::SubnetGroup'
    [string] $SubnetGroupName
    [string] $Description
    [string[]] $SubnetIds
    [VSTag[]] $Tags
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

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

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

Write-Verbose "Importing class 'MemoryDBCluster'"

class MemoryDBCluster : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSMemoryDBCluster'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-memorydb-cluster.html'

    hidden [string[]] $_attributes = @('Status','ParameterGroupStatus','ARN','ClusterEndpoint.Address','ClusterEndpoint.Port')
    hidden [object] $_condition

    [string] $Type = 'AWS::MemoryDB::Cluster'
    [string] $ClusterName
    [string] $Description
    [string] $NodeType
    [int] $NumShards
    [int] $NumReplicasPerShard
    [string] $SubnetGroupName
    [string[]] $SecurityGroupIds
    [string] $MaintenanceWindow
    [string] $ParameterGroupName
    [int] $Port
    [int] $SnapshotRetentionLimit
    [string] $SnapshotWindow
    [string] $ACLName
    [string] $SnsTopicArn
    [string] $SnsTopicStatus
    [bool] $TLSEnabled
    [string] $KmsKeyId
    [string[]] $SnapshotArns
    [string] $SnapshotName
    [string] $FinalSnapshotName
    [string] $EngineVersion
    [MemoryDBClusterEndpoint] $ClusterEndpoint
    [bool] $AutoMinorVersionUpgrade
    [VSTag[]] $Tags
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name ClusterName -Value {
            $this.Properties['ClusterName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ClusterName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Description -Value {
            $this.Properties['Description']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['Description'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name NodeType -Value {
            $this.Properties['NodeType']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['NodeType'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name NumShards -Value {
            $this.Properties['NumShards']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['NumShards'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name NumReplicasPerShard -Value {
            $this.Properties['NumReplicasPerShard']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['NumReplicasPerShard'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SubnetGroupName -Value {
            $this.Properties['SubnetGroupName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['SubnetGroupName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SecurityGroupIds -Value {
            $this.Properties['SecurityGroupIds']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['SecurityGroupIds'] = @($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name MaintenanceWindow -Value {
            $this.Properties['MaintenanceWindow']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['MaintenanceWindow'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ParameterGroupName -Value {
            $this.Properties['ParameterGroupName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ParameterGroupName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Port -Value {
            $this.Properties['Port']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['Port'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SnapshotRetentionLimit -Value {
            $this.Properties['SnapshotRetentionLimit']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['SnapshotRetentionLimit'] = if ($cast = $value -as [int]) {
                $cast
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SnapshotWindow -Value {
            $this.Properties['SnapshotWindow']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['SnapshotWindow'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ACLName -Value {
            $this.Properties['ACLName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ACLName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SnsTopicArn -Value {
            $this.Properties['SnsTopicArn']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['SnsTopicArn'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SnsTopicStatus -Value {
            $this.Properties['SnsTopicStatus']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['SnsTopicStatus'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name TLSEnabled -Value {
            $this.Properties['TLSEnabled']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['TLSEnabled'] = $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 SnapshotArns -Value {
            $this.Properties['SnapshotArns']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['SnapshotArns'] = @($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SnapshotName -Value {
            $this.Properties['SnapshotName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['SnapshotName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name FinalSnapshotName -Value {
            $this.Properties['FinalSnapshotName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['FinalSnapshotName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name EngineVersion -Value {
            $this.Properties['EngineVersion']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['EngineVersion'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ClusterEndpoint -Value {
            $this.Properties['ClusterEndpoint']
        } -SecondValue {
            param([ValidateType(([MemoryDBClusterEndpoint], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ClusterEndpoint'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name AutoMinorVersionUpgrade -Value {
            $this.Properties['AutoMinorVersionUpgrade']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['AutoMinorVersionUpgrade'] = $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
        }
    }

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