VaporShell.FMS.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 'FMSPolicyPolicyTag'"

class FMSPolicyPolicyTag : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSFMSPolicyPolicyTag'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-policytag.html'

    hidden [object] $_key
    hidden [object] $_value

    [string] $Key
    [string] $Value

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

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

Write-Verbose "Importing class 'FMSPolicyResourceTag'"

class FMSPolicyResourceTag : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSFMSPolicyResourceTag'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-resourcetag.html'

    hidden [object] $_key
    hidden [object] $_value

    [string] $Key
    [string] $Value

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

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

Write-Verbose "Importing class 'FMSPolicyIEMap'"

class FMSPolicyIEMap : VSResourceProperty {
    hidden [string] $_vsFunctionName = 'Add-VSFMSPolicyIEMap'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-iemap.html'

    hidden [object] $_aCCOUNT
    hidden [object] $_oRGUNIT

    [string[]] $ACCOUNT
    [string[]] $ORGUNIT

    hidden [void] _addAccessors() {
        $this | Add-Member -Force -MemberType ScriptProperty -Name ACCOUNT -Value {
            $this._aCCOUNT
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this._aCCOUNT = @($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ORGUNIT -Value {
            $this._oRGUNIT
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this._oRGUNIT = @($value)
        }
    }

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

Write-Verbose "Importing class 'FMSNotificationChannel'"

class FMSNotificationChannel : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSFMSNotificationChannel'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-notificationchannel.html'

    hidden [object] $_condition

    [string] $Type = 'AWS::FMS::NotificationChannel'
    [string] $SnsRoleName
    [string] $SnsTopicArn
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

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

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

Write-Verbose "Importing class 'FMSPolicy'"

class FMSPolicy : VSResource {
    hidden [string] $_vsFunctionName = 'New-VSFMSPolicy'
    hidden [string] $_awsDocumentation = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-policy.html'

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

    [string] $Type = 'AWS::FMS::Policy'
    [FMSPolicyIEMap] $ExcludeMap
    [bool] $ExcludeResourceTags
    [FMSPolicyIEMap] $IncludeMap
    [string] $PolicyName
    [bool] $RemediationEnabled
    [FMSPolicyResourceTag[]] $ResourceTags
    [string] $ResourceType
    [string[]] $ResourceTypeList
    [VSJson] $SecurityServicePolicyData
    [bool] $DeleteAllPolicyResources
    [FMSPolicyPolicyTag[]] $Tags
    [VSJson] $Metadata
    [UpdatePolicy] $UpdatePolicy
    [string] $Condition

    hidden [void] _addAccessors() {
        $this._addBaseAccessors()
        $this | Add-Member -Force -MemberType ScriptProperty -Name ExcludeMap -Value {
            $this.Properties['ExcludeMap']
        } -SecondValue {
            param([ValidateType(([FMSPolicyIEMap], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ExcludeMap'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ExcludeResourceTags -Value {
            $this.Properties['ExcludeResourceTags']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ExcludeResourceTags'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name IncludeMap -Value {
            $this.Properties['IncludeMap']
        } -SecondValue {
            param([ValidateType(([FMSPolicyIEMap], [string], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['IncludeMap'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name PolicyName -Value {
            $this.Properties['PolicyName']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['PolicyName'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name RemediationEnabled -Value {
            $this.Properties['RemediationEnabled']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['RemediationEnabled'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ResourceTags -Value {
            $this.Properties['ResourceTags']
        } -SecondValue {
            param([ValidateType(([FMSPolicyResourceTag], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['ResourceTags'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ResourceType -Value {
            $this.Properties['ResourceType']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['ResourceType'] = if ($value -is [int]) {
                $value.ToString()
            }
            else {
                $value
            }
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name ResourceTypeList -Value {
            $this.Properties['ResourceTypeList']
        } -SecondValue {
            param([ValidateType(([string], [int], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['ResourceTypeList'] = @($value)
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name SecurityServicePolicyData -Value {
            $this.Properties['SecurityServicePolicyData']
        } -SecondValue {
            param([ValidateType(([string], [VSJson], [VSYaml], [psobject], [IDictionary]))][object] $value)
            $this.Properties['SecurityServicePolicyData'] = [VSJson]::Transform($value)
            Write-Debug $this.Properties['SecurityServicePolicyData']
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name DeleteAllPolicyResources -Value {
            $this.Properties['DeleteAllPolicyResources']
        } -SecondValue {
            param([ValidateType(([bool], [IntrinsicFunction], [ConditionFunction]))] [object] $value)
            $this.Properties['DeleteAllPolicyResources'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Tags -Value {
            $this.Properties['Tags']
        } -SecondValue {
            param([ValidateType(([FMSPolicyPolicyTag], [IntrinsicFunction], [ConditionFunction]))] [object[]] $value)
            $this.Properties['Tags'] = $value
        }
        $this | Add-Member -Force -MemberType ScriptProperty -Name Condition -Value {
            $this._condition
        } -SecondValue {
            param(
                [ValidateType(([string], [IntrinsicFunction], [ConditionFunction]))] [object]
                $value
            )
            $this._condition = $value
        }
    }

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