VaporShell.RAM.Classes.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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 'RAMResourceShare'"

class RAMResourceShare : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSRAMResourceShare'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html'

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

    [string] $Type = 'AWS::RAM::ResourceShare'
    [string[]] $PermissionArns
    [string[]] $Principals
    [bool] $AllowExternalPrincipals
    [string[]] $ResourceArns
    [VSTag[]] $Tags
    [string] $Name
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name PermissionArns -Value {
            $this.Properties['PermissionArns']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['PermissionArns'] = @($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Principals -Value {
            $this.Properties['Principals']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['Principals'] = @($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name AllowExternalPrincipals -Value {
            $this.Properties['AllowExternalPrincipals']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['AllowExternalPrincipals'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ResourceArns -Value {
            $this.Properties['ResourceArns']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['ResourceArns'] = @($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 Name -Value {
            $this.Properties['Name']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['Name'] = 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
        }
    }

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