AWSPowerShellCompleters.psm1

# Auto-generated argument completers for parameters of SDK ConstantClass-derived type used in cmdlets.
# Do not modify this file; it may be overwritten during version upgrades.

$psMajorVersion = $PSVersionTable.PSVersion.Major
if ($psMajorVersion -eq 2) 
{ 
    Write-Verbose "Dynamic argument completion not supported in PowerShell version 2; skipping load."
    return 
}

# PowerShell's native Register-ArgumentCompleter cmdlet is available on v5.0 or higher. For lower
# version, we can use the version in the TabExpansion++ module if installed.
$registrationCmdletAvailable = ($psMajorVersion -ge 5) -Or !((Get-Command Register-ArgumentCompleter -ea Ignore) -eq $null)

# internal function to perform the registration using either cmdlet or manipulation
# of the options table
function _awsArgumentCompleterRegistration()
{
    param
    (
        [scriptblock]$scriptBlock,
        [hashtable]$param2CmdletsMap
    )

    if ($registrationCmdletAvailable)
    {
        foreach ($paramName in $param2CmdletsMap.Keys)
        {
             $args = @{
                "ScriptBlock" = $scriptBlock
                "Parameter" = $paramName
            }

            $cmdletNames = $param2CmdletsMap[$paramName]
            if ($cmdletNames -And $cmdletNames.Length -gt 0)
            {
                $args["Command"] = $cmdletNames
            }

            Register-ArgumentCompleter @args
        }
    }
    else
    {
        if (-not $global:options) { $global:options = @{ CustomArgumentCompleters = @{ }; NativeArgumentCompleters = @{ } } }

        foreach ($paramName in $param2CmdletsMap.Keys)
        {
            $cmdletNames = $param2CmdletsMap[$paramName]

            if ($cmdletNames -And $cmdletNames.Length -gt 0)
            {
                foreach ($cn in $cmdletNames)
                {
                    $fqn =  [string]::Concat($cn, ":", $paramName)
                    $global:options['CustomArgumentCompleters'][$fqn] = $scriptBlock
                }
            }
            else
            {
                $global:options['CustomArgumentCompleters'][$paramName] = $scriptBlock
            }
        }

        $function:tabexpansion2 = $function:tabexpansion2 -replace 'End\r\n{', 'End { if ($null -ne $options) { $options += $global:options} else {$options = $global:options}'
    }
}

# To allow for same-name parameters of different ConstantClass-derived types
# each completer function checks on command name concatenated with parameter name.
# Additionally, the standard code pattern for completers is to pipe through
# sort-object after filtering against $wordToComplete but we omit this as our members
# are already sorted.

# Argument completions for service AWS IAM Access Analyzer


$IAMAA_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AccessAnalyzer.AccessCheckPolicyType
        {
            ($_ -eq "Test-IAMAAAccessNotGranted/PolicyType") -Or
            ($_ -eq "Test-IAMAANoNewAccess/PolicyType")
        }
        {
            $v = "IDENTITY_POLICY","RESOURCE_POLICY"
            break
        }

        # Amazon.AccessAnalyzer.AccessCheckResourceType
        "Test-IAMAANoPublicAccess/ResourceType"
        {
            $v = "AWS::DynamoDB::Stream","AWS::DynamoDB::Table","AWS::EFS::FileSystem","AWS::IAM::AssumeRolePolicyDocument","AWS::Kinesis::Stream","AWS::Kinesis::StreamConsumer","AWS::KMS::Key","AWS::Lambda::Function","AWS::OpenSearchService::Domain","AWS::S3::AccessPoint","AWS::S3::Bucket","AWS::S3::Glacier","AWS::S3Express::DirectoryBucket","AWS::S3Outposts::AccessPoint","AWS::S3Outposts::Bucket","AWS::SecretsManager::Secret","AWS::SNS::Topic","AWS::SQS::Queue"
            break
        }

        # Amazon.AccessAnalyzer.FindingStatusUpdate
        "Update-IAMAAFinding/Status"
        {
            $v = "ACTIVE","ARCHIVED"
            break
        }

        # Amazon.AccessAnalyzer.Locale
        "Use-IAMAAPolicyValidation/Locale"
        {
            $v = "DE","EN","ES","FR","IT","JA","KO","PT_BR","ZH_CN","ZH_TW"
            break
        }

        # Amazon.AccessAnalyzer.OrderBy
        {
            ($_ -eq "Get-IAMAAFindingList/Sort_OrderBy") -Or
            ($_ -eq "Get-IAMAAFindingsV2List/Sort_OrderBy")
        }
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.AccessAnalyzer.PolicyType
        "Use-IAMAAPolicyValidation/PolicyType"
        {
            $v = "IDENTITY_POLICY","RESOURCE_POLICY","SERVICE_CONTROL_POLICY"
            break
        }

        # Amazon.AccessAnalyzer.ResourceType
        "Get-IAMAAAnalyzedResourceList/ResourceType"
        {
            $v = "AWS::DynamoDB::Stream","AWS::DynamoDB::Table","AWS::EC2::Snapshot","AWS::ECR::Repository","AWS::EFS::FileSystem","AWS::IAM::Role","AWS::KMS::Key","AWS::Lambda::Function","AWS::Lambda::LayerVersion","AWS::RDS::DBClusterSnapshot","AWS::RDS::DBSnapshot","AWS::S3::Bucket","AWS::S3Express::DirectoryBucket","AWS::SecretsManager::Secret","AWS::SNS::Topic","AWS::SQS::Queue"
            break
        }

        # Amazon.AccessAnalyzer.Type
        {
            ($_ -eq "Get-IAMAAAnalyzerList/Type") -Or
            ($_ -eq "New-IAMAAAnalyzer/Type")
        }
        {
            $v = "ACCOUNT","ACCOUNT_UNUSED_ACCESS","ORGANIZATION","ORGANIZATION_UNUSED_ACCESS"
            break
        }

        # Amazon.AccessAnalyzer.ValidatePolicyResourceType
        "Use-IAMAAPolicyValidation/ValidatePolicyResourceType"
        {
            $v = "AWS::DynamoDB::Table","AWS::IAM::AssumeRolePolicyDocument","AWS::S3::AccessPoint","AWS::S3::Bucket","AWS::S3::MultiRegionAccessPoint","AWS::S3ObjectLambda::AccessPoint"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IAMAA_map = @{
    "Locale"=@("Use-IAMAAPolicyValidation")
    "PolicyType"=@("Test-IAMAAAccessNotGranted","Test-IAMAANoNewAccess","Use-IAMAAPolicyValidation")
    "ResourceType"=@("Get-IAMAAAnalyzedResourceList","Test-IAMAANoPublicAccess")
    "Sort_OrderBy"=@("Get-IAMAAFindingList","Get-IAMAAFindingsV2List")
    "Status"=@("Update-IAMAAFinding")
    "Type"=@("Get-IAMAAAnalyzerList","New-IAMAAAnalyzer")
    "ValidatePolicyResourceType"=@("Use-IAMAAPolicyValidation")
}

_awsArgumentCompleterRegistration $IAMAA_Completers $IAMAA_map

$IAMAA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IAMAA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IAMAA_SelectMap = @{
    "Select"=@("Start-IAMAAArchiveRule",
               "Stop-IAMAAPolicyGeneration",
               "Test-IAMAAAccessNotGranted",
               "Test-IAMAANoNewAccess",
               "Test-IAMAANoPublicAccess",
               "New-IAMAAAccessPreview",
               "New-IAMAAAnalyzer",
               "New-IAMAAArchiveRule",
               "Remove-IAMAAAnalyzer",
               "Remove-IAMAAArchiveRule",
               "Start-IAMAAFindingRecommendation",
               "Get-IAMAAAccessPreview",
               "Get-IAMAAAnalyzedResource",
               "Get-IAMAAAnalyzer",
               "Get-IAMAAArchiveRule",
               "Get-IAMAAFinding",
               "Get-IAMAAFindingRecommendation",
               "Get-IAMAAFindingV2",
               "Get-IAMAAGeneratedPolicy",
               "Get-IAMAAAccessPreviewFindingList",
               "Get-IAMAAAccessPreviewList",
               "Get-IAMAAAnalyzedResourceList",
               "Get-IAMAAAnalyzerList",
               "Get-IAMAAArchiveRuleList",
               "Get-IAMAAFindingList",
               "Get-IAMAAFindingsV2List",
               "Get-IAMAAPolicyGenerationList",
               "Get-IAMAAResourceTag",
               "Start-IAMAAPolicyGeneration",
               "Start-IAMAAResourceScan",
               "Add-IAMAAResourceTag",
               "Remove-IAMAAResourceTag",
               "Update-IAMAAArchiveRule",
               "Update-IAMAAFinding",
               "Use-IAMAAPolicyValidation")
}

_awsArgumentCompleterRegistration $IAMAA_SelectCompleters $IAMAA_SelectMap
# Argument completions for service AWS Account


$ACCT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Account.AlternateContactType
        {
            ($_ -eq "Get-ACCTAlternateContact/AlternateContactType") -Or
            ($_ -eq "Remove-ACCTAlternateContact/AlternateContactType") -Or
            ($_ -eq "Write-ACCTAlternateContact/AlternateContactType")
        }
        {
            $v = "BILLING","OPERATIONS","SECURITY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ACCT_map = @{
    "AlternateContactType"=@("Get-ACCTAlternateContact","Remove-ACCTAlternateContact","Write-ACCTAlternateContact")
}

_awsArgumentCompleterRegistration $ACCT_Completers $ACCT_map

$ACCT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ACCT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ACCT_SelectMap = @{
    "Select"=@("Approve-ACCTPrimaryEmailUpdate",
               "Remove-ACCTAlternateContact",
               "Disable-ACCTRegion",
               "Enable-ACCTRegion",
               "Get-ACCTAlternateContact",
               "Get-ACCTContactInformation",
               "Get-ACCTPrimaryEmail",
               "Get-ACCTRegionOptStatus",
               "Get-ACCTRegionList",
               "Write-ACCTAlternateContact",
               "Write-ACCTContactInformation",
               "Start-ACCTPrimaryEmailUpdate")
}

_awsArgumentCompleterRegistration $ACCT_SelectCompleters $ACCT_SelectMap
# Argument completions for service AWS Certificate Manager


$ACM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CertificateManager.CertificateTransparencyLoggingPreference
        {
            ($_ -eq "New-ACMCertificate/Options_CertificateTransparencyLoggingPreference") -Or
            ($_ -eq "Update-ACMCertificateOption/Options_CertificateTransparencyLoggingPreference")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.CertificateManager.KeyAlgorithm
        "New-ACMCertificate/KeyAlgorithm"
        {
            $v = "EC_prime256v1","EC_secp384r1","EC_secp521r1","RSA_1024","RSA_2048","RSA_3072","RSA_4096"
            break
        }

        # Amazon.CertificateManager.SortBy
        "Get-ACMCertificateList/SortBy"
        {
            $v = "CREATED_AT"
            break
        }

        # Amazon.CertificateManager.SortOrder
        "Get-ACMCertificateList/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.CertificateManager.ValidationMethod
        "New-ACMCertificate/ValidationMethod"
        {
            $v = "DNS","EMAIL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ACM_map = @{
    "KeyAlgorithm"=@("New-ACMCertificate")
    "Options_CertificateTransparencyLoggingPreference"=@("New-ACMCertificate","Update-ACMCertificateOption")
    "SortBy"=@("Get-ACMCertificateList")
    "SortOrder"=@("Get-ACMCertificateList")
    "ValidationMethod"=@("New-ACMCertificate")
}

_awsArgumentCompleterRegistration $ACM_Completers $ACM_map

$ACM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ACM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ACM_SelectMap = @{
    "Select"=@("Add-ACMCertificateTag",
               "Remove-ACMCertificate",
               "Get-ACMCertificateDetail",
               "Export-ACMCertificate",
               "Get-ACMAccountConfiguration",
               "Get-ACMCertificate",
               "Import-ACMCertificate",
               "Get-ACMCertificateList",
               "Get-ACMCertificateTagList",
               "Write-ACMAccountConfiguration",
               "Remove-ACMCertificateTag",
               "Invoke-ACMCertificateRenewal",
               "New-ACMCertificate",
               "Send-ACMValidationEmail",
               "Update-ACMCertificateOption")
}

_awsArgumentCompleterRegistration $ACM_SelectCompleters $ACM_SelectMap
# Argument completions for service AWS Certificate Manager Private Certificate Authority


$PCA_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ACMPCA.AuditReportResponseFormat
        "New-PCACertificateAuthorityAuditReport/AuditReportResponseFormat"
        {
            $v = "CSV","JSON"
            break
        }

        # Amazon.ACMPCA.CertificateAuthorityStatus
        "Update-PCACertificateAuthority/Status"
        {
            $v = "ACTIVE","CREATING","DELETED","DISABLED","EXPIRED","FAILED","PENDING_CERTIFICATE"
            break
        }

        # Amazon.ACMPCA.CertificateAuthorityType
        "New-PCACertificateAuthority/CertificateAuthorityType"
        {
            $v = "ROOT","SUBORDINATE"
            break
        }

        # Amazon.ACMPCA.CertificateAuthorityUsageMode
        "New-PCACertificateAuthority/UsageMode"
        {
            $v = "GENERAL_PURPOSE","SHORT_LIVED_CERTIFICATE"
            break
        }

        # Amazon.ACMPCA.KeyStorageSecurityStandard
        "New-PCACertificateAuthority/KeyStorageSecurityStandard"
        {
            $v = "CCPC_LEVEL_1_OR_HIGHER","FIPS_140_2_LEVEL_2_OR_HIGHER","FIPS_140_2_LEVEL_3_OR_HIGHER"
            break
        }

        # Amazon.ACMPCA.ResourceOwner
        "Get-PCACertificateAuthorityList/ResourceOwner"
        {
            $v = "OTHER_ACCOUNTS","SELF"
            break
        }

        # Amazon.ACMPCA.RevocationReason
        "Revoke-PCACertificate/RevocationReason"
        {
            $v = "AFFILIATION_CHANGED","A_A_COMPROMISE","CERTIFICATE_AUTHORITY_COMPROMISE","CESSATION_OF_OPERATION","KEY_COMPROMISE","PRIVILEGE_WITHDRAWN","SUPERSEDED","UNSPECIFIED"
            break
        }

        # Amazon.ACMPCA.SigningAlgorithm
        "New-PCACertificate/SigningAlgorithm"
        {
            $v = "SHA256WITHECDSA","SHA256WITHRSA","SHA384WITHECDSA","SHA384WITHRSA","SHA512WITHECDSA","SHA512WITHRSA","SM3WITHSM2"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PCA_map = @{
    "AuditReportResponseFormat"=@("New-PCACertificateAuthorityAuditReport")
    "CertificateAuthorityType"=@("New-PCACertificateAuthority")
    "KeyStorageSecurityStandard"=@("New-PCACertificateAuthority")
    "ResourceOwner"=@("Get-PCACertificateAuthorityList")
    "RevocationReason"=@("Revoke-PCACertificate")
    "SigningAlgorithm"=@("New-PCACertificate")
    "Status"=@("Update-PCACertificateAuthority")
    "UsageMode"=@("New-PCACertificateAuthority")
}

_awsArgumentCompleterRegistration $PCA_Completers $PCA_map

$PCA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PCA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PCA_SelectMap = @{
    "Select"=@("New-PCACertificateAuthority",
               "New-PCACertificateAuthorityAuditReport",
               "New-PCAPermission",
               "Remove-PCACertificateAuthority",
               "Remove-PCAPermission",
               "Remove-PCAPolicy",
               "Get-PCACertificateAuthority",
               "Get-PCACertificateAuthorityAuditReport",
               "Get-PCACertificate",
               "Get-PCACertificateAuthorityCertificate",
               "Get-PCACertificateAuthorityCsr",
               "Get-PCAPolicy",
               "Import-PCACertificateAuthorityCertificate",
               "New-PCACertificate",
               "Get-PCACertificateAuthorityList",
               "Get-PCAPermissionList",
               "Get-PCACertificateAuthorityTagList",
               "Set-PCAPolicy",
               "Restore-PCACertificateAuthority",
               "Revoke-PCACertificate",
               "Add-PCACertificateAuthorityTag",
               "Remove-PCACertificateAuthorityTag",
               "Update-PCACertificateAuthority")
}

_awsArgumentCompleterRegistration $PCA_SelectCompleters $PCA_SelectMap
# Argument completions for service AWS Amplify


$AMP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Amplify.CacheConfigType
        {
            ($_ -eq "New-AMPApp/CacheConfig_Type") -Or
            ($_ -eq "Update-AMPApp/CacheConfig_Type")
        }
        {
            $v = "AMPLIFY_MANAGED","AMPLIFY_MANAGED_NO_COOKIES"
            break
        }

        # Amazon.Amplify.CertificateType
        {
            ($_ -eq "New-AMPDomainAssociation/CertificateSettings_Type") -Or
            ($_ -eq "Update-AMPDomainAssociation/CertificateSettings_Type")
        }
        {
            $v = "AMPLIFY_MANAGED","CUSTOM"
            break
        }

        # Amazon.Amplify.JobType
        "Start-AMPJob/JobType"
        {
            $v = "MANUAL","RELEASE","RETRY","WEB_HOOK"
            break
        }

        # Amazon.Amplify.Platform
        {
            ($_ -eq "New-AMPApp/Platform") -Or
            ($_ -eq "Update-AMPApp/Platform")
        }
        {
            $v = "WEB","WEB_COMPUTE","WEB_DYNAMIC"
            break
        }

        # Amazon.Amplify.SourceUrlType
        "Start-AMPDeployment/SourceUrlType"
        {
            $v = "BUCKET_PREFIX","ZIP"
            break
        }

        # Amazon.Amplify.Stage
        {
            ($_ -eq "New-AMPApp/AutoBranchCreationConfig_Stage") -Or
            ($_ -eq "Update-AMPApp/AutoBranchCreationConfig_Stage") -Or
            ($_ -eq "New-AMPBranch/Stage") -Or
            ($_ -eq "Update-AMPBranch/Stage")
        }
        {
            $v = "BETA","DEVELOPMENT","EXPERIMENTAL","PRODUCTION","PULL_REQUEST"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AMP_map = @{
    "AutoBranchCreationConfig_Stage"=@("New-AMPApp","Update-AMPApp")
    "CacheConfig_Type"=@("New-AMPApp","Update-AMPApp")
    "CertificateSettings_Type"=@("New-AMPDomainAssociation","Update-AMPDomainAssociation")
    "JobType"=@("Start-AMPJob")
    "Platform"=@("New-AMPApp","Update-AMPApp")
    "SourceUrlType"=@("Start-AMPDeployment")
    "Stage"=@("New-AMPBranch","Update-AMPBranch")
}

_awsArgumentCompleterRegistration $AMP_Completers $AMP_map

$AMP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AMP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AMP_SelectMap = @{
    "Select"=@("New-AMPApp",
               "New-AMPBackendEnvironment",
               "New-AMPBranch",
               "New-AMPDeployment",
               "New-AMPDomainAssociation",
               "New-AMPWebhook",
               "Remove-AMPApp",
               "Remove-AMPBackendEnvironment",
               "Remove-AMPBranch",
               "Remove-AMPDomainAssociation",
               "Remove-AMPJob",
               "Remove-AMPWebhook",
               "New-AMPAccessLog",
               "Get-AMPApp",
               "Get-AMPArtifactUrl",
               "Get-AMPBackendEnvironment",
               "Get-AMPBranch",
               "Get-AMPDomainAssociation",
               "Get-AMPJob",
               "Get-AMPWebhook",
               "Get-AMPAppList",
               "Get-AMPArtifactList",
               "Get-AMPBackendEnvironmentList",
               "Get-AMPBranchList",
               "Get-AMPDomainAssociationList",
               "Get-AMPJobList",
               "Get-AMPResourceTag",
               "Get-AMPWebhookList",
               "Start-AMPDeployment",
               "Start-AMPJob",
               "Stop-AMPJob",
               "Add-AMPResourceTag",
               "Remove-AMPResourceTag",
               "Update-AMPApp",
               "Update-AMPBranch",
               "Update-AMPDomainAssociation",
               "Update-AMPWebhook")
}

_awsArgumentCompleterRegistration $AMP_SelectCompleters $AMP_SelectMap
# Argument completions for service Amplify Backend


$AMPB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AmplifyBackend.AuthResources
        {
            ($_ -eq "New-AMPBBackendAuth/ResourceConfig_AuthResource") -Or
            ($_ -eq "Update-AMPBBackendAuth/ResourceConfig_AuthResource")
        }
        {
            $v = "IDENTITY_POOL_AND_USER_POOL","USER_POOL_ONLY"
            break
        }

        # Amazon.AmplifyBackend.DeliveryMethod
        {
            ($_ -eq "New-AMPBBackendAuth/ForgotPassword_DeliveryMethod") -Or
            ($_ -eq "Update-AMPBBackendAuth/ForgotPassword_DeliveryMethod") -Or
            ($_ -eq "New-AMPBBackendAuth/VerificationMessage_DeliveryMethod") -Or
            ($_ -eq "Update-AMPBBackendAuth/VerificationMessage_DeliveryMethod")
        }
        {
            $v = "EMAIL","SMS"
            break
        }

        # Amazon.AmplifyBackend.MFAMode
        {
            ($_ -eq "New-AMPBBackendAuth/Mfa_MFAMode") -Or
            ($_ -eq "Update-AMPBBackendAuth/Mfa_MFAMode")
        }
        {
            $v = "OFF","ON","OPTIONAL"
            break
        }

        # Amazon.AmplifyBackend.Mode
        {
            ($_ -eq "Get-AMPBBackendAPI/DefaultAuthType_Mode") -Or
            ($_ -eq "New-AMPBBackendAPI/DefaultAuthType_Mode") -Or
            ($_ -eq "Remove-AMPBBackendAPI/DefaultAuthType_Mode") -Or
            ($_ -eq "Update-AMPBBackendAPI/DefaultAuthType_Mode")
        }
        {
            $v = "AMAZON_COGNITO_USER_POOLS","API_KEY","AWS_IAM","OPENID_CONNECT"
            break
        }

        # Amazon.AmplifyBackend.OAuthGrantType
        {
            ($_ -eq "New-AMPBBackendAuth/OAuth_OAuthGrantType") -Or
            ($_ -eq "Update-AMPBBackendAuth/OAuth_OAuthGrantType")
        }
        {
            $v = "CODE","IMPLICIT"
            break
        }

        # Amazon.AmplifyBackend.ResolutionStrategy
        {
            ($_ -eq "Get-AMPBBackendAPI/ConflictResolution_ResolutionStrategy") -Or
            ($_ -eq "New-AMPBBackendAPI/ConflictResolution_ResolutionStrategy") -Or
            ($_ -eq "Remove-AMPBBackendAPI/ConflictResolution_ResolutionStrategy") -Or
            ($_ -eq "Update-AMPBBackendAPI/ConflictResolution_ResolutionStrategy")
        }
        {
            $v = "AUTOMERGE","LAMBDA","NONE","OPTIMISTIC_CONCURRENCY"
            break
        }

        # Amazon.AmplifyBackend.Service
        {
            ($_ -eq "New-AMPBBackendAuth/ResourceConfig_Service") -Or
            ($_ -eq "Update-AMPBBackendAuth/ResourceConfig_Service")
        }
        {
            $v = "COGNITO"
            break
        }

        # Amazon.AmplifyBackend.ServiceName
        {
            ($_ -eq "New-AMPBBackendStorage/ResourceConfig_ServiceName") -Or
            ($_ -eq "Update-AMPBBackendStorage/ResourceConfig_ServiceName") -Or
            ($_ -eq "Import-AMPBBackendStorage/ServiceName") -Or
            ($_ -eq "Remove-AMPBBackendStorage/ServiceName")
        }
        {
            $v = "S3"
            break
        }

        # Amazon.AmplifyBackend.SignInMethod
        "New-AMPBBackendAuth/UserPoolConfigs_SignInMethod"
        {
            $v = "EMAIL","EMAIL_AND_PHONE_NUMBER","PHONE_NUMBER","USERNAME"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AMPB_map = @{
    "ConflictResolution_ResolutionStrategy"=@("Get-AMPBBackendAPI","New-AMPBBackendAPI","Remove-AMPBBackendAPI","Update-AMPBBackendAPI")
    "DefaultAuthType_Mode"=@("Get-AMPBBackendAPI","New-AMPBBackendAPI","Remove-AMPBBackendAPI","Update-AMPBBackendAPI")
    "ForgotPassword_DeliveryMethod"=@("New-AMPBBackendAuth","Update-AMPBBackendAuth")
    "Mfa_MFAMode"=@("New-AMPBBackendAuth","Update-AMPBBackendAuth")
    "OAuth_OAuthGrantType"=@("New-AMPBBackendAuth","Update-AMPBBackendAuth")
    "ResourceConfig_AuthResource"=@("New-AMPBBackendAuth","Update-AMPBBackendAuth")
    "ResourceConfig_Service"=@("New-AMPBBackendAuth","Update-AMPBBackendAuth")
    "ResourceConfig_ServiceName"=@("New-AMPBBackendStorage","Update-AMPBBackendStorage")
    "ServiceName"=@("Import-AMPBBackendStorage","Remove-AMPBBackendStorage")
    "UserPoolConfigs_SignInMethod"=@("New-AMPBBackendAuth")
    "VerificationMessage_DeliveryMethod"=@("New-AMPBBackendAuth","Update-AMPBBackendAuth")
}

_awsArgumentCompleterRegistration $AMPB_Completers $AMPB_map

$AMPB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AMPB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AMPB_SelectMap = @{
    "Select"=@("Copy-AMPBBackend",
               "New-AMPBBackend",
               "New-AMPBBackendAPI",
               "New-AMPBBackendAuth",
               "New-AMPBBackendConfig",
               "New-AMPBBackendStorage",
               "New-AMPBToken",
               "Remove-AMPBBackend",
               "Remove-AMPBBackendAPI",
               "Remove-AMPBBackendAuth",
               "Remove-AMPBBackendStorage",
               "Remove-AMPBToken",
               "New-AMPBBackendAPIModel",
               "Get-AMPBBackend",
               "Get-AMPBBackendAPI",
               "Get-AMPBBackendAPIModel",
               "Get-AMPBBackendAuth",
               "Get-AMPBBackendJob",
               "Get-AMPBBackendStorage",
               "Get-AMPBToken",
               "Import-AMPBBackendAuth",
               "Import-AMPBBackendStorage",
               "Get-AMPBBackendJobList",
               "Get-AMPBS3BucketList",
               "Remove-AMPBAllBackend",
               "Remove-AMPBBackendConfig",
               "Update-AMPBBackendAPI",
               "Update-AMPBBackendAuth",
               "Update-AMPBBackendConfig",
               "Update-AMPBBackendJob",
               "Update-AMPBBackendStorage")
}

_awsArgumentCompleterRegistration $AMPB_SelectCompleters $AMPB_SelectMap
# Argument completions for service AWS Amplify UI Builder


$AMPUI_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AmplifyUIBuilder.CodegenJobGenericDataSourceType
        "New-AMPUICodegenJob/GenericDataSchema_DataSourceType"
        {
            $v = "DataStore"
            break
        }

        # Amazon.AmplifyUIBuilder.FixedPosition
        {
            ($_ -eq "New-AMPUIForm/FormToCreate_Cta_Cancel_Position_Fixed") -Or
            ($_ -eq "New-AMPUIForm/FormToCreate_Cta_Clear_Position_Fixed") -Or
            ($_ -eq "New-AMPUIForm/FormToCreate_Cta_Submit_Position_Fixed") -Or
            ($_ -eq "Update-AMPUIForm/UpdatedForm_Cta_Cancel_Position_Fixed") -Or
            ($_ -eq "Update-AMPUIForm/UpdatedForm_Cta_Clear_Position_Fixed") -Or
            ($_ -eq "Update-AMPUIForm/UpdatedForm_Cta_Submit_Position_Fixed")
        }
        {
            $v = "first"
            break
        }

        # Amazon.AmplifyUIBuilder.FormActionType
        {
            ($_ -eq "New-AMPUIForm/FormToCreate_FormActionType") -Or
            ($_ -eq "Update-AMPUIForm/UpdatedForm_FormActionType")
        }
        {
            $v = "create","update"
            break
        }

        # Amazon.AmplifyUIBuilder.FormButtonsPosition
        {
            ($_ -eq "New-AMPUIForm/Cta_Position") -Or
            ($_ -eq "Update-AMPUIForm/Cta_Position")
        }
        {
            $v = "bottom","top","top_and_bottom"
            break
        }

        # Amazon.AmplifyUIBuilder.FormDataSourceType
        {
            ($_ -eq "New-AMPUIForm/DataType_DataSourceType") -Or
            ($_ -eq "Update-AMPUIForm/DataType_DataSourceType")
        }
        {
            $v = "Custom","DataStore"
            break
        }

        # Amazon.AmplifyUIBuilder.JSModule
        "New-AMPUICodegenJob/React_Module"
        {
            $v = "es2020","esnext"
            break
        }

        # Amazon.AmplifyUIBuilder.JSScript
        "New-AMPUICodegenJob/React_Script"
        {
            $v = "js","jsx","tsx"
            break
        }

        # Amazon.AmplifyUIBuilder.JSTarget
        "New-AMPUICodegenJob/React_Target"
        {
            $v = "es2015","es2020"
            break
        }

        # Amazon.AmplifyUIBuilder.LabelDecorator
        {
            ($_ -eq "New-AMPUIForm/FormToCreate_LabelDecorator") -Or
            ($_ -eq "Update-AMPUIForm/UpdatedForm_LabelDecorator")
        }
        {
            $v = "none","optional","required"
            break
        }

        # Amazon.AmplifyUIBuilder.TokenProviders
        {
            ($_ -eq "Convert-AMPUICodeForToken/Provider") -Or
            ($_ -eq "Update-AMPUIToken/Provider")
        }
        {
            $v = "figma"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AMPUI_map = @{
    "Cta_Position"=@("New-AMPUIForm","Update-AMPUIForm")
    "DataType_DataSourceType"=@("New-AMPUIForm","Update-AMPUIForm")
    "FormToCreate_Cta_Cancel_Position_Fixed"=@("New-AMPUIForm")
    "FormToCreate_Cta_Clear_Position_Fixed"=@("New-AMPUIForm")
    "FormToCreate_Cta_Submit_Position_Fixed"=@("New-AMPUIForm")
    "FormToCreate_FormActionType"=@("New-AMPUIForm")
    "FormToCreate_LabelDecorator"=@("New-AMPUIForm")
    "GenericDataSchema_DataSourceType"=@("New-AMPUICodegenJob")
    "Provider"=@("Convert-AMPUICodeForToken","Update-AMPUIToken")
    "React_Module"=@("New-AMPUICodegenJob")
    "React_Script"=@("New-AMPUICodegenJob")
    "React_Target"=@("New-AMPUICodegenJob")
    "UpdatedForm_Cta_Cancel_Position_Fixed"=@("Update-AMPUIForm")
    "UpdatedForm_Cta_Clear_Position_Fixed"=@("Update-AMPUIForm")
    "UpdatedForm_Cta_Submit_Position_Fixed"=@("Update-AMPUIForm")
    "UpdatedForm_FormActionType"=@("Update-AMPUIForm")
    "UpdatedForm_LabelDecorator"=@("Update-AMPUIForm")
}

_awsArgumentCompleterRegistration $AMPUI_Completers $AMPUI_map

$AMPUI_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AMPUI.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AMPUI_SelectMap = @{
    "Select"=@("New-AMPUIComponent",
               "New-AMPUIForm",
               "New-AMPUITheme",
               "Remove-AMPUIComponent",
               "Remove-AMPUIForm",
               "Remove-AMPUITheme",
               "Convert-AMPUICodeForToken",
               "Export-AMPUIComponent",
               "Export-AMPUIForm",
               "Export-AMPUITheme",
               "Get-AMPUICodegenJob",
               "Get-AMPUIComponent",
               "Get-AMPUIForm",
               "Get-AMPUIMetadata",
               "Get-AMPUITheme",
               "Get-AMPUICodegenJobList",
               "Get-AMPUIComponentList",
               "Get-AMPUIFormList",
               "Get-AMPUIResourceTag",
               "Get-AMPUIThemeList",
               "Write-AMPUIMetadataFlag",
               "Update-AMPUIToken",
               "New-AMPUICodegenJob",
               "Add-AMPUIResourceTag",
               "Remove-AMPUIResourceTag",
               "Update-AMPUIComponent",
               "Update-AMPUIForm",
               "Update-AMPUITheme")
}

_awsArgumentCompleterRegistration $AMPUI_SelectCompleters $AMPUI_SelectMap
# Argument completions for service Amazon API Gateway


$AG_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.APIGateway.ApiKeysFormat
        "Import-AGApiKey/Format"
        {
            $v = "csv"
            break
        }

        # Amazon.APIGateway.ApiKeySourceType
        "New-AGRestApi/ApiKeySource"
        {
            $v = "AUTHORIZER","HEADER"
            break
        }

        # Amazon.APIGateway.AuthorizerType
        "New-AGAuthorizer/Type"
        {
            $v = "COGNITO_USER_POOLS","REQUEST","TOKEN"
            break
        }

        # Amazon.APIGateway.CacheClusterSize
        {
            ($_ -eq "New-AGDeployment/CacheClusterSize") -Or
            ($_ -eq "New-AGStage/CacheClusterSize")
        }
        {
            $v = "0.5","1.6","118","13.5","237","28.4","58.2","6.1"
            break
        }

        # Amazon.APIGateway.ConnectionType
        "Write-AGIntegration/ConnectionType"
        {
            $v = "INTERNET","VPC_LINK"
            break
        }

        # Amazon.APIGateway.ContentHandlingStrategy
        {
            ($_ -eq "Write-AGIntegration/ContentHandling") -Or
            ($_ -eq "Write-AGIntegrationResponse/ContentHandling")
        }
        {
            $v = "CONVERT_TO_BINARY","CONVERT_TO_TEXT"
            break
        }

        # Amazon.APIGateway.DocumentationPartType
        {
            ($_ -eq "New-AGDocumentationPart/Location_Type") -Or
            ($_ -eq "Get-AGDocumentationPartList/Type")
        }
        {
            $v = "API","AUTHORIZER","METHOD","MODEL","PATH_PARAMETER","QUERY_PARAMETER","REQUEST_BODY","REQUEST_HEADER","RESOURCE","RESPONSE","RESPONSE_BODY","RESPONSE_HEADER"
            break
        }

        # Amazon.APIGateway.GatewayResponseType
        {
            ($_ -eq "Get-AGGatewayResponse/ResponseType") -Or
            ($_ -eq "Remove-AGGatewayResponse/ResponseType") -Or
            ($_ -eq "Update-AGGatewayResponse/ResponseType") -Or
            ($_ -eq "Write-AGGatewayResponse/ResponseType")
        }
        {
            $v = "ACCESS_DENIED","API_CONFIGURATION_ERROR","AUTHORIZER_CONFIGURATION_ERROR","AUTHORIZER_FAILURE","BAD_REQUEST_BODY","BAD_REQUEST_PARAMETERS","DEFAULT_4XX","DEFAULT_5XX","EXPIRED_TOKEN","INTEGRATION_FAILURE","INTEGRATION_TIMEOUT","INVALID_API_KEY","INVALID_SIGNATURE","MISSING_AUTHENTICATION_TOKEN","QUOTA_EXCEEDED","REQUEST_TOO_LARGE","RESOURCE_NOT_FOUND","THROTTLED","UNAUTHORIZED","UNSUPPORTED_MEDIA_TYPE","WAF_FILTERED"
            break
        }

        # Amazon.APIGateway.IntegrationType
        "Write-AGIntegration/Type"
        {
            $v = "AWS","AWS_PROXY","HTTP","HTTP_PROXY","MOCK"
            break
        }

        # Amazon.APIGateway.LocationStatusType
        "Get-AGDocumentationPartList/LocationStatus"
        {
            $v = "DOCUMENTED","UNDOCUMENTED"
            break
        }

        # Amazon.APIGateway.PutMode
        {
            ($_ -eq "Import-AGDocumentationPartList/Mode") -Or
            ($_ -eq "Write-AGRestApi/Mode")
        }
        {
            $v = "merge","overwrite"
            break
        }

        # Amazon.APIGateway.QuotaPeriodType
        "New-AGUsagePlan/Quota_Period"
        {
            $v = "DAY","MONTH","WEEK"
            break
        }

        # Amazon.APIGateway.SecurityPolicy
        "New-AGDomainName/SecurityPolicy"
        {
            $v = "TLS_1_0","TLS_1_2"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AG_map = @{
    "ApiKeySource"=@("New-AGRestApi")
    "CacheClusterSize"=@("New-AGDeployment","New-AGStage")
    "ConnectionType"=@("Write-AGIntegration")
    "ContentHandling"=@("Write-AGIntegration","Write-AGIntegrationResponse")
    "Format"=@("Import-AGApiKey")
    "Location_Type"=@("New-AGDocumentationPart")
    "LocationStatus"=@("Get-AGDocumentationPartList")
    "Mode"=@("Import-AGDocumentationPartList","Write-AGRestApi")
    "Quota_Period"=@("New-AGUsagePlan")
    "ResponseType"=@("Get-AGGatewayResponse","Remove-AGGatewayResponse","Update-AGGatewayResponse","Write-AGGatewayResponse")
    "SecurityPolicy"=@("New-AGDomainName")
    "Type"=@("Get-AGDocumentationPartList","New-AGAuthorizer","Write-AGIntegration")
}

_awsArgumentCompleterRegistration $AG_Completers $AG_map

$AG_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AG.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AG_SelectMap = @{
    "Select"=@("New-AGApiKey",
               "New-AGAuthorizer",
               "New-AGBasePathMapping",
               "New-AGDeployment",
               "New-AGDocumentationPart",
               "New-AGDocumentationVersion",
               "New-AGDomainName",
               "New-AGModel",
               "New-AGRequestValidator",
               "New-AGResource",
               "New-AGRestApi",
               "New-AGStage",
               "New-AGUsagePlan",
               "New-AGUsagePlanKey",
               "New-AGVpcLink",
               "Remove-AGApiKey",
               "Remove-AGAuthorizer",
               "Remove-AGBasePathMapping",
               "Remove-AGClientCertificate",
               "Remove-AGDeployment",
               "Remove-AGDocumentationPart",
               "Remove-AGDocumentationVersion",
               "Remove-AGDomainName",
               "Remove-AGGatewayResponse",
               "Remove-AGIntegration",
               "Remove-AGIntegrationResponse",
               "Remove-AGMethod",
               "Remove-AGMethodResponse",
               "Remove-AGModel",
               "Remove-AGRequestValidator",
               "Remove-AGResource",
               "Remove-AGRestApi",
               "Remove-AGStage",
               "Remove-AGUsagePlan",
               "Remove-AGUsagePlanKey",
               "Remove-AGVpcLink",
               "Clear-AGStageAuthorizersCache",
               "Clear-AGStageCache",
               "New-AGClientCertificate",
               "Get-AGAccount",
               "Get-AGApiKey",
               "Get-AGApiKeyList",
               "Get-AGAuthorizer",
               "Get-AGAuthorizerList",
               "Get-AGBasePathMapping",
               "Get-AGBasePathMappingList",
               "Get-AGClientCertificate",
               "Get-AGClientCertificateList",
               "Get-AGDeployment",
               "Get-AGDeploymentList",
               "Get-AGDocumentationPart",
               "Get-AGDocumentationPartList",
               "Get-AGDocumentationVersion",
               "Get-AGDocumentationVersionList",
               "Get-AGDomainName",
               "Get-AGDomainNameList",
               "Get-AGExport",
               "Get-AGGatewayResponse",
               "Get-AGGatewayResponseList",
               "Get-AGIntegration",
               "Get-AGIntegrationResponse",
               "Get-AGMethod",
               "Get-AGMethodResponse",
               "Get-AGModel",
               "Get-AGModelList",
               "Get-AGModelTemplate",
               "Get-AGRequestValidator",
               "Get-AGValidatorList",
               "Get-AGResource",
               "Get-AGResourceList",
               "Get-AGRestApi",
               "Get-AGRestApiList",
               "Get-AGSdk",
               "Get-AGSdkType",
               "Get-AGSdkTypeList",
               "Get-AGStage",
               "Get-AGStageList",
               "Get-AGResourceTag",
               "Get-AGUsage",
               "Get-AGUsagePlan",
               "Get-AGUsagePlanKey",
               "Get-AGUsagePlanKeyList",
               "Get-AGUsagePlanList",
               "Get-AGVpcLink",
               "Get-AGVpcLinkList",
               "Import-AGApiKey",
               "Import-AGDocumentationPartList",
               "Import-AGRestApi",
               "Write-AGGatewayResponse",
               "Write-AGIntegration",
               "Write-AGIntegrationResponse",
               "Write-AGMethod",
               "Write-AGMethodResponse",
               "Write-AGRestApi",
               "Add-AGResourceTag",
               "Test-AGInvokeAuthorizer",
               "Test-AGInvokeMethod",
               "Remove-AGResourceTag",
               "Update-AGAccount",
               "Update-AGApiKey",
               "Update-AGAuthorizer",
               "Update-AGBasePathMapping",
               "Update-AGClientCertificate",
               "Update-AGDeployment",
               "Update-AGDocumentationPart",
               "Update-AGDocumentationVersion",
               "Update-AGDomainName",
               "Update-AGGatewayResponse",
               "Update-AGIntegration",
               "Update-AGIntegrationResponse",
               "Update-AGMethod",
               "Update-AGMethodResponse",
               "Update-AGModel",
               "Update-AGRequestValidator",
               "Update-AGResource",
               "Update-AGRestApi",
               "Update-AGStage",
               "Update-AGUsage",
               "Update-AGUsagePlan",
               "Update-AGVpcLink")
}

_awsArgumentCompleterRegistration $AG_SelectCompleters $AG_SelectMap
# Argument completions for service Amazon API Gateway Management API


$AGM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AGM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AGM_SelectMap = @{
    "Select"=@("Remove-AGMConnection",
               "Get-AGMConnection",
               "Send-AGMDataToConnection")
}

_awsArgumentCompleterRegistration $AGM_SelectCompleters $AGM_SelectMap
# Argument completions for service Amazon API Gateway V2


$AG2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ApiGatewayV2.AuthorizationType
        {
            ($_ -eq "New-AG2Route/AuthorizationType") -Or
            ($_ -eq "Update-AG2Route/AuthorizationType")
        }
        {
            $v = "AWS_IAM","CUSTOM","JWT","NONE"
            break
        }

        # Amazon.ApiGatewayV2.AuthorizerType
        {
            ($_ -eq "New-AG2Authorizer/AuthorizerType") -Or
            ($_ -eq "Update-AG2Authorizer/AuthorizerType")
        }
        {
            $v = "JWT","REQUEST"
            break
        }

        # Amazon.ApiGatewayV2.ConnectionType
        {
            ($_ -eq "New-AG2Integration/ConnectionType") -Or
            ($_ -eq "Update-AG2Integration/ConnectionType")
        }
        {
            $v = "INTERNET","VPC_LINK"
            break
        }

        # Amazon.ApiGatewayV2.ContentHandlingStrategy
        {
            ($_ -eq "New-AG2Integration/ContentHandlingStrategy") -Or
            ($_ -eq "New-AG2IntegrationResponse/ContentHandlingStrategy") -Or
            ($_ -eq "Update-AG2Integration/ContentHandlingStrategy") -Or
            ($_ -eq "Update-AG2IntegrationResponse/ContentHandlingStrategy")
        }
        {
            $v = "CONVERT_TO_BINARY","CONVERT_TO_TEXT"
            break
        }

        # Amazon.ApiGatewayV2.IntegrationType
        {
            ($_ -eq "New-AG2Integration/IntegrationType") -Or
            ($_ -eq "Update-AG2Integration/IntegrationType")
        }
        {
            $v = "AWS","AWS_PROXY","HTTP","HTTP_PROXY","MOCK"
            break
        }

        # Amazon.ApiGatewayV2.LoggingLevel
        {
            ($_ -eq "New-AG2Stage/DefaultRouteSettings_LoggingLevel") -Or
            ($_ -eq "Update-AG2Stage/DefaultRouteSettings_LoggingLevel")
        }
        {
            $v = "ERROR","INFO","OFF"
            break
        }

        # Amazon.ApiGatewayV2.PassthroughBehavior
        {
            ($_ -eq "New-AG2Integration/PassthroughBehavior") -Or
            ($_ -eq "Update-AG2Integration/PassthroughBehavior")
        }
        {
            $v = "NEVER","WHEN_NO_MATCH","WHEN_NO_TEMPLATES"
            break
        }

        # Amazon.ApiGatewayV2.ProtocolType
        "New-AG2Api/ProtocolType"
        {
            $v = "HTTP","WEBSOCKET"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AG2_map = @{
    "AuthorizationType"=@("New-AG2Route","Update-AG2Route")
    "AuthorizerType"=@("New-AG2Authorizer","Update-AG2Authorizer")
    "ConnectionType"=@("New-AG2Integration","Update-AG2Integration")
    "ContentHandlingStrategy"=@("New-AG2Integration","New-AG2IntegrationResponse","Update-AG2Integration","Update-AG2IntegrationResponse")
    "DefaultRouteSettings_LoggingLevel"=@("New-AG2Stage","Update-AG2Stage")
    "IntegrationType"=@("New-AG2Integration","Update-AG2Integration")
    "PassthroughBehavior"=@("New-AG2Integration","Update-AG2Integration")
    "ProtocolType"=@("New-AG2Api")
}

_awsArgumentCompleterRegistration $AG2_Completers $AG2_map

$AG2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AG2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AG2_SelectMap = @{
    "Select"=@("New-AG2Api",
               "New-AG2ApiMapping",
               "New-AG2Authorizer",
               "New-AG2Deployment",
               "New-AG2DomainName",
               "New-AG2Integration",
               "New-AG2IntegrationResponse",
               "New-AG2Model",
               "New-AG2Route",
               "New-AG2RouteResponse",
               "New-AG2Stage",
               "New-AG2VpcLink",
               "Remove-AG2AccessLogSetting",
               "Remove-AG2Api",
               "Remove-AG2ApiMapping",
               "Remove-AG2Authorizer",
               "Remove-AG2CorsConfiguration",
               "Remove-AG2Deployment",
               "Remove-AG2DomainName",
               "Remove-AG2Integration",
               "Remove-AG2IntegrationResponse",
               "Remove-AG2Model",
               "Remove-AG2Route",
               "Remove-AG2RouteRequestParameter",
               "Remove-AG2RouteResponse",
               "Remove-AG2RouteSetting",
               "Remove-AG2Stage",
               "Remove-AG2VpcLink",
               "Export-AG2Api",
               "Get-AG2Api",
               "Get-AG2ApiMapping",
               "Get-AG2ApiMappingList",
               "Get-AG2ApiList",
               "Get-AG2Authorizer",
               "Get-AG2AuthorizerList",
               "Get-AG2Deployment",
               "Get-AG2DeploymentList",
               "Get-AG2DomainName",
               "Get-AG2DomainNameList",
               "Get-AG2Integration",
               "Get-AG2IntegrationResponse",
               "Get-AG2IntegrationResponseList",
               "Get-AG2IntegrationList",
               "Get-AG2Model",
               "Get-AG2ModelList",
               "Get-AG2ModelTemplate",
               "Get-AG2Route",
               "Get-AG2RouteResponse",
               "Get-AG2RouteResponseList",
               "Get-AG2RouteList",
               "Get-AG2Stage",
               "Get-AG2StageList",
               "Get-AG2Tag",
               "Get-AG2VpcLink",
               "Get-AG2VpcLinkList",
               "Import-AG2Api",
               "Update-AG2ApiImport",
               "Reset-AG2AuthorizersCache",
               "Add-AG2ResourceTag",
               "Remove-AG2ResourceTag",
               "Update-AG2Api",
               "Update-AG2ApiMapping",
               "Update-AG2Authorizer",
               "Update-AG2Deployment",
               "Update-AG2DomainName",
               "Update-AG2Integration",
               "Update-AG2IntegrationResponse",
               "Update-AG2Model",
               "Update-AG2Route",
               "Update-AG2RouteResponse",
               "Update-AG2Stage",
               "Update-AG2VpcLink")
}

_awsArgumentCompleterRegistration $AG2_SelectCompleters $AG2_SelectMap
# Argument completions for service AWS AppConfig


$APPC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AppConfig.DeletionProtectionCheck
        {
            ($_ -eq "Remove-APPCConfigurationProfile/DeletionProtectionCheck") -Or
            ($_ -eq "Remove-APPCEnvironment/DeletionProtectionCheck")
        }
        {
            $v = "ACCOUNT_DEFAULT","APPLY","BYPASS"
            break
        }

        # Amazon.AppConfig.GrowthType
        {
            ($_ -eq "New-APPCDeploymentStrategy/GrowthType") -Or
            ($_ -eq "Update-APPCDeploymentStrategy/GrowthType")
        }
        {
            $v = "EXPONENTIAL","LINEAR"
            break
        }

        # Amazon.AppConfig.ReplicateTo
        "New-APPCDeploymentStrategy/ReplicateTo"
        {
            $v = "NONE","SSM_DOCUMENT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$APPC_map = @{
    "DeletionProtectionCheck"=@("Remove-APPCConfigurationProfile","Remove-APPCEnvironment")
    "GrowthType"=@("New-APPCDeploymentStrategy","Update-APPCDeploymentStrategy")
    "ReplicateTo"=@("New-APPCDeploymentStrategy")
}

_awsArgumentCompleterRegistration $APPC_Completers $APPC_map

$APPC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.APPC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$APPC_SelectMap = @{
    "Select"=@("New-APPCApplication",
               "New-APPCConfigurationProfile",
               "New-APPCDeploymentStrategy",
               "New-APPCEnvironment",
               "New-APPCExtension",
               "New-APPCExtensionAssociation",
               "New-APPCHostedConfigurationVersion",
               "Remove-APPCApplication",
               "Remove-APPCConfigurationProfile",
               "Remove-APPCDeploymentStrategy",
               "Remove-APPCEnvironment",
               "Remove-APPCExtension",
               "Remove-APPCExtensionAssociation",
               "Remove-APPCHostedConfigurationVersion",
               "Get-APPCAccountSetting",
               "Get-APPCApplication",
               "Get-APPCConfiguration",
               "Get-APPCConfigurationProfile",
               "Get-APPCDeployment",
               "Get-APPCDeploymentStrategy",
               "Get-APPCEnvironment",
               "Get-APPCExtension",
               "Get-APPCExtensionAssociation",
               "Get-APPCHostedConfigurationVersion",
               "Get-APPCApplicationList",
               "Get-APPCConfigurationProfileList",
               "Get-APPCDeploymentList",
               "Get-APPCDeploymentStrategyList",
               "Get-APPCEnvironmentList",
               "Get-APPCExtensionAssociationList",
               "Get-APPCExtensionList",
               "Get-APPCHostedConfigurationVersionList",
               "Get-APPCResourceTag",
               "Start-APPCDeployment",
               "Stop-APPCDeployment",
               "Add-APPCResourceTag",
               "Remove-APPCResourceTag",
               "Update-APPCAccountSetting",
               "Update-APPCApplication",
               "Update-APPCConfigurationProfile",
               "Update-APPCDeploymentStrategy",
               "Update-APPCEnvironment",
               "Update-APPCExtension",
               "Update-APPCExtensionAssociation",
               "Test-APPCConfigurationValidity")
}

_awsArgumentCompleterRegistration $APPC_SelectCompleters $APPC_SelectMap
# Argument completions for service AWS AppConfig Data


$ACD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ACD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ACD_SelectMap = @{
    "Select"=@("Get-ACDLatestConfiguration",
               "Start-ACDConfigurationSession")
}

_awsArgumentCompleterRegistration $ACD_SelectCompleters $ACD_SelectMap
# Argument completions for service Amazon Web Services AppFabric


$AFAB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AppFabric.AuthType
        "New-AFABAppAuthorization/AuthType"
        {
            $v = "apiKey","oauth2"
            break
        }

        # Amazon.AppFabric.Format
        "New-AFABIngestionDestination/AuditLog_Format"
        {
            $v = "json","parquet"
            break
        }

        # Amazon.AppFabric.IngestionType
        "New-AFABIngestion/IngestionType"
        {
            $v = "auditLog"
            break
        }

        # Amazon.AppFabric.Schema
        "New-AFABIngestionDestination/AuditLog_Schema"
        {
            $v = "ocsf","raw"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AFAB_map = @{
    "AuditLog_Format"=@("New-AFABIngestionDestination")
    "AuditLog_Schema"=@("New-AFABIngestionDestination")
    "AuthType"=@("New-AFABAppAuthorization")
    "IngestionType"=@("New-AFABIngestion")
}

_awsArgumentCompleterRegistration $AFAB_Completers $AFAB_map

$AFAB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AFAB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AFAB_SelectMap = @{
    "Select"=@("Get-AFABUserAccessTaskList",
               "Connect-AFABAppAuthorization",
               "New-AFABAppAuthorization",
               "New-AFABAppBundle",
               "New-AFABIngestion",
               "New-AFABIngestionDestination",
               "Remove-AFABAppAuthorization",
               "Remove-AFABAppBundle",
               "Remove-AFABIngestion",
               "Remove-AFABIngestionDestination",
               "Get-AFABAppAuthorization",
               "Get-AFABAppBundle",
               "Get-AFABIngestion",
               "Get-AFABIngestionDestination",
               "Get-AFABAppAuthorizationList",
               "Get-AFABAppBundleList",
               "Get-AFABIngestionDestinationList",
               "Get-AFABIngestionList",
               "Get-AFABResourceTag",
               "Start-AFABIngestion",
               "Start-AFABUserAccessTask",
               "Stop-AFABIngestion",
               "Add-AFABResourceTag",
               "Remove-AFABResourceTag",
               "Update-AFABAppAuthorization",
               "Update-AFABIngestionDestination")
}

_awsArgumentCompleterRegistration $AFAB_SelectCompleters $AFAB_SelectMap
# Argument completions for service Amazon Appflow


$AF_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Appflow.ConnectionMode
        {
            ($_ -eq "New-AFConnectorProfile/ConnectionMode") -Or
            ($_ -eq "Update-AFConnectorProfile/ConnectionMode")
        }
        {
            $v = "Private","Public"
            break
        }

        # Amazon.Appflow.ConnectorProvisioningType
        "Register-AFConnector/ConnectorProvisioningType"
        {
            $v = "LAMBDA"
            break
        }

        # Amazon.Appflow.ConnectorType
        {
            ($_ -eq "Get-AFConnector/ConnectorType") -Or
            ($_ -eq "Get-AFConnectorEntity/ConnectorType") -Or
            ($_ -eq "Get-AFConnectorEntityList/ConnectorType") -Or
            ($_ -eq "Get-AFConnectorProfile/ConnectorType") -Or
            ($_ -eq "New-AFConnectorProfile/ConnectorType") -Or
            ($_ -eq "Reset-AFConnectorMetadataCache/ConnectorType") -Or
            ($_ -eq "New-AFFlow/SourceFlowConfig_ConnectorType") -Or
            ($_ -eq "Update-AFFlow/SourceFlowConfig_ConnectorType")
        }
        {
            $v = "Amplitude","CustomConnector","CustomerProfiles","Datadog","Dynatrace","EventBridge","Googleanalytics","Honeycode","Infornexus","LookoutMetrics","Marketo","Pardot","Redshift","S3","Salesforce","SAPOData","Servicenow","Singular","Slack","Snowflake","Trendmicro","Upsolver","Veeva","Zendesk"
            break
        }

        # Amazon.Appflow.DataPullMode
        {
            ($_ -eq "New-AFFlow/Scheduled_DataPullMode") -Or
            ($_ -eq "Update-AFFlow/Scheduled_DataPullMode")
        }
        {
            $v = "Complete","Incremental"
            break
        }

        # Amazon.Appflow.DataTransferApiType
        {
            ($_ -eq "New-AFFlow/DataTransferApi_Type") -Or
            ($_ -eq "Update-AFFlow/DataTransferApi_Type")
        }
        {
            $v = "ASYNC","AUTOMATIC","SYNC"
            break
        }

        # Amazon.Appflow.S3InputFileType
        {
            ($_ -eq "New-AFFlow/S3InputFormatConfig_S3InputFileType") -Or
            ($_ -eq "Update-AFFlow/S3InputFormatConfig_S3InputFileType")
        }
        {
            $v = "CSV","JSON"
            break
        }

        # Amazon.Appflow.SalesforceDataTransferApi
        {
            ($_ -eq "New-AFFlow/Salesforce_DataTransferApi") -Or
            ($_ -eq "Update-AFFlow/Salesforce_DataTransferApi")
        }
        {
            $v = "AUTOMATIC","BULKV2","REST_SYNC"
            break
        }

        # Amazon.Appflow.TriggerType
        {
            ($_ -eq "New-AFFlow/TriggerConfig_TriggerType") -Or
            ($_ -eq "Update-AFFlow/TriggerConfig_TriggerType")
        }
        {
            $v = "Event","OnDemand","Scheduled"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AF_map = @{
    "ConnectionMode"=@("New-AFConnectorProfile","Update-AFConnectorProfile")
    "ConnectorProvisioningType"=@("Register-AFConnector")
    "ConnectorType"=@("Get-AFConnector","Get-AFConnectorEntity","Get-AFConnectorEntityList","Get-AFConnectorProfile","New-AFConnectorProfile","Reset-AFConnectorMetadataCache")
    "DataTransferApi_Type"=@("New-AFFlow","Update-AFFlow")
    "S3InputFormatConfig_S3InputFileType"=@("New-AFFlow","Update-AFFlow")
    "Salesforce_DataTransferApi"=@("New-AFFlow","Update-AFFlow")
    "Scheduled_DataPullMode"=@("New-AFFlow","Update-AFFlow")
    "SourceFlowConfig_ConnectorType"=@("New-AFFlow","Update-AFFlow")
    "TriggerConfig_TriggerType"=@("New-AFFlow","Update-AFFlow")
}

_awsArgumentCompleterRegistration $AF_Completers $AF_map

$AF_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AF.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AF_SelectMap = @{
    "Select"=@("Stop-AFFlowExecution",
               "New-AFConnectorProfile",
               "New-AFFlow",
               "Remove-AFConnectorProfile",
               "Remove-AFFlow",
               "Get-AFConnector",
               "Get-AFConnectorEntity",
               "Get-AFConnectorProfile",
               "Get-AFConnectorConfigurationList",
               "Get-AFFlow",
               "Get-AFFlowExecutionRecord",
               "Get-AFConnectorEntityList",
               "Get-AFConnectorList",
               "Get-AFFlowList",
               "Get-AFResourceTag",
               "Register-AFConnector",
               "Reset-AFConnectorMetadataCache",
               "Start-AFFlow",
               "Stop-AFFlow",
               "Add-AFResourceTag",
               "Unregister-AFConnector",
               "Remove-AFResourceTag",
               "Update-AFConnectorProfile",
               "Update-AFConnectorRegistration",
               "Update-AFFlow")
}

_awsArgumentCompleterRegistration $AF_SelectCompleters $AF_SelectMap
# Argument completions for service Amazon AppIntegrations Service


$AIS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AppIntegrationsService.ExecutionMode
        {
            ($_ -eq "New-AISDataIntegrationAssociation/ExecutionConfiguration_ExecutionMode") -Or
            ($_ -eq "Update-AISDataIntegrationAssociation/ExecutionConfiguration_ExecutionMode")
        }
        {
            $v = "ON_DEMAND","SCHEDULED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AIS_map = @{
    "ExecutionConfiguration_ExecutionMode"=@("New-AISDataIntegrationAssociation","Update-AISDataIntegrationAssociation")
}

_awsArgumentCompleterRegistration $AIS_Completers $AIS_map

$AIS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AIS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AIS_SelectMap = @{
    "Select"=@("New-AISApplication",
               "New-AISDataIntegration",
               "New-AISDataIntegrationAssociation",
               "New-AISEventIntegration",
               "Remove-AISApplication",
               "Remove-AISDataIntegration",
               "Remove-AISEventIntegration",
               "Get-AISApplication",
               "Get-AISDataIntegration",
               "Get-AISEventIntegration",
               "Get-AISApplicationAssociationList",
               "Get-AISApplicationList",
               "Get-AISDataIntegrationAssociationList",
               "Get-AISDataIntegrationList",
               "Get-AISEventIntegrationAssociationList",
               "Get-AISEventIntegrationList",
               "Get-AISResourceTag",
               "Add-AISResourceTag",
               "Remove-AISResourceTag",
               "Update-AISApplication",
               "Update-AISDataIntegration",
               "Update-AISDataIntegrationAssociation",
               "Update-AISEventIntegration")
}

_awsArgumentCompleterRegistration $AIS_SelectCompleters $AIS_SelectMap
# Argument completions for service Application Auto Scaling


$AAS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ApplicationAutoScaling.AdjustmentType
        "Set-AASScalingPolicy/StepScalingPolicyConfiguration_AdjustmentType"
        {
            $v = "ChangeInCapacity","ExactCapacity","PercentChangeInCapacity"
            break
        }

        # Amazon.ApplicationAutoScaling.MetricAggregationType
        "Set-AASScalingPolicy/StepScalingPolicyConfiguration_MetricAggregationType"
        {
            $v = "Average","Maximum","Minimum"
            break
        }

        # Amazon.ApplicationAutoScaling.MetricStatistic
        "Set-AASScalingPolicy/CustomizedMetricSpecification_Statistic"
        {
            $v = "Average","Maximum","Minimum","SampleCount","Sum"
            break
        }

        # Amazon.ApplicationAutoScaling.MetricType
        "Set-AASScalingPolicy/PredefinedMetricSpecification_PredefinedMetricType"
        {
            $v = "ALBRequestCountPerTarget","AppStreamAverageCapacityUtilization","CassandraReadCapacityUtilization","CassandraWriteCapacityUtilization","ComprehendInferenceUtilization","DynamoDBReadCapacityUtilization","DynamoDBWriteCapacityUtilization","EC2SpotFleetRequestAverageCPUUtilization","EC2SpotFleetRequestAverageNetworkIn","EC2SpotFleetRequestAverageNetworkOut","ECSServiceAverageCPUUtilization","ECSServiceAverageMemoryUtilization","ElastiCacheDatabaseCapacityUsageCountedForEvictPercentage","ElastiCacheDatabaseMemoryUsageCountedForEvictPercentage","ElastiCachePrimaryEngineCPUUtilization","ElastiCacheReplicaEngineCPUUtilization","KafkaBrokerStorageUtilization","LambdaProvisionedConcurrencyUtilization","NeptuneReaderAverageCPUUtilization","RDSReaderAverageCPUUtilization","RDSReaderAverageDatabaseConnections","SageMakerInferenceComponentConcurrentRequestsPerCopyHighResolution","SageMakerInferenceComponentInvocationsPerCopy","SageMakerVariantConcurrentRequestsPerModelHighResolution","SageMakerVariantInvocationsPerInstance","SageMakerVariantProvisionedConcurrencyUtilization","WorkSpacesAverageUserSessionsCapacityUtilization"
            break
        }

        # Amazon.ApplicationAutoScaling.PolicyType
        "Set-AASScalingPolicy/PolicyType"
        {
            $v = "StepScaling","TargetTrackingScaling"
            break
        }

        # Amazon.ApplicationAutoScaling.ScalableDimension
        {
            ($_ -eq "Add-AASScalableTarget/ScalableDimension") -Or
            ($_ -eq "Get-AASScalableTarget/ScalableDimension") -Or
            ($_ -eq "Get-AASScalingActivity/ScalableDimension") -Or
            ($_ -eq "Get-AASScalingPolicy/ScalableDimension") -Or
            ($_ -eq "Get-AASScheduledAction/ScalableDimension") -Or
            ($_ -eq "Remove-AASScalableTarget/ScalableDimension") -Or
            ($_ -eq "Remove-AASScalingPolicy/ScalableDimension") -Or
            ($_ -eq "Remove-AASScheduledAction/ScalableDimension") -Or
            ($_ -eq "Set-AASScalingPolicy/ScalableDimension") -Or
            ($_ -eq "Set-AASScheduledAction/ScalableDimension")
        }
        {
            $v = "appstream:fleet:DesiredCapacity","cassandra:table:ReadCapacityUnits","cassandra:table:WriteCapacityUnits","comprehend:document-classifier-endpoint:DesiredInferenceUnits","comprehend:entity-recognizer-endpoint:DesiredInferenceUnits","custom-resource:ResourceType:Property","dynamodb:index:ReadCapacityUnits","dynamodb:index:WriteCapacityUnits","dynamodb:table:ReadCapacityUnits","dynamodb:table:WriteCapacityUnits","ec2:spot-fleet-request:TargetCapacity","ecs:service:DesiredCount","elasticache:replication-group:NodeGroups","elasticache:replication-group:Replicas","elasticmapreduce:instancegroup:InstanceCount","kafka:broker-storage:VolumeSize","lambda:function:ProvisionedConcurrency","neptune:cluster:ReadReplicaCount","rds:cluster:ReadReplicaCount","sagemaker:inference-component:DesiredCopyCount","sagemaker:variant:DesiredInstanceCount","sagemaker:variant:DesiredProvisionedConcurrency","workspaces:workspacespool:DesiredUserSessions"
            break
        }

        # Amazon.ApplicationAutoScaling.ServiceNamespace
        {
            ($_ -eq "Add-AASScalableTarget/ServiceNamespace") -Or
            ($_ -eq "Get-AASScalableTarget/ServiceNamespace") -Or
            ($_ -eq "Get-AASScalingActivity/ServiceNamespace") -Or
            ($_ -eq "Get-AASScalingPolicy/ServiceNamespace") -Or
            ($_ -eq "Get-AASScheduledAction/ServiceNamespace") -Or
            ($_ -eq "Remove-AASScalableTarget/ServiceNamespace") -Or
            ($_ -eq "Remove-AASScalingPolicy/ServiceNamespace") -Or
            ($_ -eq "Remove-AASScheduledAction/ServiceNamespace") -Or
            ($_ -eq "Set-AASScalingPolicy/ServiceNamespace") -Or
            ($_ -eq "Set-AASScheduledAction/ServiceNamespace")
        }
        {
            $v = "appstream","cassandra","comprehend","custom-resource","dynamodb","ec2","ecs","elasticache","elasticmapreduce","kafka","lambda","neptune","rds","sagemaker","workspaces"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AAS_map = @{
    "CustomizedMetricSpecification_Statistic"=@("Set-AASScalingPolicy")
    "PolicyType"=@("Set-AASScalingPolicy")
    "PredefinedMetricSpecification_PredefinedMetricType"=@("Set-AASScalingPolicy")
    "ScalableDimension"=@("Add-AASScalableTarget","Get-AASScalableTarget","Get-AASScalingActivity","Get-AASScalingPolicy","Get-AASScheduledAction","Remove-AASScalableTarget","Remove-AASScalingPolicy","Remove-AASScheduledAction","Set-AASScalingPolicy","Set-AASScheduledAction")
    "ServiceNamespace"=@("Add-AASScalableTarget","Get-AASScalableTarget","Get-AASScalingActivity","Get-AASScalingPolicy","Get-AASScheduledAction","Remove-AASScalableTarget","Remove-AASScalingPolicy","Remove-AASScheduledAction","Set-AASScalingPolicy","Set-AASScheduledAction")
    "StepScalingPolicyConfiguration_AdjustmentType"=@("Set-AASScalingPolicy")
    "StepScalingPolicyConfiguration_MetricAggregationType"=@("Set-AASScalingPolicy")
}

_awsArgumentCompleterRegistration $AAS_Completers $AAS_map

$AAS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AAS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AAS_SelectMap = @{
    "Select"=@("Remove-AASScalingPolicy",
               "Remove-AASScheduledAction",
               "Remove-AASScalableTarget",
               "Get-AASScalableTarget",
               "Get-AASScalingActivity",
               "Get-AASScalingPolicy",
               "Get-AASScheduledAction",
               "Get-AASResourceTag",
               "Set-AASScalingPolicy",
               "Set-AASScheduledAction",
               "Add-AASScalableTarget",
               "Add-AASResourceTag",
               "Remove-AASResourceTag")
}

_awsArgumentCompleterRegistration $AAS_SelectCompleters $AAS_SelectMap
# Argument completions for service Amazon ApplicationCostProfiler


$ACP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ApplicationCostProfiler.Format
        {
            ($_ -eq "Update-ACPReportDefinition/Format") -Or
            ($_ -eq "Write-ACPReportDefinition/Format")
        }
        {
            $v = "CSV","PARQUET"
            break
        }

        # Amazon.ApplicationCostProfiler.ReportFrequency
        {
            ($_ -eq "Update-ACPReportDefinition/ReportFrequency") -Or
            ($_ -eq "Write-ACPReportDefinition/ReportFrequency")
        }
        {
            $v = "ALL","DAILY","MONTHLY"
            break
        }

        # Amazon.ApplicationCostProfiler.S3BucketRegion
        "Import-ACPApplicationUsage/SourceS3Location_Region"
        {
            $v = "af-south-1","ap-east-1","eu-south-1","me-south-1"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ACP_map = @{
    "Format"=@("Update-ACPReportDefinition","Write-ACPReportDefinition")
    "ReportFrequency"=@("Update-ACPReportDefinition","Write-ACPReportDefinition")
    "SourceS3Location_Region"=@("Import-ACPApplicationUsage")
}

_awsArgumentCompleterRegistration $ACP_Completers $ACP_map

$ACP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ACP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ACP_SelectMap = @{
    "Select"=@("Remove-ACPReportDefinition",
               "Get-ACPReportDefinition",
               "Import-ACPApplicationUsage",
               "Get-ACPReportDefinitionList",
               "Write-ACPReportDefinition",
               "Update-ACPReportDefinition")
}

_awsArgumentCompleterRegistration $ACP_SelectCompleters $ACP_SelectMap
# Argument completions for service Amazon CloudWatch Application Insights


$CWAI_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ApplicationInsights.ConfigurationEventStatus
        "Get-CWAIConfigurationHistoryList/EventStatus"
        {
            $v = "ERROR","INFO","WARN"
            break
        }

        # Amazon.ApplicationInsights.GroupingType
        "New-CWAIApplication/GroupingType"
        {
            $v = "ACCOUNT_BASED"
            break
        }

        # Amazon.ApplicationInsights.RecommendationType
        "Get-CWAIComponentConfigurationRecommendation/RecommendationType"
        {
            $v = "ALL","INFRA_ONLY","WORKLOAD_ONLY"
            break
        }

        # Amazon.ApplicationInsights.Tier
        {
            ($_ -eq "Get-CWAIComponentConfigurationRecommendation/Tier") -Or
            ($_ -eq "Update-CWAIComponentConfiguration/Tier") -Or
            ($_ -eq "Add-CWAIWorkload/WorkloadConfiguration_Tier") -Or
            ($_ -eq "Update-CWAIWorkload/WorkloadConfiguration_Tier")
        }
        {
            $v = "ACTIVE_DIRECTORY","CUSTOM","DEFAULT","DOT_NET_CORE","DOT_NET_WEB","DOT_NET_WEB_TIER","DOT_NET_WORKER","JAVA_JMX","MYSQL","ORACLE","POSTGRESQL","SAP_ASE_HIGH_AVAILABILITY","SAP_ASE_SINGLE_NODE","SAP_HANA_HIGH_AVAILABILITY","SAP_HANA_MULTI_NODE","SAP_HANA_SINGLE_NODE","SAP_NETWEAVER_DISTRIBUTED","SAP_NETWEAVER_HIGH_AVAILABILITY","SAP_NETWEAVER_STANDARD","SHAREPOINT","SQL_SERVER","SQL_SERVER_ALWAYSON_AVAILABILITY_GROUP","SQL_SERVER_FAILOVER_CLUSTER_INSTANCE"
            break
        }

        # Amazon.ApplicationInsights.UpdateStatus
        "Update-CWAIProblem/UpdateStatus"
        {
            $v = "RESOLVED"
            break
        }

        # Amazon.ApplicationInsights.Visibility
        {
            ($_ -eq "Get-CWAIProblemList/Visibility") -Or
            ($_ -eq "Update-CWAIProblem/Visibility")
        }
        {
            $v = "IGNORED","VISIBLE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWAI_map = @{
    "EventStatus"=@("Get-CWAIConfigurationHistoryList")
    "GroupingType"=@("New-CWAIApplication")
    "RecommendationType"=@("Get-CWAIComponentConfigurationRecommendation")
    "Tier"=@("Get-CWAIComponentConfigurationRecommendation","Update-CWAIComponentConfiguration")
    "UpdateStatus"=@("Update-CWAIProblem")
    "Visibility"=@("Get-CWAIProblemList","Update-CWAIProblem")
    "WorkloadConfiguration_Tier"=@("Add-CWAIWorkload","Update-CWAIWorkload")
}

_awsArgumentCompleterRegistration $CWAI_Completers $CWAI_map

$CWAI_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CWAI.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWAI_SelectMap = @{
    "Select"=@("Add-CWAIWorkload",
               "New-CWAIApplication",
               "New-CWAIComponent",
               "New-CWAILogPattern",
               "Remove-CWAIApplication",
               "Remove-CWAIComponent",
               "Remove-CWAILogPattern",
               "Get-CWAIApplication",
               "Get-CWAIComponent",
               "Get-CWAIComponentConfiguration",
               "Get-CWAIComponentConfigurationRecommendation",
               "Get-CWAILogPattern",
               "Get-CWAIObservation",
               "Get-CWAIProblem",
               "Get-CWAIProblemObservation",
               "Get-CWAIWorkload",
               "Get-CWAIApplicationList",
               "Get-CWAIComponentList",
               "Get-CWAIConfigurationHistoryList",
               "Get-CWAILogPatternList",
               "Get-CWAILogPatternSetList",
               "Get-CWAIProblemList",
               "Get-CWAIResourceTag",
               "Get-CWAIWorkloadList",
               "Remove-CWAIWorkload",
               "Add-CWAIResourceTag",
               "Remove-CWAIResourceTag",
               "Update-CWAIApplication",
               "Update-CWAIComponent",
               "Update-CWAIComponentConfiguration",
               "Update-CWAILogPattern",
               "Update-CWAIProblem",
               "Update-CWAIWorkload")
}

_awsArgumentCompleterRegistration $CWAI_SelectCompleters $CWAI_SelectMap
# Argument completions for service Amazon CloudWatch Application Signals


$CWAS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ApplicationSignals.DurationUnit
        {
            ($_ -eq "New-CWASServiceLevelObjective/CalendarInterval_DurationUnit") -Or
            ($_ -eq "Update-CWASServiceLevelObjective/CalendarInterval_DurationUnit") -Or
            ($_ -eq "New-CWASServiceLevelObjective/RollingInterval_DurationUnit") -Or
            ($_ -eq "Update-CWASServiceLevelObjective/RollingInterval_DurationUnit")
        }
        {
            $v = "DAY","HOUR","MINUTE","MONTH"
            break
        }

        # Amazon.ApplicationSignals.ServiceLevelIndicatorComparisonOperator
        {
            ($_ -eq "New-CWASServiceLevelObjective/RequestBasedSliConfig_ComparisonOperator") -Or
            ($_ -eq "Update-CWASServiceLevelObjective/RequestBasedSliConfig_ComparisonOperator") -Or
            ($_ -eq "New-CWASServiceLevelObjective/SliConfig_ComparisonOperator") -Or
            ($_ -eq "Update-CWASServiceLevelObjective/SliConfig_ComparisonOperator")
        }
        {
            $v = "GreaterThan","GreaterThanOrEqualTo","LessThan","LessThanOrEqualTo"
            break
        }

        # Amazon.ApplicationSignals.ServiceLevelIndicatorMetricType
        {
            ($_ -eq "New-CWASServiceLevelObjective/RequestBasedSliMetricConfig_MetricType") -Or
            ($_ -eq "Update-CWASServiceLevelObjective/RequestBasedSliMetricConfig_MetricType") -Or
            ($_ -eq "New-CWASServiceLevelObjective/SliMetricConfig_MetricType") -Or
            ($_ -eq "Update-CWASServiceLevelObjective/SliMetricConfig_MetricType")
        }
        {
            $v = "AVAILABILITY","LATENCY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWAS_map = @{
    "CalendarInterval_DurationUnit"=@("New-CWASServiceLevelObjective","Update-CWASServiceLevelObjective")
    "RequestBasedSliConfig_ComparisonOperator"=@("New-CWASServiceLevelObjective","Update-CWASServiceLevelObjective")
    "RequestBasedSliMetricConfig_MetricType"=@("New-CWASServiceLevelObjective","Update-CWASServiceLevelObjective")
    "RollingInterval_DurationUnit"=@("New-CWASServiceLevelObjective","Update-CWASServiceLevelObjective")
    "SliConfig_ComparisonOperator"=@("New-CWASServiceLevelObjective","Update-CWASServiceLevelObjective")
    "SliMetricConfig_MetricType"=@("New-CWASServiceLevelObjective","Update-CWASServiceLevelObjective")
}

_awsArgumentCompleterRegistration $CWAS_Completers $CWAS_map

$CWAS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CWAS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWAS_SelectMap = @{
    "Select"=@("Get-CWASBatchServiceLevelObjectiveBudgetReport",
               "New-CWASServiceLevelObjective",
               "Remove-CWASServiceLevelObjective",
               "Get-CWASService",
               "Get-CWASServiceLevelObjective",
               "Get-CWASServiceDependencyList",
               "Get-CWASServiceDependentList",
               "Get-CWASServiceLevelObjectiveList",
               "Get-CWASServiceOperationList",
               "Get-CWASServiceList",
               "Get-CWASResourceTag",
               "Start-CWASDiscovery",
               "Add-CWASResourceTag",
               "Remove-CWASResourceTag",
               "Update-CWASServiceLevelObjective")
}

_awsArgumentCompleterRegistration $CWAS_SelectCompleters $CWAS_SelectMap
# Argument completions for service AWS App Mesh


$AMSH_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AppMesh.DefaultGatewayRouteRewrite
        {
            ($_ -eq "New-AMSHGatewayRoute/Spec_GrpcRoute_Action_Rewrite_Hostname_DefaultTargetHostname") -Or
            ($_ -eq "Update-AMSHGatewayRoute/Spec_GrpcRoute_Action_Rewrite_Hostname_DefaultTargetHostname") -Or
            ($_ -eq "New-AMSHGatewayRoute/Spec_Http2Route_Action_Rewrite_Hostname_DefaultTargetHostname") -Or
            ($_ -eq "Update-AMSHGatewayRoute/Spec_Http2Route_Action_Rewrite_Hostname_DefaultTargetHostname") -Or
            ($_ -eq "New-AMSHGatewayRoute/Spec_Http2Route_Action_Rewrite_Prefix_DefaultPrefix") -Or
            ($_ -eq "Update-AMSHGatewayRoute/Spec_Http2Route_Action_Rewrite_Prefix_DefaultPrefix") -Or
            ($_ -eq "New-AMSHGatewayRoute/Spec_HttpRoute_Action_Rewrite_Hostname_DefaultTargetHostname") -Or
            ($_ -eq "Update-AMSHGatewayRoute/Spec_HttpRoute_Action_Rewrite_Hostname_DefaultTargetHostname") -Or
            ($_ -eq "New-AMSHGatewayRoute/Spec_HttpRoute_Action_Rewrite_Prefix_DefaultPrefix") -Or
            ($_ -eq "Update-AMSHGatewayRoute/Spec_HttpRoute_Action_Rewrite_Prefix_DefaultPrefix")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.AppMesh.DnsResponseType
        {
            ($_ -eq "New-AMSHVirtualNode/Dns_ResponseType") -Or
            ($_ -eq "Update-AMSHVirtualNode/Dns_ResponseType")
        }
        {
            $v = "ENDPOINTS","LOADBALANCER"
            break
        }

        # Amazon.AppMesh.DurationUnit
        {
            ($_ -eq "New-AMSHRoute/Spec_GrpcRoute_RetryPolicy_PerRetryTimeout_Unit") -Or
            ($_ -eq "Update-AMSHRoute/Spec_GrpcRoute_RetryPolicy_PerRetryTimeout_Unit") -Or
            ($_ -eq "New-AMSHRoute/Spec_GrpcRoute_Timeout_Idle_Unit") -Or
            ($_ -eq "Update-AMSHRoute/Spec_GrpcRoute_Timeout_Idle_Unit") -Or
            ($_ -eq "New-AMSHRoute/Spec_GrpcRoute_Timeout_PerRequest_Unit") -Or
            ($_ -eq "Update-AMSHRoute/Spec_GrpcRoute_Timeout_PerRequest_Unit") -Or
            ($_ -eq "New-AMSHRoute/Spec_Http2Route_RetryPolicy_PerRetryTimeout_Unit") -Or
            ($_ -eq "Update-AMSHRoute/Spec_Http2Route_RetryPolicy_PerRetryTimeout_Unit") -Or
            ($_ -eq "New-AMSHRoute/Spec_Http2Route_Timeout_Idle_Unit") -Or
            ($_ -eq "Update-AMSHRoute/Spec_Http2Route_Timeout_Idle_Unit") -Or
            ($_ -eq "New-AMSHRoute/Spec_Http2Route_Timeout_PerRequest_Unit") -Or
            ($_ -eq "Update-AMSHRoute/Spec_Http2Route_Timeout_PerRequest_Unit") -Or
            ($_ -eq "New-AMSHRoute/Spec_HttpRoute_RetryPolicy_PerRetryTimeout_Unit") -Or
            ($_ -eq "Update-AMSHRoute/Spec_HttpRoute_RetryPolicy_PerRetryTimeout_Unit") -Or
            ($_ -eq "New-AMSHRoute/Spec_HttpRoute_Timeout_Idle_Unit") -Or
            ($_ -eq "Update-AMSHRoute/Spec_HttpRoute_Timeout_Idle_Unit") -Or
            ($_ -eq "New-AMSHRoute/Spec_HttpRoute_Timeout_PerRequest_Unit") -Or
            ($_ -eq "Update-AMSHRoute/Spec_HttpRoute_Timeout_PerRequest_Unit") -Or
            ($_ -eq "New-AMSHRoute/Spec_TcpRoute_Timeout_Idle_Unit") -Or
            ($_ -eq "Update-AMSHRoute/Spec_TcpRoute_Timeout_Idle_Unit")
        }
        {
            $v = "ms","s"
            break
        }

        # Amazon.AppMesh.EgressFilterType
        {
            ($_ -eq "New-AMSHMesh/EgressFilter_Type") -Or
            ($_ -eq "Update-AMSHMesh/EgressFilter_Type")
        }
        {
            $v = "ALLOW_ALL","DROP_ALL"
            break
        }

        # Amazon.AppMesh.HttpMethod
        {
            ($_ -eq "New-AMSHGatewayRoute/Spec_Http2Route_Match_Method") -Or
            ($_ -eq "New-AMSHRoute/Spec_Http2Route_Match_Method") -Or
            ($_ -eq "Update-AMSHGatewayRoute/Spec_Http2Route_Match_Method") -Or
            ($_ -eq "Update-AMSHRoute/Spec_Http2Route_Match_Method") -Or
            ($_ -eq "New-AMSHGatewayRoute/Spec_HttpRoute_Match_Method") -Or
            ($_ -eq "New-AMSHRoute/Spec_HttpRoute_Match_Method") -Or
            ($_ -eq "Update-AMSHGatewayRoute/Spec_HttpRoute_Match_Method") -Or
            ($_ -eq "Update-AMSHRoute/Spec_HttpRoute_Match_Method")
        }
        {
            $v = "CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"
            break
        }

        # Amazon.AppMesh.HttpScheme
        {
            ($_ -eq "New-AMSHRoute/Spec_Http2Route_Match_Scheme") -Or
            ($_ -eq "Update-AMSHRoute/Spec_Http2Route_Match_Scheme") -Or
            ($_ -eq "New-AMSHRoute/Spec_HttpRoute_Match_Scheme") -Or
            ($_ -eq "Update-AMSHRoute/Spec_HttpRoute_Match_Scheme")
        }
        {
            $v = "http","https"
            break
        }

        # Amazon.AppMesh.IpPreference
        {
            ($_ -eq "New-AMSHVirtualNode/AwsCloudMap_IpPreference") -Or
            ($_ -eq "Update-AMSHVirtualNode/AwsCloudMap_IpPreference") -Or
            ($_ -eq "New-AMSHVirtualNode/Dns_IpPreference") -Or
            ($_ -eq "Update-AMSHVirtualNode/Dns_IpPreference") -Or
            ($_ -eq "New-AMSHMesh/ServiceDiscovery_IpPreference") -Or
            ($_ -eq "Update-AMSHMesh/ServiceDiscovery_IpPreference")
        }
        {
            $v = "IPv4_ONLY","IPv4_PREFERRED","IPv6_ONLY","IPv6_PREFERRED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AMSH_map = @{
    "AwsCloudMap_IpPreference"=@("New-AMSHVirtualNode","Update-AMSHVirtualNode")
    "Dns_IpPreference"=@("New-AMSHVirtualNode","Update-AMSHVirtualNode")
    "Dns_ResponseType"=@("New-AMSHVirtualNode","Update-AMSHVirtualNode")
    "EgressFilter_Type"=@("New-AMSHMesh","Update-AMSHMesh")
    "ServiceDiscovery_IpPreference"=@("New-AMSHMesh","Update-AMSHMesh")
    "Spec_GrpcRoute_Action_Rewrite_Hostname_DefaultTargetHostname"=@("New-AMSHGatewayRoute","Update-AMSHGatewayRoute")
    "Spec_GrpcRoute_RetryPolicy_PerRetryTimeout_Unit"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_GrpcRoute_Timeout_Idle_Unit"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_GrpcRoute_Timeout_PerRequest_Unit"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_Http2Route_Action_Rewrite_Hostname_DefaultTargetHostname"=@("New-AMSHGatewayRoute","Update-AMSHGatewayRoute")
    "Spec_Http2Route_Action_Rewrite_Prefix_DefaultPrefix"=@("New-AMSHGatewayRoute","Update-AMSHGatewayRoute")
    "Spec_Http2Route_Match_Method"=@("New-AMSHGatewayRoute","New-AMSHRoute","Update-AMSHGatewayRoute","Update-AMSHRoute")
    "Spec_Http2Route_Match_Scheme"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_Http2Route_RetryPolicy_PerRetryTimeout_Unit"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_Http2Route_Timeout_Idle_Unit"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_Http2Route_Timeout_PerRequest_Unit"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_HttpRoute_Action_Rewrite_Hostname_DefaultTargetHostname"=@("New-AMSHGatewayRoute","Update-AMSHGatewayRoute")
    "Spec_HttpRoute_Action_Rewrite_Prefix_DefaultPrefix"=@("New-AMSHGatewayRoute","Update-AMSHGatewayRoute")
    "Spec_HttpRoute_Match_Method"=@("New-AMSHGatewayRoute","New-AMSHRoute","Update-AMSHGatewayRoute","Update-AMSHRoute")
    "Spec_HttpRoute_Match_Scheme"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_HttpRoute_RetryPolicy_PerRetryTimeout_Unit"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_HttpRoute_Timeout_Idle_Unit"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_HttpRoute_Timeout_PerRequest_Unit"=@("New-AMSHRoute","Update-AMSHRoute")
    "Spec_TcpRoute_Timeout_Idle_Unit"=@("New-AMSHRoute","Update-AMSHRoute")
}

_awsArgumentCompleterRegistration $AMSH_Completers $AMSH_map

$AMSH_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AMSH.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AMSH_SelectMap = @{
    "Select"=@("New-AMSHGatewayRoute",
               "New-AMSHMesh",
               "New-AMSHRoute",
               "New-AMSHVirtualGateway",
               "New-AMSHVirtualNode",
               "New-AMSHVirtualRouter",
               "New-AMSHVirtualService",
               "Remove-AMSHGatewayRoute",
               "Remove-AMSHMesh",
               "Remove-AMSHRoute",
               "Remove-AMSHVirtualGateway",
               "Remove-AMSHVirtualNode",
               "Remove-AMSHVirtualRouter",
               "Remove-AMSHVirtualService",
               "Get-AMSHGatewayRoute",
               "Get-AMSHMesh",
               "Get-AMSHRoute",
               "Get-AMSHVirtualGateway",
               "Get-AMSHVirtualNode",
               "Get-AMSHVirtualRouter",
               "Get-AMSHVirtualService",
               "Get-AMSHGatewayRouteList",
               "Get-AMSHMeshList",
               "Get-AMSHRouteList",
               "Get-AMSHResourceTag",
               "Get-AMSHVirtualGatewayList",
               "Get-AMSHVirtualNodeList",
               "Get-AMSHVirtualRouterList",
               "Get-AMSHVirtualServiceList",
               "Add-AMSHResourceTag",
               "Remove-AMSHResourceTag",
               "Update-AMSHGatewayRoute",
               "Update-AMSHMesh",
               "Update-AMSHRoute",
               "Update-AMSHVirtualGateway",
               "Update-AMSHVirtualNode",
               "Update-AMSHVirtualRouter",
               "Update-AMSHVirtualService")
}

_awsArgumentCompleterRegistration $AMSH_SelectCompleters $AMSH_SelectMap
# Argument completions for service AWS App Runner


$AAR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AppRunner.ConfigurationSource
        {
            ($_ -eq "New-AARService/CodeConfiguration_ConfigurationSource") -Or
            ($_ -eq "Update-AARService/CodeConfiguration_ConfigurationSource")
        }
        {
            $v = "API","REPOSITORY"
            break
        }

        # Amazon.AppRunner.EgressType
        {
            ($_ -eq "New-AARService/EgressConfiguration_EgressType") -Or
            ($_ -eq "Update-AARService/EgressConfiguration_EgressType")
        }
        {
            $v = "DEFAULT","VPC"
            break
        }

        # Amazon.AppRunner.HealthCheckProtocol
        {
            ($_ -eq "New-AARService/HealthCheckConfiguration_Protocol") -Or
            ($_ -eq "Update-AARService/HealthCheckConfiguration_Protocol")
        }
        {
            $v = "HTTP","TCP"
            break
        }

        # Amazon.AppRunner.ImageRepositoryType
        {
            ($_ -eq "New-AARService/ImageRepository_ImageRepositoryType") -Or
            ($_ -eq "Update-AARService/ImageRepository_ImageRepositoryType")
        }
        {
            $v = "ECR","ECR_PUBLIC"
            break
        }

        # Amazon.AppRunner.IpAddressType
        {
            ($_ -eq "New-AARService/NetworkConfiguration_IpAddressType") -Or
            ($_ -eq "Update-AARService/NetworkConfiguration_IpAddressType")
        }
        {
            $v = "DUAL_STACK","IPV4"
            break
        }

        # Amazon.AppRunner.ProviderType
        "New-AARConnection/ProviderType"
        {
            $v = "BITBUCKET","GITHUB"
            break
        }

        # Amazon.AppRunner.Runtime
        {
            ($_ -eq "New-AARService/CodeConfigurationValues_Runtime") -Or
            ($_ -eq "Update-AARService/CodeConfigurationValues_Runtime")
        }
        {
            $v = "CORRETTO_11","CORRETTO_8","DOTNET_6","GO_1","NODEJS_12","NODEJS_14","NODEJS_16","NODEJS_18","PHP_81","PYTHON_3","PYTHON_311","RUBY_31"
            break
        }

        # Amazon.AppRunner.SourceCodeVersionType
        {
            ($_ -eq "New-AARService/SourceCodeVersion_Type") -Or
            ($_ -eq "Update-AARService/SourceCodeVersion_Type")
        }
        {
            $v = "BRANCH"
            break
        }

        # Amazon.AppRunner.TracingVendor
        "New-AARObservabilityConfiguration/TraceConfiguration_Vendor"
        {
            $v = "AWSXRAY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AAR_map = @{
    "CodeConfiguration_ConfigurationSource"=@("New-AARService","Update-AARService")
    "CodeConfigurationValues_Runtime"=@("New-AARService","Update-AARService")
    "EgressConfiguration_EgressType"=@("New-AARService","Update-AARService")
    "HealthCheckConfiguration_Protocol"=@("New-AARService","Update-AARService")
    "ImageRepository_ImageRepositoryType"=@("New-AARService","Update-AARService")
    "NetworkConfiguration_IpAddressType"=@("New-AARService","Update-AARService")
    "ProviderType"=@("New-AARConnection")
    "SourceCodeVersion_Type"=@("New-AARService","Update-AARService")
    "TraceConfiguration_Vendor"=@("New-AARObservabilityConfiguration")
}

_awsArgumentCompleterRegistration $AAR_Completers $AAR_map

$AAR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AAR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AAR_SelectMap = @{
    "Select"=@("Add-AARCustomDomain",
               "New-AARAutoScalingConfiguration",
               "New-AARConnection",
               "New-AARObservabilityConfiguration",
               "New-AARService",
               "New-AARVpcConnector",
               "New-AARVpcIngressConnection",
               "Remove-AARAutoScalingConfiguration",
               "Remove-AARConnection",
               "Remove-AARObservabilityConfiguration",
               "Remove-AARService",
               "Remove-AARVpcConnector",
               "Remove-AARVpcIngressConnection",
               "Get-AARAutoScalingConfiguration",
               "Get-AARCustomDomain",
               "Get-AARObservabilityConfiguration",
               "Get-AARService",
               "Get-AARVpcConnector",
               "Get-AARVpcIngressConnection",
               "Remove-AARCustomDomain",
               "Get-AARAutoScalingConfigurationList",
               "Get-AARConnectionList",
               "Get-AARObservabilityConfigurationList",
               "Get-AAROperationList",
               "Get-AARServiceList",
               "Get-AARServicesForAutoScalingConfigurationList",
               "Get-AARResourceTag",
               "Get-AARVpcConnectorList",
               "Get-AARVpcIngressConnectionList",
               "Suspend-AARService",
               "Resume-AARService",
               "Start-AARDeployment",
               "Add-AARResourceTag",
               "Remove-AARResourceTag",
               "Update-AARDefaultAutoScalingConfiguration",
               "Update-AARService",
               "Update-AARVpcIngressConnection")
}

_awsArgumentCompleterRegistration $AAR_SelectCompleters $AAR_SelectMap
# Argument completions for service Amazon AppStream


$APS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AppStream.AppBlockBuilderPlatformType
        "New-APSAppBlockBuilder/Platform"
        {
            $v = "WINDOWS_SERVER_2019"
            break
        }

        # Amazon.AppStream.AppVisibility
        {
            ($_ -eq "New-APSEntitlement/AppVisibility") -Or
            ($_ -eq "Update-APSEntitlement/AppVisibility")
        }
        {
            $v = "ALL","ASSOCIATED"
            break
        }

        # Amazon.AppStream.AuthenticationType
        {
            ($_ -eq "Disable-APSUser/AuthenticationType") -Or
            ($_ -eq "Enable-APSUser/AuthenticationType") -Or
            ($_ -eq "Get-APSSessionList/AuthenticationType") -Or
            ($_ -eq "Get-APSUser/AuthenticationType") -Or
            ($_ -eq "Get-APSUserStackAssociation/AuthenticationType") -Or
            ($_ -eq "New-APSUser/AuthenticationType") -Or
            ($_ -eq "Remove-APSUser/AuthenticationType")
        }
        {
            $v = "API","AWS_AD","SAML","USERPOOL"
            break
        }

        # Amazon.AppStream.CertificateBasedAuthStatus
        {
            ($_ -eq "New-APSDirectoryConfig/CertificateBasedAuthProperties_Status") -Or
            ($_ -eq "Update-APSDirectoryConfig/CertificateBasedAuthProperties_Status")
        }
        {
            $v = "DISABLED","ENABLED","ENABLED_NO_DIRECTORY_LOGIN_FALLBACK"
            break
        }

        # Amazon.AppStream.FleetType
        "New-APSFleet/FleetType"
        {
            $v = "ALWAYS_ON","ELASTIC","ON_DEMAND"
            break
        }

        # Amazon.AppStream.MessageAction
        "New-APSUser/MessageAction"
        {
            $v = "RESEND","SUPPRESS"
            break
        }

        # Amazon.AppStream.PackagingType
        "New-APSAppBlock/PackagingType"
        {
            $v = "APPSTREAM2","CUSTOM"
            break
        }

        # Amazon.AppStream.PlatformType
        {
            ($_ -eq "New-APSFleet/Platform") -Or
            ($_ -eq "Update-APSAppBlockBuilder/Platform") -Or
            ($_ -eq "Update-APSFleet/Platform")
        }
        {
            $v = "AMAZON_LINUX2","RHEL8","WINDOWS","WINDOWS_SERVER_2016","WINDOWS_SERVER_2019","WINDOWS_SERVER_2022"
            break
        }

        # Amazon.AppStream.PreferredProtocol
        {
            ($_ -eq "New-APSStack/StreamingExperienceSettings_PreferredProtocol") -Or
            ($_ -eq "Update-APSStack/StreamingExperienceSettings_PreferredProtocol")
        }
        {
            $v = "TCP","UDP"
            break
        }

        # Amazon.AppStream.StreamView
        {
            ($_ -eq "New-APSFleet/StreamView") -Or
            ($_ -eq "Update-APSFleet/StreamView")
        }
        {
            $v = "APP","DESKTOP"
            break
        }

        # Amazon.AppStream.ThemeState
        "Update-APSThemeForStack/State"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.AppStream.ThemeStyling
        {
            ($_ -eq "New-APSThemeForStack/ThemeStyling") -Or
            ($_ -eq "Update-APSThemeForStack/ThemeStyling")
        }
        {
            $v = "BLUE","LIGHT_BLUE","PINK","RED"
            break
        }

        # Amazon.AppStream.VisibilityType
        "Get-APSImageList/Type"
        {
            $v = "PRIVATE","PUBLIC","SHARED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$APS_map = @{
    "AppVisibility"=@("New-APSEntitlement","Update-APSEntitlement")
    "AuthenticationType"=@("Disable-APSUser","Enable-APSUser","Get-APSSessionList","Get-APSUser","Get-APSUserStackAssociation","New-APSUser","Remove-APSUser")
    "CertificateBasedAuthProperties_Status"=@("New-APSDirectoryConfig","Update-APSDirectoryConfig")
    "FleetType"=@("New-APSFleet")
    "MessageAction"=@("New-APSUser")
    "PackagingType"=@("New-APSAppBlock")
    "Platform"=@("New-APSAppBlockBuilder","New-APSFleet","Update-APSAppBlockBuilder","Update-APSFleet")
    "State"=@("Update-APSThemeForStack")
    "StreamingExperienceSettings_PreferredProtocol"=@("New-APSStack","Update-APSStack")
    "StreamView"=@("New-APSFleet","Update-APSFleet")
    "ThemeStyling"=@("New-APSThemeForStack","Update-APSThemeForStack")
    "Type"=@("Get-APSImageList")
}

_awsArgumentCompleterRegistration $APS_Completers $APS_map

$APS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.APS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$APS_SelectMap = @{
    "Select"=@("Add-APSAppBlockBuilderAppBlock",
               "Register-APSApplicationFleet",
               "Add-APSApplicationToEntitlement",
               "Register-APSFleet",
               "Register-APSUserStackBatch",
               "Unregister-APSUserStackBatch",
               "Copy-APSImage",
               "New-APSAppBlock",
               "New-APSAppBlockBuilder",
               "New-APSAppBlockBuilderStreamingURL",
               "New-APSApplication",
               "New-APSDirectoryConfig",
               "New-APSEntitlement",
               "New-APSFleet",
               "New-APSImageBuilder",
               "New-APSImageBuilderStreamingURL",
               "New-APSStack",
               "New-APSStreamingURL",
               "New-APSThemeForStack",
               "New-APSUpdatedImage",
               "New-APSUsageReportSubscription",
               "New-APSUser",
               "Remove-APSAppBlock",
               "Remove-APSAppBlockBuilder",
               "Remove-APSApplication",
               "Remove-APSDirectoryConfig",
               "Remove-APSEntitlement",
               "Remove-APSFleet",
               "Remove-APSImage",
               "Remove-APSImageBuilder",
               "Remove-APSImagePermission",
               "Remove-APSStack",
               "Remove-APSThemeForStack",
               "Remove-APSUsageReportSubscription",
               "Remove-APSUser",
               "Get-APSAppBlockBuilderAppBlockAssociation",
               "Get-APSAppBlockBuilder",
               "Get-APSAppBlock",
               "Get-APSApplicationFleetAssociation",
               "Get-APSApplication",
               "Get-APSDirectoryConfigList",
               "Get-APSEntitlement",
               "Get-APSFleetList",
               "Get-APSImageBuilderList",
               "Get-APSImagePermission",
               "Get-APSImageList",
               "Get-APSSessionList",
               "Get-APSStackList",
               "Get-APSThemeForStack",
               "Get-APSUsageReportSubscription",
               "Get-APSUser",
               "Get-APSUserStackAssociation",
               "Disable-APSUser",
               "Remove-APSAppBlockBuilderAppBlock",
               "Unregister-APSApplicationFleet",
               "Remove-APSApplicationFromEntitlement",
               "Unregister-APSFleet",
               "Enable-APSUser",
               "Revoke-APSSession",
               "Get-APSAssociatedFleetList",
               "Get-APSAssociatedStackList",
               "Get-APSEntitledApplicationList",
               "Get-APSTagsForResourceList",
               "Start-APSAppBlockBuilder",
               "Start-APSFleet",
               "Start-APSImageBuilder",
               "Stop-APSAppBlockBuilder",
               "Stop-APSFleet",
               "Stop-APSImageBuilder",
               "Add-APSResourceTag",
               "Remove-APSResourceTag",
               "Update-APSAppBlockBuilder",
               "Update-APSApplication",
               "Update-APSDirectoryConfig",
               "Update-APSEntitlement",
               "Update-APSFleet",
               "Update-APSImagePermission",
               "Update-APSStack",
               "Update-APSThemeForStack")
}

_awsArgumentCompleterRegistration $APS_SelectCompleters $APS_SelectMap
# Argument completions for service AWS AppSync


$ASYN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AppSync.ApiCacheType
        {
            ($_ -eq "New-ASYNApiCache/Type") -Or
            ($_ -eq "Update-ASYNApiCache/Type")
        }
        {
            $v = "LARGE","LARGE_12X","LARGE_2X","LARGE_4X","LARGE_8X","MEDIUM","R4_2XLARGE","R4_4XLARGE","R4_8XLARGE","R4_LARGE","R4_XLARGE","SMALL","T2_MEDIUM","T2_SMALL","XLARGE"
            break
        }

        # Amazon.AppSync.ApiCachingBehavior
        {
            ($_ -eq "New-ASYNApiCache/ApiCachingBehavior") -Or
            ($_ -eq "Update-ASYNApiCache/ApiCachingBehavior")
        }
        {
            $v = "FULL_REQUEST_CACHING","PER_RESOLVER_CACHING"
            break
        }

        # Amazon.AppSync.AuthenticationType
        {
            ($_ -eq "New-ASYNGraphqlApi/AuthenticationType") -Or
            ($_ -eq "Update-ASYNGraphqlApi/AuthenticationType")
        }
        {
            $v = "AMAZON_COGNITO_USER_POOLS","API_KEY","AWS_IAM","AWS_LAMBDA","OPENID_CONNECT"
            break
        }

        # Amazon.AppSync.CacheHealthMetricsConfig
        {
            ($_ -eq "New-ASYNApiCache/HealthMetricsConfig") -Or
            ($_ -eq "Update-ASYNApiCache/HealthMetricsConfig")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.AppSync.ConflictDetectionType
        {
            ($_ -eq "New-ASYNFunction/SyncConfig_ConflictDetection") -Or
            ($_ -eq "New-ASYNResolver/SyncConfig_ConflictDetection") -Or
            ($_ -eq "Update-ASYNFunction/SyncConfig_ConflictDetection") -Or
            ($_ -eq "Update-ASYNResolver/SyncConfig_ConflictDetection")
        }
        {
            $v = "NONE","VERSION"
            break
        }

        # Amazon.AppSync.ConflictHandlerType
        {
            ($_ -eq "New-ASYNFunction/SyncConfig_ConflictHandler") -Or
            ($_ -eq "New-ASYNResolver/SyncConfig_ConflictHandler") -Or
            ($_ -eq "Update-ASYNFunction/SyncConfig_ConflictHandler") -Or
            ($_ -eq "Update-ASYNResolver/SyncConfig_ConflictHandler")
        }
        {
            $v = "AUTOMERGE","LAMBDA","NONE","OPTIMISTIC_CONCURRENCY"
            break
        }

        # Amazon.AppSync.DataSourceLevelMetricsBehavior
        {
            ($_ -eq "New-ASYNGraphqlApi/EnhancedMetricsConfig_DataSourceLevelMetricsBehavior") -Or
            ($_ -eq "Update-ASYNGraphqlApi/EnhancedMetricsConfig_DataSourceLevelMetricsBehavior")
        }
        {
            $v = "FULL_REQUEST_DATA_SOURCE_METRICS","PER_DATA_SOURCE_METRICS"
            break
        }

        # Amazon.AppSync.DataSourceLevelMetricsConfig
        {
            ($_ -eq "New-ASYNDataSource/MetricsConfig") -Or
            ($_ -eq "Update-ASYNDataSource/MetricsConfig")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.AppSync.DataSourceType
        {
            ($_ -eq "New-ASYNDataSource/Type") -Or
            ($_ -eq "Update-ASYNDataSource/Type")
        }
        {
            $v = "AMAZON_DYNAMODB","AMAZON_ELASTICSEARCH","AMAZON_EVENTBRIDGE","AMAZON_OPENSEARCH_SERVICE","AWS_LAMBDA","HTTP","NONE","RELATIONAL_DATABASE"
            break
        }

        # Amazon.AppSync.EventLogLevel
        {
            ($_ -eq "New-ASYNApi/LogConfig_LogLevel") -Or
            ($_ -eq "Update-ASYNApi/LogConfig_LogLevel")
        }
        {
            $v = "ALL","DEBUG","ERROR","INFO","NONE"
            break
        }

        # Amazon.AppSync.FieldLogLevel
        {
            ($_ -eq "New-ASYNGraphqlApi/LogConfig_FieldLogLevel") -Or
            ($_ -eq "Update-ASYNGraphqlApi/LogConfig_FieldLogLevel")
        }
        {
            $v = "ALL","DEBUG","ERROR","INFO","NONE"
            break
        }

        # Amazon.AppSync.GraphQLApiIntrospectionConfig
        {
            ($_ -eq "New-ASYNGraphqlApi/IntrospectionConfig") -Or
            ($_ -eq "Update-ASYNGraphqlApi/IntrospectionConfig")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.AppSync.GraphQLApiType
        {
            ($_ -eq "Get-ASYNGraphqlApiList/ApiType") -Or
            ($_ -eq "New-ASYNGraphqlApi/ApiType")
        }
        {
            $v = "GRAPHQL","MERGED"
            break
        }

        # Amazon.AppSync.GraphQLApiVisibility
        "New-ASYNGraphqlApi/Visibility"
        {
            $v = "GLOBAL","PRIVATE"
            break
        }

        # Amazon.AppSync.MergeType
        {
            ($_ -eq "Start-ASYNMergedGraphqlApi/SourceApiAssociationConfig_MergeType") -Or
            ($_ -eq "Start-ASYNSourceGraphqlApi/SourceApiAssociationConfig_MergeType") -Or
            ($_ -eq "Update-ASYNSourceApiAssociation/SourceApiAssociationConfig_MergeType")
        }
        {
            $v = "AUTO_MERGE","MANUAL_MERGE"
            break
        }

        # Amazon.AppSync.OperationLevelMetricsConfig
        {
            ($_ -eq "New-ASYNGraphqlApi/EnhancedMetricsConfig_OperationLevelMetricsConfig") -Or
            ($_ -eq "Update-ASYNGraphqlApi/EnhancedMetricsConfig_OperationLevelMetricsConfig")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.AppSync.OutputType
        "Get-ASYNIntrospectionSchema/Format"
        {
            $v = "JSON","SDL"
            break
        }

        # Amazon.AppSync.Ownership
        "Get-ASYNGraphqlApiList/Owner"
        {
            $v = "CURRENT_ACCOUNT","OTHER_ACCOUNTS"
            break
        }

        # Amazon.AppSync.RelationalDatabaseSourceType
        {
            ($_ -eq "New-ASYNDataSource/RelationalDatabaseConfig_RelationalDatabaseSourceType") -Or
            ($_ -eq "Update-ASYNDataSource/RelationalDatabaseConfig_RelationalDatabaseSourceType")
        }
        {
            $v = "RDS_HTTP_ENDPOINT"
            break
        }

        # Amazon.AppSync.ResolverKind
        {
            ($_ -eq "New-ASYNResolver/Kind") -Or
            ($_ -eq "Update-ASYNResolver/Kind")
        }
        {
            $v = "PIPELINE","UNIT"
            break
        }

        # Amazon.AppSync.ResolverLevelMetricsBehavior
        {
            ($_ -eq "New-ASYNGraphqlApi/EnhancedMetricsConfig_ResolverLevelMetricsBehavior") -Or
            ($_ -eq "Update-ASYNGraphqlApi/EnhancedMetricsConfig_ResolverLevelMetricsBehavior")
        }
        {
            $v = "FULL_REQUEST_RESOLVER_METRICS","PER_RESOLVER_METRICS"
            break
        }

        # Amazon.AppSync.ResolverLevelMetricsConfig
        {
            ($_ -eq "New-ASYNResolver/MetricsConfig") -Or
            ($_ -eq "Update-ASYNResolver/MetricsConfig")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.AppSync.RuntimeName
        {
            ($_ -eq "New-ASYNFunction/Runtime_Name") -Or
            ($_ -eq "New-ASYNResolver/Runtime_Name") -Or
            ($_ -eq "Test-ASYNCode/Runtime_Name") -Or
            ($_ -eq "Update-ASYNFunction/Runtime_Name") -Or
            ($_ -eq "Update-ASYNResolver/Runtime_Name")
        }
        {
            $v = "APPSYNC_JS"
            break
        }

        # Amazon.AppSync.TypeDefinitionFormat
        {
            ($_ -eq "Get-ASYNType/Format") -Or
            ($_ -eq "Get-ASYNTypeList/Format") -Or
            ($_ -eq "Get-ASYNTypesByAssociationList/Format") -Or
            ($_ -eq "New-ASYNType/Format") -Or
            ($_ -eq "Update-ASYNType/Format")
        }
        {
            $v = "JSON","SDL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ASYN_map = @{
    "ApiCachingBehavior"=@("New-ASYNApiCache","Update-ASYNApiCache")
    "ApiType"=@("Get-ASYNGraphqlApiList","New-ASYNGraphqlApi")
    "AuthenticationType"=@("New-ASYNGraphqlApi","Update-ASYNGraphqlApi")
    "EnhancedMetricsConfig_DataSourceLevelMetricsBehavior"=@("New-ASYNGraphqlApi","Update-ASYNGraphqlApi")
    "EnhancedMetricsConfig_OperationLevelMetricsConfig"=@("New-ASYNGraphqlApi","Update-ASYNGraphqlApi")
    "EnhancedMetricsConfig_ResolverLevelMetricsBehavior"=@("New-ASYNGraphqlApi","Update-ASYNGraphqlApi")
    "Format"=@("Get-ASYNIntrospectionSchema","Get-ASYNType","Get-ASYNTypeList","Get-ASYNTypesByAssociationList","New-ASYNType","Update-ASYNType")
    "HealthMetricsConfig"=@("New-ASYNApiCache","Update-ASYNApiCache")
    "IntrospectionConfig"=@("New-ASYNGraphqlApi","Update-ASYNGraphqlApi")
    "Kind"=@("New-ASYNResolver","Update-ASYNResolver")
    "LogConfig_FieldLogLevel"=@("New-ASYNGraphqlApi","Update-ASYNGraphqlApi")
    "LogConfig_LogLevel"=@("New-ASYNApi","Update-ASYNApi")
    "MetricsConfig"=@("New-ASYNDataSource","New-ASYNResolver","Update-ASYNDataSource","Update-ASYNResolver")
    "Owner"=@("Get-ASYNGraphqlApiList")
    "RelationalDatabaseConfig_RelationalDatabaseSourceType"=@("New-ASYNDataSource","Update-ASYNDataSource")
    "Runtime_Name"=@("New-ASYNFunction","New-ASYNResolver","Test-ASYNCode","Update-ASYNFunction","Update-ASYNResolver")
    "SourceApiAssociationConfig_MergeType"=@("Start-ASYNMergedGraphqlApi","Start-ASYNSourceGraphqlApi","Update-ASYNSourceApiAssociation")
    "SyncConfig_ConflictDetection"=@("New-ASYNFunction","New-ASYNResolver","Update-ASYNFunction","Update-ASYNResolver")
    "SyncConfig_ConflictHandler"=@("New-ASYNFunction","New-ASYNResolver","Update-ASYNFunction","Update-ASYNResolver")
    "Type"=@("New-ASYNApiCache","New-ASYNDataSource","Update-ASYNApiCache","Update-ASYNDataSource")
    "Visibility"=@("New-ASYNGraphqlApi")
}

_awsArgumentCompleterRegistration $ASYN_Completers $ASYN_map

$ASYN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ASYN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ASYN_SelectMap = @{
    "Select"=@("Start-ASYNApiAssociation",
               "Start-ASYNMergedGraphqlApi",
               "Start-ASYNSourceGraphqlApi",
               "New-ASYNApi",
               "New-ASYNApiCache",
               "New-ASYNApiKey",
               "New-ASYNChannelNamespace",
               "New-ASYNDataSource",
               "New-ASYNDomainName",
               "New-ASYNFunction",
               "New-ASYNGraphqlApi",
               "New-ASYNResolver",
               "New-ASYNType",
               "Remove-ASYNApi",
               "Remove-ASYNApiCache",
               "Remove-ASYNApiKey",
               "Remove-ASYNChannelNamespace",
               "Remove-ASYNDataSource",
               "Remove-ASYNDomainName",
               "Remove-ASYNFunction",
               "Remove-ASYNGraphqlApi",
               "Remove-ASYNResolver",
               "Remove-ASYNType",
               "Stop-ASYNApiAssociation",
               "Stop-ASYNMergedGraphqlApi",
               "Stop-ASYNSourceGraphqlApi",
               "Test-ASYNCode",
               "Test-ASYNMappingTemplate",
               "Clear-ASYNApiCache",
               "Get-ASYNApi",
               "Get-ASYNApiAssociation",
               "Get-ASYNApiCache",
               "Get-ASYNChannelNamespace",
               "Get-ASYNDataSource",
               "Get-ASYNDataSourceIntrospection",
               "Get-ASYNDomainName",
               "Get-ASYNFunction",
               "Get-ASYNGraphqlApi",
               "Get-ASYNGraphqlApiEnvironmentVariable",
               "Get-ASYNIntrospectionSchema",
               "Get-ASYNResolver",
               "Get-ASYNSchemaCreationStatus",
               "Get-ASYNSourceApiAssociation",
               "Get-ASYNType",
               "Get-ASYNApiKeyList",
               "Get-ASYNApiList",
               "Get-ASYNChannelNamespaceList",
               "Get-ASYNDataSourceList",
               "Get-ASYNDomainNameList",
               "Get-ASYNFunctionList",
               "Get-ASYNGraphqlApiList",
               "Get-ASYNResolverList",
               "Get-ASYNResolverListByFunction",
               "Get-ASYNSourceApiAssociationList",
               "Get-ASYNResourceTag",
               "Get-ASYNTypeList",
               "Get-ASYNTypesByAssociationList",
               "Write-ASYNGraphqlApiEnvironmentVariable",
               "Start-ASYNDataSourceIntrospection",
               "Start-ASYNSchemaCreation",
               "Start-ASYNSchemaMerge",
               "Add-ASYNResourceTag",
               "Remove-ASYNResourceTag",
               "Update-ASYNApi",
               "Update-ASYNApiCache",
               "Update-ASYNApiKey",
               "Update-ASYNChannelNamespace",
               "Update-ASYNDataSource",
               "Update-ASYNDomainName",
               "Update-ASYNFunction",
               "Update-ASYNGraphqlApi",
               "Update-ASYNResolver",
               "Update-ASYNSourceApiAssociation",
               "Update-ASYNType")
}

_awsArgumentCompleterRegistration $ASYN_SelectCompleters $ASYN_SelectMap
# Argument completions for service AWS Mainframe Modernization Application Testing


$AT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AT_SelectMap = @{
    "Select"=@("New-ATTestCase",
               "New-ATTestConfiguration",
               "New-ATTestSuite",
               "Remove-ATTestCase",
               "Remove-ATTestConfiguration",
               "Remove-ATTestRun",
               "Remove-ATTestSuite",
               "Get-ATTestCase",
               "Get-ATTestConfiguration",
               "Get-ATTestRunStep",
               "Get-ATTestSuite",
               "Get-ATResourceTag",
               "Get-ATTestCaseList",
               "Get-ATTestConfigurationList",
               "Get-ATTestRunList",
               "Get-ATTestRunStepList",
               "Get-ATTestRunTestCaseList",
               "Get-ATTestSuiteList",
               "Start-ATTestRun",
               "Add-ATResourceTag",
               "Remove-ATResourceTag",
               "Update-ATTestCase",
               "Update-ATTestConfiguration",
               "Update-ATTestSuite")
}

_awsArgumentCompleterRegistration $AT_SelectCompleters $AT_SelectMap
# Argument completions for service Amazon Prometheus Service


$PROM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PROM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PROM_SelectMap = @{
    "Select"=@("New-PROMAlertManagerDefinition",
               "New-PROMLoggingConfiguration",
               "New-PROMRuleGroupsNamespace",
               "New-PROMScraper",
               "New-PROMWorkspace",
               "Remove-PROMAlertManagerDefinition",
               "Remove-PROMLoggingConfiguration",
               "Remove-PROMRuleGroupsNamespace",
               "Remove-PROMScraper",
               "Remove-PROMWorkspace",
               "Get-PROMAlertManagerDefinition",
               "Get-PROMLoggingConfiguration",
               "Get-PROMRuleGroupsNamespace",
               "Get-PROMScraper",
               "Get-PROMWorkspace",
               "Get-PROMDefaultScraperConfiguration",
               "Get-PROMRuleGroupsNamespaceList",
               "Get-PROMScraperList",
               "Get-PROMResourceTag",
               "Get-PROMWorkspaceList",
               "Write-PROMAlertManagerDefinition",
               "Write-PROMRuleGroupsNamespace",
               "Add-PROMResourceTag",
               "Remove-PROMResourceTag",
               "Update-PROMLoggingConfiguration",
               "Update-PROMScraper",
               "Update-PROMWorkspaceAlias")
}

_awsArgumentCompleterRegistration $PROM_SelectCompleters $PROM_SelectMap
# Argument completions for service AWS ARC - Zonal Shift


$AZS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ARCZonalShift.AutoshiftExecutionStatus
        "Get-AZSAutoshiftList/Status"
        {
            $v = "ACTIVE","COMPLETED"
            break
        }

        # Amazon.ARCZonalShift.AutoshiftObserverNotificationStatus
        "Update-AZSAutoshiftObserverNotificationStatus/Status"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.ARCZonalShift.ZonalAutoshiftStatus
        "Update-AZSZonalAutoshiftConfiguration/ZonalAutoshiftStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.ARCZonalShift.ZonalShiftStatus
        "Get-AZSZonalShiftList/Status"
        {
            $v = "ACTIVE","CANCELED","EXPIRED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AZS_map = @{
    "Status"=@("Get-AZSAutoshiftList","Get-AZSZonalShiftList","Update-AZSAutoshiftObserverNotificationStatus")
    "ZonalAutoshiftStatus"=@("Update-AZSZonalAutoshiftConfiguration")
}

_awsArgumentCompleterRegistration $AZS_Completers $AZS_map

$AZS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AZS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AZS_SelectMap = @{
    "Select"=@("Stop-AZSZonalShift",
               "New-AZSPracticeRunConfiguration",
               "Remove-AZSPracticeRunConfiguration",
               "Get-AZSAutoshiftObserverNotificationStatus",
               "Get-AZSManagedResource",
               "Get-AZSAutoshiftList",
               "Get-AZSManagedResourceList",
               "Get-AZSZonalShiftList",
               "Start-AZSZonalShift",
               "Update-AZSAutoshiftObserverNotificationStatus",
               "Update-AZSPracticeRunConfiguration",
               "Update-AZSZonalAutoshiftConfiguration",
               "Update-AZSZonalShift")
}

_awsArgumentCompleterRegistration $AZS_SelectCompleters $AZS_SelectMap
# Argument completions for service AWS Artifact


$ART_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Artifact.NotificationSubscriptionStatus
        "Write-ARTAccountSetting/NotificationSubscriptionStatus"
        {
            $v = "NOT_SUBSCRIBED","SUBSCRIBED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ART_map = @{
    "NotificationSubscriptionStatus"=@("Write-ARTAccountSetting")
}

_awsArgumentCompleterRegistration $ART_Completers $ART_map

$ART_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ART.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ART_SelectMap = @{
    "Select"=@("Get-ARTAccountSetting",
               "Get-ARTReport",
               "Get-ARTReportMetadata",
               "Get-ARTTermForReport",
               "Get-ARTReportList",
               "Write-ARTAccountSetting")
}

_awsArgumentCompleterRegistration $ART_SelectCompleters $ART_SelectMap
# Argument completions for service Amazon Athena


$ATH_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Athena.AuthenticationType
        {
            ($_ -eq "New-ATHWorkGroup/QueryResultsS3AccessGrantsConfiguration_AuthenticationType") -Or
            ($_ -eq "Update-ATHWorkGroup/QueryResultsS3AccessGrantsConfiguration_AuthenticationType")
        }
        {
            $v = "DIRECTORY_IDENTITY"
            break
        }

        # Amazon.Athena.CalculationExecutionState
        "Get-ATHCalculationExecutionList/StateFilter"
        {
            $v = "CANCELED","CANCELING","COMPLETED","CREATED","CREATING","FAILED","QUEUED","RUNNING"
            break
        }

        # Amazon.Athena.DataCatalogType
        {
            ($_ -eq "New-ATHDataCatalog/Type") -Or
            ($_ -eq "Update-ATHDataCatalog/Type")
        }
        {
            $v = "GLUE","HIVE","LAMBDA"
            break
        }

        # Amazon.Athena.EncryptionOption
        {
            ($_ -eq "New-ATHWorkGroup/EncryptionConfiguration_EncryptionOption") -Or
            ($_ -eq "Start-ATHQueryExecution/EncryptionConfiguration_EncryptionOption") -Or
            ($_ -eq "Update-ATHWorkGroup/EncryptionConfiguration_EncryptionOption")
        }
        {
            $v = "CSE_KMS","SSE_KMS","SSE_S3"
            break
        }

        # Amazon.Athena.ExecutorState
        "Get-ATHExecutorList/ExecutorStateFilter"
        {
            $v = "CREATED","CREATING","FAILED","REGISTERED","TERMINATED","TERMINATING"
            break
        }

        # Amazon.Athena.NotebookType
        {
            ($_ -eq "Import-ATHNotebook/Type") -Or
            ($_ -eq "Update-ATHNotebook/Type")
        }
        {
            $v = "IPYNB"
            break
        }

        # Amazon.Athena.S3AclOption
        {
            ($_ -eq "New-ATHWorkGroup/AclConfiguration_S3AclOption") -Or
            ($_ -eq "Start-ATHQueryExecution/AclConfiguration_S3AclOption") -Or
            ($_ -eq "Update-ATHWorkGroup/AclConfiguration_S3AclOption")
        }
        {
            $v = "BUCKET_OWNER_FULL_CONTROL"
            break
        }

        # Amazon.Athena.SessionState
        "Get-ATHSessionList/StateFilter"
        {
            $v = "BUSY","CREATED","CREATING","DEGRADED","FAILED","IDLE","TERMINATED","TERMINATING"
            break
        }

        # Amazon.Athena.WorkGroupState
        "Update-ATHWorkGroup/State"
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ATH_map = @{
    "AclConfiguration_S3AclOption"=@("New-ATHWorkGroup","Start-ATHQueryExecution","Update-ATHWorkGroup")
    "EncryptionConfiguration_EncryptionOption"=@("New-ATHWorkGroup","Start-ATHQueryExecution","Update-ATHWorkGroup")
    "ExecutorStateFilter"=@("Get-ATHExecutorList")
    "QueryResultsS3AccessGrantsConfiguration_AuthenticationType"=@("New-ATHWorkGroup","Update-ATHWorkGroup")
    "State"=@("Update-ATHWorkGroup")
    "StateFilter"=@("Get-ATHCalculationExecutionList","Get-ATHSessionList")
    "Type"=@("Import-ATHNotebook","New-ATHDataCatalog","Update-ATHDataCatalog","Update-ATHNotebook")
}

_awsArgumentCompleterRegistration $ATH_Completers $ATH_map

$ATH_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ATH.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ATH_SelectMap = @{
    "Select"=@("Get-ATHNamedQueryBatch",
               "Get-ATHBatchPreparedStatement",
               "Get-ATHQueryExecutionBatch",
               "Stop-ATHCapacityReservation",
               "New-ATHCapacityReservation",
               "New-ATHDataCatalog",
               "New-ATHNamedQuery",
               "New-ATHNotebook",
               "New-ATHPreparedStatement",
               "New-ATHPresignedNotebookUrl",
               "New-ATHWorkGroup",
               "Remove-ATHCapacityReservation",
               "Remove-ATHDataCatalog",
               "Remove-ATHNamedQuery",
               "Remove-ATHNotebook",
               "Remove-ATHPreparedStatement",
               "Remove-ATHWorkGroup",
               "Export-ATHNotebook",
               "Get-ATHCalculationExecution",
               "Get-ATHCalculationExecutionCode",
               "Get-ATHCalculationExecutionStatus",
               "Get-ATHCapacityAssignmentConfiguration",
               "Get-ATHCapacityReservation",
               "Get-ATHDatabase",
               "Get-ATHDataCatalog",
               "Get-ATHNamedQuery",
               "Get-ATHNotebookMetadata",
               "Get-ATHPreparedStatement",
               "Get-ATHQueryExecution",
               "Get-ATHQueryResult",
               "Get-ATHQueryRuntimeStatistic",
               "Get-ATHSession",
               "Get-ATHSessionStatus",
               "Get-ATHTableMetadata",
               "Get-ATHWorkGroup",
               "Import-ATHNotebook",
               "Get-ATHApplicationDPUSizeList",
               "Get-ATHCalculationExecutionList",
               "Get-ATHCapacityReservationList",
               "Get-ATHDatabasisList",
               "Get-ATHDataCatalogList",
               "Get-ATHEngineVersionList",
               "Get-ATHExecutorList",
               "Get-ATHNamedQueryList",
               "Get-ATHNotebookMetadataList",
               "Get-ATHNotebookSessionList",
               "Get-ATHPreparedStatementList",
               "Get-ATHQueryExecutionList",
               "Get-ATHSessionList",
               "Get-ATHTableMetadataList",
               "Get-ATHResourceTag",
               "Get-ATHWorkGroupList",
               "Write-ATHCapacityAssignmentConfiguration",
               "Start-ATHCalculationExecution",
               "Start-ATHQueryExecution",
               "Start-ATHSession",
               "Stop-ATHCalculationExecution",
               "Stop-ATHQueryExecution",
               "Add-ATHResourceTag",
               "Remove-ATHSession",
               "Remove-ATHResourceTag",
               "Update-ATHCapacityReservation",
               "Update-ATHDataCatalog",
               "Update-ATHNamedQuery",
               "Update-ATHNotebook",
               "Update-ATHNotebookMetadata",
               "Update-ATHPreparedStatement",
               "Update-ATHWorkGroup")
}

_awsArgumentCompleterRegistration $ATH_SelectCompleters $ATH_SelectMap
# Argument completions for service AWS Audit Manager


$AUDM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AuditManager.AssessmentReportDestinationType
        {
            ($_ -eq "Edit-AUDMAssessment/AssessmentReportsDestination_DestinationType") -Or
            ($_ -eq "New-AUDMAssessment/AssessmentReportsDestination_DestinationType") -Or
            ($_ -eq "Edit-AUDMSetting/DefaultAssessmentReportsDestination_DestinationType")
        }
        {
            $v = "S3"
            break
        }

        # Amazon.AuditManager.AssessmentStatus
        {
            ($_ -eq "Edit-AUDMAssessmentStatus/Status") -Or
            ($_ -eq "Get-AUDMAssessmentList/Status")
        }
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.AuditManager.ControlSetStatus
        "Edit-AUDMAssessmentControlSetStatus/Status"
        {
            $v = "ACTIVE","REVIEWED","UNDER_REVIEW"
            break
        }

        # Amazon.AuditManager.ControlStatus
        "Edit-AUDMAssessmentControl/ControlStatus"
        {
            $v = "INACTIVE","REVIEWED","UNDER_REVIEW"
            break
        }

        # Amazon.AuditManager.ControlType
        "Get-AUDMControlList/ControlType"
        {
            $v = "Core","Custom","Standard"
            break
        }

        # Amazon.AuditManager.DataSourceType
        "Get-AUDMKeywordForDataSourceList/Source"
        {
            $v = "AWS_API_Call","AWS_Cloudtrail","AWS_Config","AWS_Security_Hub","MANUAL"
            break
        }

        # Amazon.AuditManager.DeleteResources
        "Edit-AUDMSetting/DeregistrationPolicy_DeleteResource"
        {
            $v = "ALL","DEFAULT"
            break
        }

        # Amazon.AuditManager.ExportDestinationType
        "Edit-AUDMSetting/DefaultExportDestination_DestinationType"
        {
            $v = "S3"
            break
        }

        # Amazon.AuditManager.FrameworkType
        "Get-AUDMAssessmentFrameworkList/FrameworkType"
        {
            $v = "Custom","Standard"
            break
        }

        # Amazon.AuditManager.SettingAttribute
        "Get-AUDMSetting/Attribute"
        {
            $v = "ALL","DEFAULT_ASSESSMENT_REPORTS_DESTINATION","DEFAULT_EXPORT_DESTINATION","DEFAULT_PROCESS_OWNERS","DEREGISTRATION_POLICY","EVIDENCE_FINDER_ENABLEMENT","IS_AWS_ORG_ENABLED","SNS_TOPIC"
            break
        }

        # Amazon.AuditManager.ShareRequestAction
        "Update-AUDMAssessmentFrameworkShare/Action"
        {
            $v = "ACCEPT","DECLINE","REVOKE"
            break
        }

        # Amazon.AuditManager.ShareRequestType
        {
            ($_ -eq "Get-AUDMAssessmentFrameworkShareRequestList/RequestType") -Or
            ($_ -eq "Remove-AUDMAssessmentFrameworkShare/RequestType") -Or
            ($_ -eq "Update-AUDMAssessmentFrameworkShare/RequestType")
        }
        {
            $v = "RECEIVED","SENT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AUDM_map = @{
    "Action"=@("Update-AUDMAssessmentFrameworkShare")
    "AssessmentReportsDestination_DestinationType"=@("Edit-AUDMAssessment","New-AUDMAssessment")
    "Attribute"=@("Get-AUDMSetting")
    "ControlStatus"=@("Edit-AUDMAssessmentControl")
    "ControlType"=@("Get-AUDMControlList")
    "DefaultAssessmentReportsDestination_DestinationType"=@("Edit-AUDMSetting")
    "DefaultExportDestination_DestinationType"=@("Edit-AUDMSetting")
    "DeregistrationPolicy_DeleteResource"=@("Edit-AUDMSetting")
    "FrameworkType"=@("Get-AUDMAssessmentFrameworkList")
    "RequestType"=@("Get-AUDMAssessmentFrameworkShareRequestList","Remove-AUDMAssessmentFrameworkShare","Update-AUDMAssessmentFrameworkShare")
    "Source"=@("Get-AUDMKeywordForDataSourceList")
    "Status"=@("Edit-AUDMAssessmentControlSetStatus","Edit-AUDMAssessmentStatus","Get-AUDMAssessmentList")
}

_awsArgumentCompleterRegistration $AUDM_Completers $AUDM_map

$AUDM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AUDM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AUDM_SelectMap = @{
    "Select"=@("Add-AUDMAssessmentReportEvidenceFolder",
               "Add-AUDMAssessmentReportEvidence",
               "New-AUDMCreateDelegationByAssessment",
               "Remove-AUDMDelegationByAssessment",
               "Remove-AUDMAssessmentReportEvidence",
               "Add-AUDMEvidenceToAssessmentControl",
               "New-AUDMAssessment",
               "New-AUDMAssessmentFramework",
               "New-AUDMAssessmentReport",
               "New-AUDMControl",
               "Remove-AUDMAssessment",
               "Remove-AUDMAssessmentFramework",
               "Remove-AUDMAssessmentFrameworkShare",
               "Remove-AUDMAssessmentReport",
               "Remove-AUDMControl",
               "Unregister-AUDMAccount",
               "Unregister-AUDMOrganizationAdminAccount",
               "Remove-AUDMAssessmentReportEvidenceFolder",
               "Get-AUDMAccountStatus",
               "Get-AUDMAssessment",
               "Get-AUDMAssessmentFramework",
               "Get-AUDMAssessmentReportUrl",
               "Get-AUDMChangeLog",
               "Get-AUDMControl",
               "Get-AUDMDelegation",
               "Get-AUDMEvidence",
               "Get-AUDMEvidenceByEvidenceFolder",
               "Get-AUDMEvidenceFileUploadUrl",
               "Get-AUDMEvidenceFolder",
               "Get-AUDMEvidenceFolderByAssessment",
               "Get-AUDMEvidenceFolderByAssessmentControl",
               "Get-AUDMInsight",
               "Get-AUDMInsightsByAssessment",
               "Get-AUDMOrganizationAdminAccount",
               "Get-AUDMServiceInScope",
               "Get-AUDMSetting",
               "Get-AUDMAssessmentControlInsightsByControlDomainList",
               "Get-AUDMAssessmentFrameworkList",
               "Get-AUDMAssessmentFrameworkShareRequestList",
               "Get-AUDMAssessmentReportList",
               "Get-AUDMAssessmentList",
               "Get-AUDMControlDomainInsightList",
               "Get-AUDMControlDomainInsightsByAssessmentList",
               "Get-AUDMControlInsightsByControlDomainList",
               "Get-AUDMControlList",
               "Get-AUDMKeywordForDataSourceList",
               "Get-AUDMNotificationList",
               "Get-AUDMResourceTagList",
               "Register-AUDMAccount",
               "Register-AUDMOrganizationAdminAccount",
               "Start-AUDMAssessmentFrameworkShare",
               "Add-AUDMResourceTag",
               "Remove-AUDMResourceTag",
               "Edit-AUDMAssessment",
               "Edit-AUDMAssessmentControl",
               "Edit-AUDMAssessmentControlSetStatus",
               "Edit-AUDMAssessmentFramework",
               "Update-AUDMAssessmentFrameworkShare",
               "Edit-AUDMAssessmentStatus",
               "Edit-AUDMControl",
               "Edit-AUDMSetting",
               "Confirm-AUDMAssessmentReportIntegrity")
}

_awsArgumentCompleterRegistration $AUDM_SelectCompleters $AUDM_SelectMap
# Argument completions for service AWS Auto Scaling


$AS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AutoScaling.InstanceMetadataEndpointState
        "New-ASLaunchConfiguration/MetadataOptions_HttpEndpoint"
        {
            $v = "disabled","enabled"
            break
        }

        # Amazon.AutoScaling.InstanceMetadataHttpTokensState
        "New-ASLaunchConfiguration/MetadataOptions_HttpToken"
        {
            $v = "optional","required"
            break
        }

        # Amazon.AutoScaling.MetricStatistic
        "Write-ASScalingPolicy/CustomizedMetricSpecification_Statistic"
        {
            $v = "Average","Maximum","Minimum","SampleCount","Sum"
            break
        }

        # Amazon.AutoScaling.MetricType
        "Write-ASScalingPolicy/PredefinedMetricSpecification_PredefinedMetricType"
        {
            $v = "ALBRequestCountPerTarget","ASGAverageCPUUtilization","ASGAverageNetworkIn","ASGAverageNetworkOut"
            break
        }

        # Amazon.AutoScaling.PredictiveScalingMaxCapacityBreachBehavior
        "Write-ASScalingPolicy/PredictiveScalingConfiguration_MaxCapacityBreachBehavior"
        {
            $v = "HonorMaxCapacity","IncreaseMaxCapacity"
            break
        }

        # Amazon.AutoScaling.PredictiveScalingMode
        "Write-ASScalingPolicy/PredictiveScalingConfiguration_Mode"
        {
            $v = "ForecastAndScale","ForecastOnly"
            break
        }

        # Amazon.AutoScaling.RefreshStrategy
        "Start-ASInstanceRefresh/Strategy"
        {
            $v = "Rolling"
            break
        }

        # Amazon.AutoScaling.ScaleInProtectedInstances
        "Start-ASInstanceRefresh/Preferences_ScaleInProtectedInstance"
        {
            $v = "Ignore","Refresh","Wait"
            break
        }

        # Amazon.AutoScaling.StandbyInstances
        "Start-ASInstanceRefresh/Preferences_StandbyInstance"
        {
            $v = "Ignore","Terminate","Wait"
            break
        }

        # Amazon.AutoScaling.WarmPoolState
        "Write-ASWarmPool/PoolState"
        {
            $v = "Hibernated","Running","Stopped"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AS_map = @{
    "CustomizedMetricSpecification_Statistic"=@("Write-ASScalingPolicy")
    "MetadataOptions_HttpEndpoint"=@("New-ASLaunchConfiguration")
    "MetadataOptions_HttpToken"=@("New-ASLaunchConfiguration")
    "PoolState"=@("Write-ASWarmPool")
    "PredefinedMetricSpecification_PredefinedMetricType"=@("Write-ASScalingPolicy")
    "PredictiveScalingConfiguration_MaxCapacityBreachBehavior"=@("Write-ASScalingPolicy")
    "PredictiveScalingConfiguration_Mode"=@("Write-ASScalingPolicy")
    "Preferences_ScaleInProtectedInstance"=@("Start-ASInstanceRefresh")
    "Preferences_StandbyInstance"=@("Start-ASInstanceRefresh")
    "Strategy"=@("Start-ASInstanceRefresh")
}

_awsArgumentCompleterRegistration $AS_Completers $AS_map

$AS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AS_SelectMap = @{
    "Select"=@("Mount-ASInstance",
               "Add-ASLoadBalancer",
               "Add-ASLoadBalancerTargetGroup",
               "Add-ASTrafficSource",
               "Remove-ASScheduledActionBatch",
               "Set-ASScheduledUpdateGroupActionBatch",
               "Stop-ASInstanceRefresh",
               "Complete-ASLifecycleAction",
               "New-ASAutoScalingGroup",
               "New-ASLaunchConfiguration",
               "Set-ASTag",
               "Remove-ASAutoScalingGroup",
               "Remove-ASLaunchConfiguration",
               "Remove-ASLifecycleHook",
               "Remove-ASNotificationConfiguration",
               "Remove-ASPolicy",
               "Remove-ASScheduledAction",
               "Remove-ASTag",
               "Remove-ASWarmPool",
               "Get-ASAccountLimit",
               "Get-ASAdjustmentType",
               "Get-ASAutoScalingGroup",
               "Get-ASAutoScalingInstance",
               "Get-ASAutoScalingNotificationType",
               "Get-ASInstanceRefresh",
               "Get-ASLaunchConfiguration",
               "Get-ASLifecycleHook",
               "Get-ASLifecycleHookType",
               "Get-ASLoadBalancer",
               "Get-ASLoadBalancerTargetGroup",
               "Get-ASMetricCollectionType",
               "Get-ASNotificationConfiguration",
               "Get-ASPolicy",
               "Get-ASScalingActivity",
               "Get-ASScalingProcessType",
               "Get-ASScheduledAction",
               "Get-ASTag",
               "Get-ASTerminationPolicyType",
               "Get-ASTrafficSource",
               "Get-ASWarmPool",
               "Dismount-ASInstance",
               "Dismount-ASLoadBalancer",
               "Dismount-ASLoadBalancerTargetGroup",
               "Dismount-ASTrafficSource",
               "Disable-ASMetricsCollection",
               "Enable-ASMetricsCollection",
               "Enter-ASStandby",
               "Start-ASPolicy",
               "Exit-ASStandby",
               "Get-ASPredictiveScalingForecast",
               "Write-ASLifecycleHook",
               "Write-ASNotificationConfiguration",
               "Write-ASScalingPolicy",
               "Write-ASScheduledUpdateGroupAction",
               "Write-ASWarmPool",
               "Write-ASLifecycleActionHeartbeat",
               "Resume-ASProcess",
               "Undo-ASInstanceRefresh",
               "Set-ASDesiredCapacity",
               "Set-ASInstanceHealth",
               "Set-ASInstanceProtection",
               "Start-ASInstanceRefresh",
               "Suspend-ASProcess",
               "Stop-ASInstanceInAutoScalingGroup",
               "Update-ASAutoScalingGroup")
}

_awsArgumentCompleterRegistration $AS_SelectCompleters $AS_SelectMap
# Argument completions for service AWS Auto Scaling Plans


$ASP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AutoScalingPlans.ForecastDataType
        "Get-ASPScalingPlanResourceForecastData/ForecastDataType"
        {
            $v = "CapacityForecast","LoadForecast","ScheduledActionMaxCapacity","ScheduledActionMinCapacity"
            break
        }

        # Amazon.AutoScalingPlans.ScalableDimension
        "Get-ASPScalingPlanResourceForecastData/ScalableDimension"
        {
            $v = "autoscaling:autoScalingGroup:DesiredCapacity","dynamodb:index:ReadCapacityUnits","dynamodb:index:WriteCapacityUnits","dynamodb:table:ReadCapacityUnits","dynamodb:table:WriteCapacityUnits","ec2:spot-fleet-request:TargetCapacity","ecs:service:DesiredCount","rds:cluster:ReadReplicaCount"
            break
        }

        # Amazon.AutoScalingPlans.ServiceNamespace
        "Get-ASPScalingPlanResourceForecastData/ServiceNamespace"
        {
            $v = "autoscaling","dynamodb","ec2","ecs","rds"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ASP_map = @{
    "ForecastDataType"=@("Get-ASPScalingPlanResourceForecastData")
    "ScalableDimension"=@("Get-ASPScalingPlanResourceForecastData")
    "ServiceNamespace"=@("Get-ASPScalingPlanResourceForecastData")
}

_awsArgumentCompleterRegistration $ASP_Completers $ASP_map

$ASP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ASP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ASP_SelectMap = @{
    "Select"=@("New-ASPScalingPlan",
               "Remove-ASPScalingPlan",
               "Get-ASPScalingPlanResource",
               "Get-ASPScalingPlan",
               "Get-ASPScalingPlanResourceForecastData",
               "Update-ASPScalingPlan")
}

_awsArgumentCompleterRegistration $ASP_SelectCompleters $ASP_SelectMap
# Argument completions for service AWS Migration Hub


$MH_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MigrationHub.ApplicationStatus
        "Send-MHApplicationStateNotification/Status"
        {
            $v = "COMPLETED","IN_PROGRESS","NOT_STARTED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MH_map = @{
    "Status"=@("Send-MHApplicationStateNotification")
}

_awsArgumentCompleterRegistration $MH_Completers $MH_map

$MH_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MH.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MH_SelectMap = @{
    "Select"=@("Add-MHCreatedArtifact",
               "Add-MHDiscoveredResource",
               "New-MHProgressUpdateStream",
               "Remove-MHProgressUpdateStream",
               "Get-MHApplicationState",
               "Get-MHMigrationTask",
               "Remove-MHCreatedArtifact",
               "Remove-MHDiscoveredResource",
               "Import-MHMigrationTask",
               "Get-MHApplicationStateList",
               "Get-MHCreatedArtifactList",
               "Get-MHDiscoveredResourceList",
               "Get-MHMigrationTaskList",
               "Get-MHProgressUpdateStream",
               "Send-MHApplicationStateNotification",
               "Send-MHMigrationTaskStateNotification",
               "Set-MHResourceAttribute")
}

_awsArgumentCompleterRegistration $MH_SelectCompleters $MH_SelectMap
# Argument completions for service AWS B2B Data Interchange


$B2BI_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.B2bi.CapabilityDirection
        {
            ($_ -eq "New-B2BICapability/Edi_CapabilityDirection") -Or
            ($_ -eq "Update-B2BICapability/Edi_CapabilityDirection")
        }
        {
            $v = "INBOUND","OUTBOUND"
            break
        }

        # Amazon.B2bi.CapabilityType
        "New-B2BICapability/Type"
        {
            $v = "edi"
            break
        }

        # Amazon.B2bi.ConversionSourceFormat
        "Test-B2BIConversion/Source_FileFormat"
        {
            $v = "JSON","XML"
            break
        }

        # Amazon.B2bi.ConversionTargetFormat
        "Test-B2BIConversion/Target_FileFormat"
        {
            $v = "X12"
            break
        }

        # Amazon.B2bi.FileFormat
        {
            ($_ -eq "New-B2BITransformer/FileFormat") -Or
            ($_ -eq "Test-B2BIMapping/FileFormat") -Or
            ($_ -eq "Test-B2BIParsing/FileFormat") -Or
            ($_ -eq "Update-B2BITransformer/FileFormat")
        }
        {
            $v = "JSON","NOT_USED","XML"
            break
        }

        # Amazon.B2bi.FromFormat
        {
            ($_ -eq "New-B2BITransformer/InputConversion_FromFormat") -Or
            ($_ -eq "Update-B2BITransformer/InputConversion_FromFormat")
        }
        {
            $v = "X12"
            break
        }

        # Amazon.B2bi.Logging
        "New-B2BIProfile/Logging"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.B2bi.MappingTemplateLanguage
        {
            ($_ -eq "New-B2BITransformer/Mapping_TemplateLanguage") -Or
            ($_ -eq "Update-B2BITransformer/Mapping_TemplateLanguage")
        }
        {
            $v = "JSONATA","XSLT"
            break
        }

        # Amazon.B2bi.MappingType
        "New-B2BIStarterMappingTemplate/MappingType"
        {
            $v = "JSONATA","XSLT"
            break
        }

        # Amazon.B2bi.ToFormat
        {
            ($_ -eq "New-B2BITransformer/OutputConversion_ToFormat") -Or
            ($_ -eq "Update-B2BITransformer/OutputConversion_ToFormat")
        }
        {
            $v = "X12"
            break
        }

        # Amazon.B2bi.TransformerStatus
        "Update-B2BITransformer/Status"
        {
            $v = "active","inactive"
            break
        }

        # Amazon.B2bi.X12TransactionSet
        {
            ($_ -eq "New-B2BITransformer/InputConversion_FormatOptions_X12_TransactionSet") -Or
            ($_ -eq "Update-B2BITransformer/InputConversion_FormatOptions_X12_TransactionSet") -Or
            ($_ -eq "New-B2BITransformer/OutputConversion_FormatOptions_X12_TransactionSet") -Or
            ($_ -eq "Update-B2BITransformer/OutputConversion_FormatOptions_X12_TransactionSet") -Or
            ($_ -eq "New-B2BIStarterMappingTemplate/X12_TransactionSet") -Or
            ($_ -eq "Test-B2BIConversion/X12_TransactionSet") -Or
            ($_ -eq "New-B2BICapability/X12Details_TransactionSet") -Or
            ($_ -eq "New-B2BITransformer/X12Details_TransactionSet") -Or
            ($_ -eq "Test-B2BIParsing/X12Details_TransactionSet") -Or
            ($_ -eq "Update-B2BICapability/X12Details_TransactionSet") -Or
            ($_ -eq "Update-B2BITransformer/X12Details_TransactionSet")
        }
        {
            $v = "X12_110","X12_180","X12_204","X12_210","X12_211","X12_214","X12_215","X12_259","X12_260","X12_266","X12_269","X12_270","X12_270_X279","X12_271","X12_271_X279","X12_274","X12_275","X12_275_X210","X12_275_X211","X12_276","X12_276_X212","X12_277","X12_277_X212","X12_277_X214","X12_277_X364","X12_278","X12_278_X217","X12_310","X12_315","X12_322","X12_404","X12_410","X12_417","X12_421","X12_426","X12_810","X12_820","X12_820_X218","X12_820_X306","X12_824","X12_824_X186","X12_830","X12_832","X12_834","X12_834_X220","X12_834_X307","X12_834_X318","X12_835","X12_835_X221","X12_837","X12_837_X222","X12_837_X223","X12_837_X224","X12_837_X291","X12_837_X292","X12_837_X298","X12_844","X12_846","X12_849","X12_850","X12_852","X12_855","X12_856","X12_860","X12_861","X12_864","X12_865","X12_869","X12_870","X12_940","X12_945","X12_990","X12_997","X12_999","X12_999_X231"
            break
        }

        # Amazon.B2bi.X12Version
        {
            ($_ -eq "New-B2BITransformer/InputConversion_FormatOptions_X12_Version") -Or
            ($_ -eq "Update-B2BITransformer/InputConversion_FormatOptions_X12_Version") -Or
            ($_ -eq "New-B2BITransformer/OutputConversion_FormatOptions_X12_Version") -Or
            ($_ -eq "Update-B2BITransformer/OutputConversion_FormatOptions_X12_Version") -Or
            ($_ -eq "New-B2BIStarterMappingTemplate/X12_Version") -Or
            ($_ -eq "Test-B2BIConversion/X12_Version") -Or
            ($_ -eq "New-B2BICapability/X12Details_Version") -Or
            ($_ -eq "New-B2BITransformer/X12Details_Version") -Or
            ($_ -eq "Test-B2BIParsing/X12Details_Version") -Or
            ($_ -eq "Update-B2BICapability/X12Details_Version") -Or
            ($_ -eq "Update-B2BITransformer/X12Details_Version")
        }
        {
            $v = "VERSION_4010","VERSION_4030","VERSION_5010","VERSION_5010_HIPAA"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$B2BI_map = @{
    "Edi_CapabilityDirection"=@("New-B2BICapability","Update-B2BICapability")
    "FileFormat"=@("New-B2BITransformer","Test-B2BIMapping","Test-B2BIParsing","Update-B2BITransformer")
    "InputConversion_FormatOptions_X12_TransactionSet"=@("New-B2BITransformer","Update-B2BITransformer")
    "InputConversion_FormatOptions_X12_Version"=@("New-B2BITransformer","Update-B2BITransformer")
    "InputConversion_FromFormat"=@("New-B2BITransformer","Update-B2BITransformer")
    "Logging"=@("New-B2BIProfile")
    "Mapping_TemplateLanguage"=@("New-B2BITransformer","Update-B2BITransformer")
    "MappingType"=@("New-B2BIStarterMappingTemplate")
    "OutputConversion_FormatOptions_X12_TransactionSet"=@("New-B2BITransformer","Update-B2BITransformer")
    "OutputConversion_FormatOptions_X12_Version"=@("New-B2BITransformer","Update-B2BITransformer")
    "OutputConversion_ToFormat"=@("New-B2BITransformer","Update-B2BITransformer")
    "Source_FileFormat"=@("Test-B2BIConversion")
    "Status"=@("Update-B2BITransformer")
    "Target_FileFormat"=@("Test-B2BIConversion")
    "Type"=@("New-B2BICapability")
    "X12_TransactionSet"=@("New-B2BIStarterMappingTemplate","Test-B2BIConversion")
    "X12_Version"=@("New-B2BIStarterMappingTemplate","Test-B2BIConversion")
    "X12Details_TransactionSet"=@("New-B2BICapability","New-B2BITransformer","Test-B2BIParsing","Update-B2BICapability","Update-B2BITransformer")
    "X12Details_Version"=@("New-B2BICapability","New-B2BITransformer","Test-B2BIParsing","Update-B2BICapability","Update-B2BITransformer")
}

_awsArgumentCompleterRegistration $B2BI_Completers $B2BI_map

$B2BI_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.B2BI.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$B2BI_SelectMap = @{
    "Select"=@("New-B2BICapability",
               "New-B2BIPartnership",
               "New-B2BIProfile",
               "New-B2BIStarterMappingTemplate",
               "New-B2BITransformer",
               "Remove-B2BICapability",
               "Remove-B2BIPartnership",
               "Remove-B2BIProfile",
               "Remove-B2BITransformer",
               "Get-B2BICapability",
               "Get-B2BIPartnership",
               "Get-B2BIProfile",
               "Get-B2BITransformer",
               "Get-B2BITransformerJob",
               "Get-B2BICapabilityList",
               "Get-B2BIPartnershipList",
               "Get-B2BIProfileList",
               "Get-B2BIResourceTag",
               "Get-B2BITransformerList",
               "Start-B2BITransformerJob",
               "Add-B2BIResourceTag",
               "Test-B2BIConversion",
               "Test-B2BIMapping",
               "Test-B2BIParsing",
               "Remove-B2BIResourceTag",
               "Update-B2BICapability",
               "Update-B2BIPartnership",
               "Update-B2BIProfile",
               "Update-B2BITransformer")
}

_awsArgumentCompleterRegistration $B2BI_SelectCompleters $B2BI_SelectMap
# Argument completions for service AWS Backup


$BAK_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Backup.AggregationPeriod
        {
            ($_ -eq "Get-BAKBackupJobSummaryList/AggregationPeriod") -Or
            ($_ -eq "Get-BAKCopyJobSummaryList/AggregationPeriod") -Or
            ($_ -eq "Get-BAKRestoreJobSummaryList/AggregationPeriod")
        }
        {
            $v = "FOURTEEN_DAYS","ONE_DAY","SEVEN_DAYS"
            break
        }

        # Amazon.Backup.BackupJobState
        "Get-BAKBackupJobList/ByState"
        {
            $v = "ABORTED","ABORTING","COMPLETED","CREATED","EXPIRED","FAILED","PARTIAL","PENDING","RUNNING"
            break
        }

        # Amazon.Backup.BackupJobStatus
        "Get-BAKBackupJobSummaryList/State"
        {
            $v = "ABORTED","ABORTING","AGGREGATE_ALL","ANY","COMPLETED","CREATED","EXPIRED","FAILED","PARTIAL","PENDING","RUNNING"
            break
        }

        # Amazon.Backup.CopyJobState
        "Get-BAKCopyJobList/ByState"
        {
            $v = "COMPLETED","CREATED","FAILED","PARTIAL","RUNNING"
            break
        }

        # Amazon.Backup.CopyJobStatus
        "Get-BAKCopyJobSummaryList/State"
        {
            $v = "ABORTED","ABORTING","AGGREGATE_ALL","ANY","COMPLETED","COMPLETING","CREATED","FAILED","FAILING","PARTIAL","RUNNING"
            break
        }

        # Amazon.Backup.RestoreJobState
        "Get-BAKRestoreJobSummaryList/State"
        {
            $v = "ABORTED","AGGREGATE_ALL","ANY","COMPLETED","CREATED","FAILED","PENDING","RUNNING"
            break
        }

        # Amazon.Backup.RestoreJobStatus
        {
            ($_ -eq "Get-BAKRestoreJobList/ByStatus") -Or
            ($_ -eq "Get-BAKRestoreJobsByProtectedResourceList/ByStatus")
        }
        {
            $v = "ABORTED","COMPLETED","FAILED","PENDING","RUNNING"
            break
        }

        # Amazon.Backup.RestoreTestingRecoveryPointSelectionAlgorithm
        {
            ($_ -eq "New-BAKRestoreTestingPlan/RecoveryPointSelection_Algorithm") -Or
            ($_ -eq "Update-BAKRestoreTestingPlan/RecoveryPointSelection_Algorithm")
        }
        {
            $v = "LATEST_WITHIN_WINDOW","RANDOM_WITHIN_WINDOW"
            break
        }

        # Amazon.Backup.RestoreValidationStatus
        "Write-BAKRestoreValidationResult/ValidationStatus"
        {
            $v = "FAILED","SUCCESSFUL","TIMED_OUT","VALIDATING"
            break
        }

        # Amazon.Backup.VaultType
        "Get-BAKBackupVaultList/ByVaultType"
        {
            $v = "BACKUP_VAULT","LOGICALLY_AIR_GAPPED_BACKUP_VAULT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BAK_map = @{
    "AggregationPeriod"=@("Get-BAKBackupJobSummaryList","Get-BAKCopyJobSummaryList","Get-BAKRestoreJobSummaryList")
    "ByState"=@("Get-BAKBackupJobList","Get-BAKCopyJobList")
    "ByStatus"=@("Get-BAKRestoreJobList","Get-BAKRestoreJobsByProtectedResourceList")
    "ByVaultType"=@("Get-BAKBackupVaultList")
    "RecoveryPointSelection_Algorithm"=@("New-BAKRestoreTestingPlan","Update-BAKRestoreTestingPlan")
    "State"=@("Get-BAKBackupJobSummaryList","Get-BAKCopyJobSummaryList","Get-BAKRestoreJobSummaryList")
    "ValidationStatus"=@("Write-BAKRestoreValidationResult")
}

_awsArgumentCompleterRegistration $BAK_Completers $BAK_map

$BAK_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BAK.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BAK_SelectMap = @{
    "Select"=@("Stop-BAKLegalHold",
               "New-BAKBackupPlan",
               "New-BAKBackupSelection",
               "New-BAKBackupVault",
               "New-BAKFramework",
               "New-BAKLegalHold",
               "New-BAKLogicallyAirGappedBackupVault",
               "New-BAKReportPlan",
               "New-BAKRestoreTestingPlan",
               "New-BAKRestoreTestingSelection",
               "Remove-BAKBackupPlan",
               "Remove-BAKBackupSelection",
               "Remove-BAKBackupVault",
               "Remove-BAKBackupVaultAccessPolicy",
               "Remove-BAKBackupVaultLockConfiguration",
               "Remove-BAKBackupVaultNotification",
               "Remove-BAKFramework",
               "Remove-BAKRecoveryPoint",
               "Remove-BAKReportPlan",
               "Remove-BAKRestoreTestingPlan",
               "Remove-BAKRestoreTestingSelection",
               "Get-BAKBackupJob",
               "Get-BAKBackupVault",
               "Get-BAKCopyJob",
               "Get-BAKFramework",
               "Get-BAKGlobalSetting",
               "Get-BAKProtectedResource",
               "Get-BAKRecoveryPoint",
               "Get-BAKRegionSetting",
               "Get-BAKReportJob",
               "Get-BAKReportPlan",
               "Get-BAKRestoreJob",
               "Unlock-BAKRecoveryPoint",
               "Move-BAKRecoveryPoint",
               "Export-BAKBackupPlanTemplate",
               "Get-BAKBackupPlan",
               "Get-BAKBackupPlanFromJSON",
               "Get-BAKBackupPlanFromTemplate",
               "Get-BAKBackupSelection",
               "Get-BAKBackupVaultAccessPolicy",
               "Get-BAKBackupVaultNotification",
               "Get-BAKLegalHold",
               "Get-BAKRecoveryPointRestoreMetadata",
               "Get-BAKRestoreJobMetadata",
               "Get-BAKRestoreTestingInferredMetadata",
               "Get-BAKRestoreTestingPlan",
               "Get-BAKRestoreTestingSelection",
               "Get-BAKSupportedResourceType",
               "Get-BAKBackupJobList",
               "Get-BAKBackupJobSummaryList",
               "Get-BAKBackupPlanList",
               "Get-BAKBackupPlanTemplateList",
               "Get-BAKBackupPlanVersionList",
               "Get-BAKBackupSelectionList",
               "Get-BAKBackupVaultList",
               "Get-BAKCopyJobList",
               "Get-BAKCopyJobSummaryList",
               "Get-BAKFrameworkList",
               "Get-BAKLegalHoldList",
               "Get-BAKProtectedResourceList",
               "Get-BAKProtectedResourcesByBackupVaultList",
               "Get-BAKRecoveryPointsByBackupVaultList",
               "Get-BAKRecoveryPointsByLegalHoldList",
               "Get-BAKRecoveryPointsByResourceList",
               "Get-BAKReportJobList",
               "Get-BAKReportPlanList",
               "Get-BAKRestoreJobList",
               "Get-BAKRestoreJobsByProtectedResourceList",
               "Get-BAKRestoreJobSummaryList",
               "Get-BAKRestoreTestingPlanList",
               "Get-BAKRestoreTestingSelectionList",
               "Get-BAKResourceTag",
               "Write-BAKBackupVaultAccessPolicy",
               "Write-BAKBackupVaultLockConfiguration",
               "Write-BAKBackupVaultNotification",
               "Write-BAKRestoreValidationResult",
               "Start-BAKBackupJob",
               "Start-BAKCopyJob",
               "Start-BAKReportJob",
               "Start-BAKRestoreJob",
               "Stop-BAKBackupJob",
               "Add-BAKResourceTag",
               "Remove-BAKResourceTag",
               "Update-BAKBackupPlan",
               "Update-BAKFramework",
               "Update-BAKGlobalSetting",
               "Update-BAKRecoveryPointLifecycle",
               "Update-BAKRegionSetting",
               "Update-BAKReportPlan",
               "Update-BAKRestoreTestingPlan",
               "Update-BAKRestoreTestingSelection")
}

_awsArgumentCompleterRegistration $BAK_SelectCompleters $BAK_SelectMap
# Argument completions for service AWS Backup Gateway


$BUGW_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.BackupGateway.GatewayType
        "New-BUGWGateway/GatewayType"
        {
            $v = "BACKUP_VM"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BUGW_map = @{
    "GatewayType"=@("New-BUGWGateway")
}

_awsArgumentCompleterRegistration $BUGW_Completers $BUGW_map

$BUGW_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BUGW.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BUGW_SelectMap = @{
    "Select"=@("Add-BUGWGatewayToServer",
               "New-BUGWGateway",
               "Remove-BUGWGateway",
               "Remove-BUGWHypervisor",
               "Remove-BUGWGatewayFromServer",
               "Get-BUGWBandwidthRateLimitSchedule",
               "Get-BUGWGateway",
               "Get-BUGWHypervisor",
               "Get-BUGWHypervisorPropertyMapping",
               "Get-BUGWVirtualMachine",
               "Import-BUGWHypervisorConfiguration",
               "Get-BUGWGatewayList",
               "Get-BUGWHypervisorList",
               "Get-BUGWResourceTag",
               "Get-BUGWVirtualMachineList",
               "Write-BUGWBandwidthRateLimitSchedule",
               "Write-BUGWHypervisorPropertyMapping",
               "Write-BUGWMaintenanceStartTime",
               "Start-BUGWVirtualMachinesMetadataSync",
               "Add-BUGWResourceTag",
               "Test-BUGWHypervisorConfiguration",
               "Remove-BUGWResourceTag",
               "Update-BUGWGatewayInformation",
               "Update-BUGWGatewaySoftwareNow",
               "Update-BUGWHypervisor")
}

_awsArgumentCompleterRegistration $BUGW_SelectCompleters $BUGW_SelectMap
# Argument completions for service AWS Batch


$BAT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Batch.AssignPublicIp
        "Register-BATJobDefinition/NetworkConfiguration_AssignPublicIp"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Batch.CEState
        {
            ($_ -eq "New-BATComputeEnvironment/State") -Or
            ($_ -eq "Update-BATComputeEnvironment/State")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Batch.CEType
        "New-BATComputeEnvironment/Type"
        {
            $v = "MANAGED","UNMANAGED"
            break
        }

        # Amazon.Batch.CRAllocationStrategy
        "New-BATComputeEnvironment/ComputeResources_AllocationStrategy"
        {
            $v = "BEST_FIT","BEST_FIT_PROGRESSIVE","SPOT_CAPACITY_OPTIMIZED","SPOT_PRICE_CAPACITY_OPTIMIZED"
            break
        }

        # Amazon.Batch.CRType
        {
            ($_ -eq "New-BATComputeEnvironment/ComputeResources_Type") -Or
            ($_ -eq "Update-BATComputeEnvironment/ComputeResources_Type")
        }
        {
            $v = "EC2","FARGATE","FARGATE_SPOT","SPOT"
            break
        }

        # Amazon.Batch.CRUpdateAllocationStrategy
        "Update-BATComputeEnvironment/ComputeResources_AllocationStrategy"
        {
            $v = "BEST_FIT_PROGRESSIVE","SPOT_CAPACITY_OPTIMIZED","SPOT_PRICE_CAPACITY_OPTIMIZED"
            break
        }

        # Amazon.Batch.JobDefinitionType
        "Register-BATJobDefinition/Type"
        {
            $v = "container","multinode"
            break
        }

        # Amazon.Batch.JobStatus
        "Get-BATJobList/JobStatus"
        {
            $v = "FAILED","PENDING","RUNNABLE","RUNNING","STARTING","SUBMITTED","SUCCEEDED"
            break
        }

        # Amazon.Batch.JQState
        {
            ($_ -eq "New-BATJobQueue/State") -Or
            ($_ -eq "Update-BATJobQueue/State")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Batch.LogDriver
        "Register-BATJobDefinition/LogConfiguration_LogDriver"
        {
            $v = "awslogs","fluentd","gelf","journald","json-file","splunk","syslog"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BAT_map = @{
    "ComputeResources_AllocationStrategy"=@("New-BATComputeEnvironment","Update-BATComputeEnvironment")
    "ComputeResources_Type"=@("New-BATComputeEnvironment","Update-BATComputeEnvironment")
    "JobStatus"=@("Get-BATJobList")
    "LogConfiguration_LogDriver"=@("Register-BATJobDefinition")
    "NetworkConfiguration_AssignPublicIp"=@("Register-BATJobDefinition")
    "State"=@("New-BATComputeEnvironment","New-BATJobQueue","Update-BATComputeEnvironment","Update-BATJobQueue")
    "Type"=@("New-BATComputeEnvironment","Register-BATJobDefinition")
}

_awsArgumentCompleterRegistration $BAT_Completers $BAT_map

$BAT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BAT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BAT_SelectMap = @{
    "Select"=@("Stop-BATJob",
               "New-BATComputeEnvironment",
               "New-BATJobQueue",
               "New-BATSchedulingPolicy",
               "Remove-BATComputeEnvironment",
               "Remove-BATJobQueue",
               "Remove-BATSchedulingPolicy",
               "Unregister-BATJobDefinition",
               "Get-BATComputeEnvironment",
               "Get-BATJobDefinition",
               "Get-BATJobQueue",
               "Get-BATJobDetail",
               "Get-BATSchedulingPolicy",
               "Get-BATJobQueueSnapshot",
               "Get-BATJobList",
               "Get-BATSchedulingPolicyList",
               "Get-BATResourceTag",
               "Register-BATJobDefinition",
               "Submit-BATJob",
               "Add-BATResourceTag",
               "Remove-BATJob",
               "Remove-BATResourceTag",
               "Update-BATComputeEnvironment",
               "Update-BATJobQueue",
               "Update-BATSchedulingPolicy")
}

_awsArgumentCompleterRegistration $BAT_SelectCompleters $BAT_SelectMap
# Argument completions for service AWSBillingAndCostManagementDataExports


$BCMDE_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.BCMDataExports.CompressionOption
        {
            ($_ -eq "New-BCMDEExport/S3OutputConfigurations_Compression") -Or
            ($_ -eq "Update-BCMDEExport/S3OutputConfigurations_Compression")
        }
        {
            $v = "GZIP","PARQUET"
            break
        }

        # Amazon.BCMDataExports.FormatOption
        {
            ($_ -eq "New-BCMDEExport/S3OutputConfigurations_Format") -Or
            ($_ -eq "Update-BCMDEExport/S3OutputConfigurations_Format")
        }
        {
            $v = "PARQUET","TEXT_OR_CSV"
            break
        }

        # Amazon.BCMDataExports.FrequencyOption
        {
            ($_ -eq "New-BCMDEExport/RefreshCadence_Frequency") -Or
            ($_ -eq "Update-BCMDEExport/RefreshCadence_Frequency")
        }
        {
            $v = "SYNCHRONOUS"
            break
        }

        # Amazon.BCMDataExports.OverwriteOption
        {
            ($_ -eq "New-BCMDEExport/S3OutputConfigurations_Overwrite") -Or
            ($_ -eq "Update-BCMDEExport/S3OutputConfigurations_Overwrite")
        }
        {
            $v = "CREATE_NEW_REPORT","OVERWRITE_REPORT"
            break
        }

        # Amazon.BCMDataExports.S3OutputType
        {
            ($_ -eq "New-BCMDEExport/S3OutputConfigurations_OutputType") -Or
            ($_ -eq "Update-BCMDEExport/S3OutputConfigurations_OutputType")
        }
        {
            $v = "CUSTOM"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BCMDE_map = @{
    "RefreshCadence_Frequency"=@("New-BCMDEExport","Update-BCMDEExport")
    "S3OutputConfigurations_Compression"=@("New-BCMDEExport","Update-BCMDEExport")
    "S3OutputConfigurations_Format"=@("New-BCMDEExport","Update-BCMDEExport")
    "S3OutputConfigurations_OutputType"=@("New-BCMDEExport","Update-BCMDEExport")
    "S3OutputConfigurations_Overwrite"=@("New-BCMDEExport","Update-BCMDEExport")
}

_awsArgumentCompleterRegistration $BCMDE_Completers $BCMDE_map

$BCMDE_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BCMDE.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BCMDE_SelectMap = @{
    "Select"=@("New-BCMDEExport",
               "Remove-BCMDEExport",
               "Get-BCMDEExecution",
               "Get-BCMDEExport",
               "Get-BCMDETable",
               "Get-BCMDEExecutionList",
               "Get-BCMDEExportList",
               "Get-BCMDETableList",
               "Get-BCMDEResourceTag",
               "Add-BCMDEResourceTag",
               "Remove-BCMDEResourceTag",
               "Update-BCMDEExport")
}

_awsArgumentCompleterRegistration $BCMDE_SelectCompleters $BCMDE_SelectMap
# Argument completions for service Amazon Bedrock


$BDR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Bedrock.CommitmentDuration
        "New-BDRProvisionedModelThroughput/CommitmentDuration"
        {
            $v = "OneMonth","SixMonths"
            break
        }

        # Amazon.Bedrock.CustomizationType
        "New-BDRModelCustomizationJob/CustomizationType"
        {
            $v = "CONTINUED_PRE_TRAINING","FINE_TUNING"
            break
        }

        # Amazon.Bedrock.EvaluationJobStatus
        "Get-BDREvaluationJobList/StatusEqual"
        {
            $v = "Completed","Deleting","Failed","InProgress","Stopped","Stopping"
            break
        }

        # Amazon.Bedrock.FineTuningJobStatus
        "Get-BDRModelCustomizationJobList/StatusEqual"
        {
            $v = "Completed","Failed","InProgress","Stopped","Stopping"
            break
        }

        # Amazon.Bedrock.InferenceProfileType
        "Get-BDRInferenceProfileList/TypeEqual"
        {
            $v = "APPLICATION","SYSTEM_DEFINED"
            break
        }

        # Amazon.Bedrock.InferenceType
        "Get-BDRFoundationModelList/ByInferenceType"
        {
            $v = "ON_DEMAND","PROVISIONED"
            break
        }

        # Amazon.Bedrock.ModelCopyJobStatus
        "Get-BDRModelCopyJobList/StatusEqual"
        {
            $v = "Completed","Failed","InProgress"
            break
        }

        # Amazon.Bedrock.ModelCustomization
        "Get-BDRFoundationModelList/ByCustomizationType"
        {
            $v = "CONTINUED_PRE_TRAINING","FINE_TUNING"
            break
        }

        # Amazon.Bedrock.ModelImportJobStatus
        "Get-BDRModelImportJobList/StatusEqual"
        {
            $v = "Completed","Failed","InProgress"
            break
        }

        # Amazon.Bedrock.ModelInvocationJobStatus
        "Get-BDRModelInvocationJobList/StatusEqual"
        {
            $v = "Completed","Expired","Failed","InProgress","PartiallyCompleted","Scheduled","Stopped","Stopping","Submitted","Validating"
            break
        }

        # Amazon.Bedrock.ModelModality
        "Get-BDRFoundationModelList/ByOutputModality"
        {
            $v = "EMBEDDING","IMAGE","TEXT"
            break
        }

        # Amazon.Bedrock.ProvisionedModelStatus
        "Get-BDRProvisionedModelThroughputList/StatusEqual"
        {
            $v = "Creating","Failed","InService","Updating"
            break
        }

        # Amazon.Bedrock.S3InputFormat
        "New-BDRModelInvocationJob/S3InputDataConfig_S3InputFormat"
        {
            $v = "JSONL"
            break
        }

        # Amazon.Bedrock.SortByProvisionedModels
        "Get-BDRProvisionedModelThroughputList/SortBy"
        {
            $v = "CreationTime"
            break
        }

        # Amazon.Bedrock.SortJobsBy
        {
            ($_ -eq "Get-BDREvaluationJobList/SortBy") -Or
            ($_ -eq "Get-BDRModelCopyJobList/SortBy") -Or
            ($_ -eq "Get-BDRModelCustomizationJobList/SortBy") -Or
            ($_ -eq "Get-BDRModelImportJobList/SortBy") -Or
            ($_ -eq "Get-BDRModelInvocationJobList/SortBy")
        }
        {
            $v = "CreationTime"
            break
        }

        # Amazon.Bedrock.SortModelsBy
        {
            ($_ -eq "Get-BDRCustomModelList/SortBy") -Or
            ($_ -eq "Get-BDRImportedModelList/SortBy")
        }
        {
            $v = "CreationTime"
            break
        }

        # Amazon.Bedrock.SortOrder
        {
            ($_ -eq "Get-BDRCustomModelList/SortOrder") -Or
            ($_ -eq "Get-BDREvaluationJobList/SortOrder") -Or
            ($_ -eq "Get-BDRImportedModelList/SortOrder") -Or
            ($_ -eq "Get-BDRModelCopyJobList/SortOrder") -Or
            ($_ -eq "Get-BDRModelCustomizationJobList/SortOrder") -Or
            ($_ -eq "Get-BDRModelImportJobList/SortOrder") -Or
            ($_ -eq "Get-BDRModelInvocationJobList/SortOrder") -Or
            ($_ -eq "Get-BDRProvisionedModelThroughputList/SortOrder")
        }
        {
            $v = "Ascending","Descending"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BDR_map = @{
    "ByCustomizationType"=@("Get-BDRFoundationModelList")
    "ByInferenceType"=@("Get-BDRFoundationModelList")
    "ByOutputModality"=@("Get-BDRFoundationModelList")
    "CommitmentDuration"=@("New-BDRProvisionedModelThroughput")
    "CustomizationType"=@("New-BDRModelCustomizationJob")
    "S3InputDataConfig_S3InputFormat"=@("New-BDRModelInvocationJob")
    "SortBy"=@("Get-BDRCustomModelList","Get-BDREvaluationJobList","Get-BDRImportedModelList","Get-BDRModelCopyJobList","Get-BDRModelCustomizationJobList","Get-BDRModelImportJobList","Get-BDRModelInvocationJobList","Get-BDRProvisionedModelThroughputList")
    "SortOrder"=@("Get-BDRCustomModelList","Get-BDREvaluationJobList","Get-BDRImportedModelList","Get-BDRModelCopyJobList","Get-BDRModelCustomizationJobList","Get-BDRModelImportJobList","Get-BDRModelInvocationJobList","Get-BDRProvisionedModelThroughputList")
    "StatusEqual"=@("Get-BDREvaluationJobList","Get-BDRModelCopyJobList","Get-BDRModelCustomizationJobList","Get-BDRModelImportJobList","Get-BDRModelInvocationJobList","Get-BDRProvisionedModelThroughputList")
    "TypeEqual"=@("Get-BDRInferenceProfileList")
}

_awsArgumentCompleterRegistration $BDR_Completers $BDR_map

$BDR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BDR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BDR_SelectMap = @{
    "Select"=@("Set-BDRBatchDeleteEvaluationJob",
               "New-BDREvaluationJob",
               "New-BDRGuardrail",
               "New-BDRGuardrailVersion",
               "New-BDRInferenceProfile",
               "New-BDRModelCopyJob",
               "New-BDRModelCustomizationJob",
               "New-BDRModelImportJob",
               "New-BDRModelInvocationJob",
               "New-BDRProvisionedModelThroughput",
               "Remove-BDRCustomModel",
               "Remove-BDRGuardrail",
               "Remove-BDRImportedModel",
               "Remove-BDRInferenceProfile",
               "Remove-BDRModelInvocationLoggingConfiguration",
               "Remove-BDRProvisionedModelThroughput",
               "Get-BDRCustomModel",
               "Get-BDREvaluationJob",
               "Get-BDRFoundationModel",
               "Get-BDRGuardrail",
               "Get-BDRImportedModel",
               "Get-BDRInferenceProfile",
               "Get-BDRModelCopyJob",
               "Get-BDRModelCustomizationJob",
               "Get-BDRModelImportJob",
               "Get-BDRModelInvocationJob",
               "Get-BDRModelInvocationLoggingConfiguration",
               "Get-BDRProvisionedModelThroughput",
               "Get-BDRCustomModelList",
               "Get-BDREvaluationJobList",
               "Get-BDRFoundationModelList",
               "Get-BDRGuardrailList",
               "Get-BDRImportedModelList",
               "Get-BDRInferenceProfileList",
               "Get-BDRModelCopyJobList",
               "Get-BDRModelCustomizationJobList",
               "Get-BDRModelImportJobList",
               "Get-BDRModelInvocationJobList",
               "Get-BDRProvisionedModelThroughputList",
               "Get-BDRResourceTag",
               "Write-BDRModelInvocationLoggingConfiguration",
               "Stop-BDREvaluationJob",
               "Stop-BDRModelCustomizationJob",
               "Stop-BDRModelInvocationJob",
               "Add-BDRResourceTag",
               "Remove-BDRResourceTag",
               "Update-BDRGuardrail",
               "Update-BDRProvisionedModelThroughput")
}

_awsArgumentCompleterRegistration $BDR_SelectCompleters $BDR_SelectMap
# Argument completions for service Agents for Amazon Bedrock


$AAB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.BedrockAgent.ActionGroupSignature
        {
            ($_ -eq "New-AABAgentActionGroup/ParentActionGroupSignature") -Or
            ($_ -eq "Update-AABAgentActionGroup/ParentActionGroupSignature")
        }
        {
            $v = "AMAZON.CodeInterpreter","AMAZON.UserInput"
            break
        }

        # Amazon.BedrockAgent.ActionGroupState
        {
            ($_ -eq "New-AABAgentActionGroup/ActionGroupState") -Or
            ($_ -eq "Update-AABAgentActionGroup/ActionGroupState")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.BedrockAgent.ChunkingStrategy
        {
            ($_ -eq "New-AABDataSource/ChunkingConfiguration_ChunkingStrategy") -Or
            ($_ -eq "Update-AABDataSource/ChunkingConfiguration_ChunkingStrategy")
        }
        {
            $v = "FIXED_SIZE","HIERARCHICAL","NONE","SEMANTIC"
            break
        }

        # Amazon.BedrockAgent.ConfluenceAuthType
        {
            ($_ -eq "New-AABDataSource/DataSourceConfiguration_ConfluenceConfiguration_SourceConfiguration_AuthType") -Or
            ($_ -eq "Update-AABDataSource/DataSourceConfiguration_ConfluenceConfiguration_SourceConfiguration_AuthType")
        }
        {
            $v = "BASIC","OAUTH2_CLIENT_CREDENTIALS"
            break
        }

        # Amazon.BedrockAgent.ConfluenceHostType
        {
            ($_ -eq "New-AABDataSource/DataSourceConfiguration_ConfluenceConfiguration_SourceConfiguration_HostType") -Or
            ($_ -eq "Update-AABDataSource/DataSourceConfiguration_ConfluenceConfiguration_SourceConfiguration_HostType")
        }
        {
            $v = "SAAS"
            break
        }

        # Amazon.BedrockAgent.CrawlFilterConfigurationType
        {
            ($_ -eq "New-AABDataSource/DataSourceConfiguration_ConfluenceConfiguration_CrawlerConfiguration_FilterConfiguration_Type") -Or
            ($_ -eq "Update-AABDataSource/DataSourceConfiguration_ConfluenceConfiguration_CrawlerConfiguration_FilterConfiguration_Type") -Or
            ($_ -eq "New-AABDataSource/DataSourceConfiguration_SalesforceConfiguration_CrawlerConfiguration_FilterConfiguration_Type") -Or
            ($_ -eq "Update-AABDataSource/DataSourceConfiguration_SalesforceConfiguration_CrawlerConfiguration_FilterConfiguration_Type") -Or
            ($_ -eq "New-AABDataSource/DataSourceConfiguration_SharePointConfiguration_CrawlerConfiguration_FilterConfiguration_Type") -Or
            ($_ -eq "Update-AABDataSource/DataSourceConfiguration_SharePointConfiguration_CrawlerConfiguration_FilterConfiguration_Type")
        }
        {
            $v = "PATTERN"
            break
        }

        # Amazon.BedrockAgent.CustomControlMethod
        {
            ($_ -eq "New-AABAgentActionGroup/ActionGroupExecutor_CustomControl") -Or
            ($_ -eq "Update-AABAgentActionGroup/ActionGroupExecutor_CustomControl")
        }
        {
            $v = "RETURN_CONTROL"
            break
        }

        # Amazon.BedrockAgent.DataDeletionPolicy
        {
            ($_ -eq "New-AABDataSource/DataDeletionPolicy") -Or
            ($_ -eq "Update-AABDataSource/DataDeletionPolicy")
        }
        {
            $v = "DELETE","RETAIN"
            break
        }

        # Amazon.BedrockAgent.DataSourceType
        {
            ($_ -eq "New-AABDataSource/DataSourceConfiguration_Type") -Or
            ($_ -eq "Update-AABDataSource/DataSourceConfiguration_Type")
        }
        {
            $v = "CONFLUENCE","S3","SALESFORCE","SHAREPOINT","WEB"
            break
        }

        # Amazon.BedrockAgent.IngestionJobSortByAttribute
        "Get-AABIngestionJobList/SortBy_Attribute"
        {
            $v = "STARTED_AT","STATUS"
            break
        }

        # Amazon.BedrockAgent.KnowledgeBaseState
        {
            ($_ -eq "Register-AABAgentKnowledgeBase/KnowledgeBaseState") -Or
            ($_ -eq "Update-AABAgentKnowledgeBase/KnowledgeBaseState")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.BedrockAgent.KnowledgeBaseStorageType
        {
            ($_ -eq "New-AABKnowledgeBase/StorageConfiguration_Type") -Or
            ($_ -eq "Update-AABKnowledgeBase/StorageConfiguration_Type")
        }
        {
            $v = "MONGO_DB_ATLAS","OPENSEARCH_SERVERLESS","PINECONE","RDS","REDIS_ENTERPRISE_CLOUD"
            break
        }

        # Amazon.BedrockAgent.KnowledgeBaseType
        {
            ($_ -eq "New-AABKnowledgeBase/KnowledgeBaseConfiguration_Type") -Or
            ($_ -eq "Update-AABKnowledgeBase/KnowledgeBaseConfiguration_Type")
        }
        {
            $v = "VECTOR"
            break
        }

        # Amazon.BedrockAgent.ParsingStrategy
        {
            ($_ -eq "New-AABDataSource/ParsingConfiguration_ParsingStrategy") -Or
            ($_ -eq "Update-AABDataSource/ParsingConfiguration_ParsingStrategy")
        }
        {
            $v = "BEDROCK_FOUNDATION_MODEL"
            break
        }

        # Amazon.BedrockAgent.SalesforceAuthType
        {
            ($_ -eq "New-AABDataSource/DataSourceConfiguration_SalesforceConfiguration_SourceConfiguration_AuthType") -Or
            ($_ -eq "Update-AABDataSource/DataSourceConfiguration_SalesforceConfiguration_SourceConfiguration_AuthType")
        }
        {
            $v = "OAUTH2_CLIENT_CREDENTIALS"
            break
        }

        # Amazon.BedrockAgent.SharePointAuthType
        {
            ($_ -eq "New-AABDataSource/DataSourceConfiguration_SharePointConfiguration_SourceConfiguration_AuthType") -Or
            ($_ -eq "Update-AABDataSource/DataSourceConfiguration_SharePointConfiguration_SourceConfiguration_AuthType")
        }
        {
            $v = "OAUTH2_CLIENT_CREDENTIALS"
            break
        }

        # Amazon.BedrockAgent.SharePointHostType
        {
            ($_ -eq "New-AABDataSource/DataSourceConfiguration_SharePointConfiguration_SourceConfiguration_HostType") -Or
            ($_ -eq "Update-AABDataSource/DataSourceConfiguration_SharePointConfiguration_SourceConfiguration_HostType")
        }
        {
            $v = "ONLINE"
            break
        }

        # Amazon.BedrockAgent.SortOrder
        "Get-AABIngestionJobList/SortBy_Order"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.BedrockAgent.WebScopeType
        {
            ($_ -eq "New-AABDataSource/CrawlerConfiguration_Scope") -Or
            ($_ -eq "Update-AABDataSource/CrawlerConfiguration_Scope")
        }
        {
            $v = "HOST_ONLY","SUBDOMAINS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AAB_map = @{
    "ActionGroupExecutor_CustomControl"=@("New-AABAgentActionGroup","Update-AABAgentActionGroup")
    "ActionGroupState"=@("New-AABAgentActionGroup","Update-AABAgentActionGroup")
    "ChunkingConfiguration_ChunkingStrategy"=@("New-AABDataSource","Update-AABDataSource")
    "CrawlerConfiguration_Scope"=@("New-AABDataSource","Update-AABDataSource")
    "DataDeletionPolicy"=@("New-AABDataSource","Update-AABDataSource")
    "DataSourceConfiguration_ConfluenceConfiguration_CrawlerConfiguration_FilterConfiguration_Type"=@("New-AABDataSource","Update-AABDataSource")
    "DataSourceConfiguration_ConfluenceConfiguration_SourceConfiguration_AuthType"=@("New-AABDataSource","Update-AABDataSource")
    "DataSourceConfiguration_ConfluenceConfiguration_SourceConfiguration_HostType"=@("New-AABDataSource","Update-AABDataSource")
    "DataSourceConfiguration_SalesforceConfiguration_CrawlerConfiguration_FilterConfiguration_Type"=@("New-AABDataSource","Update-AABDataSource")
    "DataSourceConfiguration_SalesforceConfiguration_SourceConfiguration_AuthType"=@("New-AABDataSource","Update-AABDataSource")
    "DataSourceConfiguration_SharePointConfiguration_CrawlerConfiguration_FilterConfiguration_Type"=@("New-AABDataSource","Update-AABDataSource")
    "DataSourceConfiguration_SharePointConfiguration_SourceConfiguration_AuthType"=@("New-AABDataSource","Update-AABDataSource")
    "DataSourceConfiguration_SharePointConfiguration_SourceConfiguration_HostType"=@("New-AABDataSource","Update-AABDataSource")
    "DataSourceConfiguration_Type"=@("New-AABDataSource","Update-AABDataSource")
    "KnowledgeBaseConfiguration_Type"=@("New-AABKnowledgeBase","Update-AABKnowledgeBase")
    "KnowledgeBaseState"=@("Register-AABAgentKnowledgeBase","Update-AABAgentKnowledgeBase")
    "ParentActionGroupSignature"=@("New-AABAgentActionGroup","Update-AABAgentActionGroup")
    "ParsingConfiguration_ParsingStrategy"=@("New-AABDataSource","Update-AABDataSource")
    "SortBy_Attribute"=@("Get-AABIngestionJobList")
    "SortBy_Order"=@("Get-AABIngestionJobList")
    "StorageConfiguration_Type"=@("New-AABKnowledgeBase","Update-AABKnowledgeBase")
}

_awsArgumentCompleterRegistration $AAB_Completers $AAB_map

$AAB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AAB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AAB_SelectMap = @{
    "Select"=@("Register-AABAgentKnowledgeBase",
               "New-AABAgent",
               "New-AABAgentActionGroup",
               "New-AABAgentAlias",
               "New-AABDataSource",
               "New-AABFlow",
               "New-AABFlowAlias",
               "New-AABFlowVersion",
               "New-AABKnowledgeBase",
               "New-AABPrompt",
               "New-AABPromptVersion",
               "Remove-AABAgent",
               "Remove-AABAgentActionGroup",
               "Remove-AABAgentAlias",
               "Remove-AABAgentVersion",
               "Remove-AABDataSource",
               "Remove-AABFlow",
               "Remove-AABFlowAlias",
               "Remove-AABFlowVersion",
               "Remove-AABKnowledgeBase",
               "Remove-AABPrompt",
               "Unregister-AABAgentKnowledgeBase",
               "Get-AABAgent",
               "Get-AABAgentActionGroup",
               "Get-AABAgentAlias",
               "Get-AABAgentKnowledgeBase",
               "Get-AABAgentVersion",
               "Get-AABDataSource",
               "Get-AABFlow",
               "Get-AABFlowAlias",
               "Get-AABFlowVersion",
               "Get-AABIngestionJob",
               "Get-AABKnowledgeBase",
               "Get-AABPrompt",
               "Get-AABAgentActionGroupList",
               "Get-AABAgentAliasList",
               "Get-AABAgentKnowledgeBasisList",
               "Get-AABAgentList",
               "Get-AABAgentVersionList",
               "Get-AABDataSourceList",
               "Get-AABFlowAliasList",
               "Get-AABFlowList",
               "Get-AABFlowVersionList",
               "Get-AABIngestionJobList",
               "Get-AABKnowledgeBasisList",
               "Get-AABPromptList",
               "Get-AABResourceTag",
               "Initialize-AABAgent",
               "Initialize-AABFlow",
               "Start-AABIngestionJob",
               "Stop-AABIngestionJob",
               "Add-AABResourceTag",
               "Remove-AABResourceTag",
               "Update-AABAgent",
               "Update-AABAgentActionGroup",
               "Update-AABAgentAlias",
               "Update-AABAgentKnowledgeBase",
               "Update-AABDataSource",
               "Update-AABFlow",
               "Update-AABFlowAlias",
               "Update-AABKnowledgeBase",
               "Update-AABPrompt")
}

_awsArgumentCompleterRegistration $AAB_SelectCompleters $AAB_SelectMap
# Argument completions for service Amazon Bedrock Agent Runtime


$BAR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.BedrockAgentRuntime.MemoryType
        "Get-BARAgentMemory/MemoryType"
        {
            $v = "SESSION_SUMMARY"
            break
        }

        # Amazon.BedrockAgentRuntime.QueryTransformationType
        "Invoke-BARRetrieveAndGenerate/QueryTransformationConfiguration_Type"
        {
            $v = "QUERY_DECOMPOSITION"
            break
        }

        # Amazon.BedrockAgentRuntime.RetrieveAndGenerateType
        "Invoke-BARRetrieveAndGenerate/RetrieveAndGenerateConfiguration_Type"
        {
            $v = "EXTERNAL_SOURCES","KNOWLEDGE_BASE"
            break
        }

        # Amazon.BedrockAgentRuntime.SearchType
        {
            ($_ -eq "Invoke-BARRetrieve/VectorSearchConfiguration_OverrideSearchType") -Or
            ($_ -eq "Invoke-BARRetrieveAndGenerate/VectorSearchConfiguration_OverrideSearchType")
        }
        {
            $v = "HYBRID","SEMANTIC"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BAR_map = @{
    "MemoryType"=@("Get-BARAgentMemory")
    "QueryTransformationConfiguration_Type"=@("Invoke-BARRetrieveAndGenerate")
    "RetrieveAndGenerateConfiguration_Type"=@("Invoke-BARRetrieveAndGenerate")
    "VectorSearchConfiguration_OverrideSearchType"=@("Invoke-BARRetrieve","Invoke-BARRetrieveAndGenerate")
}

_awsArgumentCompleterRegistration $BAR_Completers $BAR_map

$BAR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BAR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BAR_SelectMap = @{
    "Select"=@("Remove-BARAgentMemory",
               "Get-BARAgentMemory",
               "Invoke-BARAgent",
               "Invoke-BARFlow",
               "Invoke-BARRetrieve",
               "Invoke-BARRetrieveAndGenerate")
}

_awsArgumentCompleterRegistration $BAR_SelectCompleters $BAR_SelectMap
# Argument completions for service Amazon Bedrock Runtime


$BDRR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.BedrockRuntime.GuardrailContentSource
        "Invoke-BDRRGuardrail/Source"
        {
            $v = "INPUT","OUTPUT"
            break
        }

        # Amazon.BedrockRuntime.GuardrailStreamProcessingMode
        "Invoke-BDRRConverseStream/GuardrailConfig_StreamProcessingMode"
        {
            $v = "async","sync"
            break
        }

        # Amazon.BedrockRuntime.GuardrailTrace
        {
            ($_ -eq "Invoke-BDRRConverse/GuardrailConfig_Trace") -Or
            ($_ -eq "Invoke-BDRRConverseStream/GuardrailConfig_Trace")
        }
        {
            $v = "disabled","enabled"
            break
        }

        # Amazon.BedrockRuntime.Trace
        {
            ($_ -eq "Invoke-BDRRModel/Trace") -Or
            ($_ -eq "Invoke-BDRRModelWithResponseStream/Trace")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BDRR_map = @{
    "GuardrailConfig_StreamProcessingMode"=@("Invoke-BDRRConverseStream")
    "GuardrailConfig_Trace"=@("Invoke-BDRRConverse","Invoke-BDRRConverseStream")
    "Source"=@("Invoke-BDRRGuardrail")
    "Trace"=@("Invoke-BDRRModel","Invoke-BDRRModelWithResponseStream")
}

_awsArgumentCompleterRegistration $BDRR_Completers $BDRR_map

$BDRR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BDRR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BDRR_SelectMap = @{
    "Select"=@("Invoke-BDRRGuardrail",
               "Invoke-BDRRConverse",
               "Invoke-BDRRConverseStream",
               "Invoke-BDRRModel",
               "Invoke-BDRRModelWithResponseStream")
}

_awsArgumentCompleterRegistration $BDRR_SelectCompleters $BDRR_SelectMap
# Argument completions for service AWSBillingConductor


$ABC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.BillingConductor.BillingGroupStatus
        "Update-ABCBillingGroup/Status"
        {
            $v = "ACTIVE","PRIMARY_ACCOUNT_MISSING"
            break
        }

        # Amazon.BillingConductor.CustomLineItemRelationship
        "Get-ABCResourcesAssociatedToCustomLineItemList/Filters_Relationship"
        {
            $v = "CHILD","PARENT"
            break
        }

        # Amazon.BillingConductor.CustomLineItemType
        "New-ABCCustomLineItem/ChargeDetails_Type"
        {
            $v = "CREDIT","FEE"
            break
        }

        # Amazon.BillingConductor.PricingRuleScope
        "New-ABCPricingRule/Scope"
        {
            $v = "BILLING_ENTITY","GLOBAL","SERVICE","SKU"
            break
        }

        # Amazon.BillingConductor.PricingRuleType
        {
            ($_ -eq "New-ABCPricingRule/Type") -Or
            ($_ -eq "Update-ABCPricingRule/Type")
        }
        {
            $v = "DISCOUNT","MARKUP","TIERING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ABC_map = @{
    "ChargeDetails_Type"=@("New-ABCCustomLineItem")
    "Filters_Relationship"=@("Get-ABCResourcesAssociatedToCustomLineItemList")
    "Scope"=@("New-ABCPricingRule")
    "Status"=@("Update-ABCBillingGroup")
    "Type"=@("New-ABCPricingRule","Update-ABCPricingRule")
}

_awsArgumentCompleterRegistration $ABC_Completers $ABC_map

$ABC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ABC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ABC_SelectMap = @{
    "Select"=@("Register-ABCAccount",
               "Register-ABCPricingRule",
               "Register-ABCResourceBatchToCustomLineItem",
               "Unregister-ABCResourceBatchFromCustomLineItem",
               "New-ABCBillingGroup",
               "New-ABCCustomLineItem",
               "New-ABCPricingPlan",
               "New-ABCPricingRule",
               "Remove-ABCBillingGroup",
               "Remove-ABCCustomLineItem",
               "Remove-ABCPricingPlan",
               "Remove-ABCPricingRule",
               "Unregister-ABCAccount",
               "Unregister-ABCPricingRule",
               "Get-ABCBillingGroupCostReport",
               "Get-ABCAccountAssociationList",
               "Get-ABCBillingGroupCostReportList",
               "Get-ABCBillingGroupList",
               "Get-ABCCustomLineItemList",
               "Get-ABCCustomLineItemVersionList",
               "Get-ABCPricingPlanList",
               "Get-ABCPricingPlansAssociatedWithPricingRuleList",
               "Get-ABCPricingRuleList",
               "Get-ABCPricingRulesAssociatedToPricingPlanList",
               "Get-ABCResourcesAssociatedToCustomLineItemList",
               "Get-ABCResourceTag",
               "Add-ABCResourceTag",
               "Remove-ABCResourceTag",
               "Update-ABCBillingGroup",
               "Update-ABCCustomLineItem",
               "Update-ABCPricingPlan",
               "Update-ABCPricingRule")
}

_awsArgumentCompleterRegistration $ABC_SelectCompleters $ABC_SelectMap
# Argument completions for service Amazon Braket


$BRKT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Braket.CompressionType
        "New-BRKTJob/ScriptModeConfig_CompressionType"
        {
            $v = "GZIP","NONE"
            break
        }

        # Amazon.Braket.InstanceType
        "New-BRKTJob/InstanceConfig_InstanceType"
        {
            $v = "ml.c4.2xlarge","ml.c4.4xlarge","ml.c4.8xlarge","ml.c4.xlarge","ml.c5.18xlarge","ml.c5.2xlarge","ml.c5.4xlarge","ml.c5.9xlarge","ml.c5.xlarge","ml.c5n.18xlarge","ml.c5n.2xlarge","ml.c5n.4xlarge","ml.c5n.9xlarge","ml.c5n.xlarge","ml.g4dn.12xlarge","ml.g4dn.16xlarge","ml.g4dn.2xlarge","ml.g4dn.4xlarge","ml.g4dn.8xlarge","ml.g4dn.xlarge","ml.m4.10xlarge","ml.m4.16xlarge","ml.m4.2xlarge","ml.m4.4xlarge","ml.m4.xlarge","ml.m5.12xlarge","ml.m5.24xlarge","ml.m5.2xlarge","ml.m5.4xlarge","ml.m5.large","ml.m5.xlarge","ml.p2.16xlarge","ml.p2.8xlarge","ml.p2.xlarge","ml.p3.16xlarge","ml.p3.2xlarge","ml.p3.8xlarge","ml.p3dn.24xlarge","ml.p4d.24xlarge"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BRKT_map = @{
    "InstanceConfig_InstanceType"=@("New-BRKTJob")
    "ScriptModeConfig_CompressionType"=@("New-BRKTJob")
}

_awsArgumentCompleterRegistration $BRKT_Completers $BRKT_map

$BRKT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BRKT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BRKT_SelectMap = @{
    "Select"=@("Stop-BRKTJob",
               "Stop-BRKTQuantumTask",
               "New-BRKTJob",
               "New-BRKTQuantumTask",
               "Get-BRKTDevice",
               "Get-BRKTJob",
               "Get-BRKTQuantumTask",
               "Get-BRKTResourceTag",
               "Search-BRKTDevice",
               "Search-BRKTJob",
               "Search-BRKTQuantumTask",
               "Add-BRKTResourceTag",
               "Remove-BRKTResourceTag")
}

_awsArgumentCompleterRegistration $BRKT_SelectCompleters $BRKT_SelectMap
# Argument completions for service AWS Budgets


$BGT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Budgets.ActionSubType
        {
            ($_ -eq "New-BGTBudgetAction/SsmActionDefinition_ActionSubType") -Or
            ($_ -eq "Update-BGTBudgetAction/SsmActionDefinition_ActionSubType")
        }
        {
            $v = "STOP_EC2_INSTANCES","STOP_RDS_INSTANCES"
            break
        }

        # Amazon.Budgets.ActionType
        "New-BGTBudgetAction/ActionType"
        {
            $v = "APPLY_IAM_POLICY","APPLY_SCP_POLICY","RUN_SSM_DOCUMENTS"
            break
        }

        # Amazon.Budgets.ApprovalModel
        {
            ($_ -eq "New-BGTBudgetAction/ApprovalModel") -Or
            ($_ -eq "Update-BGTBudgetAction/ApprovalModel")
        }
        {
            $v = "AUTOMATIC","MANUAL"
            break
        }

        # Amazon.Budgets.AutoAdjustType
        {
            ($_ -eq "New-BGTBudget/AutoAdjustData_AutoAdjustType") -Or
            ($_ -eq "Update-BGTBudget/AutoAdjustData_AutoAdjustType")
        }
        {
            $v = "FORECAST","HISTORICAL"
            break
        }

        # Amazon.Budgets.BudgetType
        {
            ($_ -eq "New-BGTBudget/Budget_BudgetType") -Or
            ($_ -eq "Update-BGTBudget/NewBudget_BudgetType")
        }
        {
            $v = "COST","RI_COVERAGE","RI_UTILIZATION","SAVINGS_PLANS_COVERAGE","SAVINGS_PLANS_UTILIZATION","USAGE"
            break
        }

        # Amazon.Budgets.ComparisonOperator
        {
            ($_ -eq "Update-BGTNotification/NewNotification_ComparisonOperator") -Or
            ($_ -eq "Get-BGTSubscribersForNotification/Notification_ComparisonOperator") -Or
            ($_ -eq "New-BGTNotification/Notification_ComparisonOperator") -Or
            ($_ -eq "New-BGTSubscriber/Notification_ComparisonOperator") -Or
            ($_ -eq "Remove-BGTNotification/Notification_ComparisonOperator") -Or
            ($_ -eq "Remove-BGTSubscriber/Notification_ComparisonOperator") -Or
            ($_ -eq "Update-BGTSubscriber/Notification_ComparisonOperator") -Or
            ($_ -eq "Update-BGTNotification/OldNotification_ComparisonOperator")
        }
        {
            $v = "EQUAL_TO","GREATER_THAN","LESS_THAN"
            break
        }

        # Amazon.Budgets.ExecutionType
        "Invoke-BGTBudgetAction/ExecutionType"
        {
            $v = "APPROVE_BUDGET_ACTION","RESET_BUDGET_ACTION","RETRY_BUDGET_ACTION","REVERSE_BUDGET_ACTION"
            break
        }

        # Amazon.Budgets.NotificationState
        {
            ($_ -eq "Update-BGTNotification/NewNotification_NotificationState") -Or
            ($_ -eq "Get-BGTSubscribersForNotification/Notification_NotificationState") -Or
            ($_ -eq "New-BGTNotification/Notification_NotificationState") -Or
            ($_ -eq "New-BGTSubscriber/Notification_NotificationState") -Or
            ($_ -eq "Remove-BGTNotification/Notification_NotificationState") -Or
            ($_ -eq "Remove-BGTSubscriber/Notification_NotificationState") -Or
            ($_ -eq "Update-BGTSubscriber/Notification_NotificationState") -Or
            ($_ -eq "Update-BGTNotification/OldNotification_NotificationState")
        }
        {
            $v = "ALARM","OK"
            break
        }

        # Amazon.Budgets.NotificationType
        {
            ($_ -eq "Update-BGTNotification/NewNotification_NotificationType") -Or
            ($_ -eq "Get-BGTSubscribersForNotification/Notification_NotificationType") -Or
            ($_ -eq "New-BGTNotification/Notification_NotificationType") -Or
            ($_ -eq "New-BGTSubscriber/Notification_NotificationType") -Or
            ($_ -eq "Remove-BGTNotification/Notification_NotificationType") -Or
            ($_ -eq "Remove-BGTSubscriber/Notification_NotificationType") -Or
            ($_ -eq "Update-BGTSubscriber/Notification_NotificationType") -Or
            ($_ -eq "New-BGTBudgetAction/NotificationType") -Or
            ($_ -eq "Update-BGTBudgetAction/NotificationType") -Or
            ($_ -eq "Update-BGTNotification/OldNotification_NotificationType")
        }
        {
            $v = "ACTUAL","FORECASTED"
            break
        }

        # Amazon.Budgets.SubscriptionType
        {
            ($_ -eq "Update-BGTSubscriber/NewSubscriber_SubscriptionType") -Or
            ($_ -eq "Update-BGTSubscriber/OldSubscriber_SubscriptionType") -Or
            ($_ -eq "New-BGTSubscriber/Subscriber_SubscriptionType") -Or
            ($_ -eq "Remove-BGTSubscriber/Subscriber_SubscriptionType")
        }
        {
            $v = "EMAIL","SNS"
            break
        }

        # Amazon.Budgets.ThresholdType
        {
            ($_ -eq "New-BGTBudgetAction/ActionThreshold_ActionThresholdType") -Or
            ($_ -eq "Update-BGTBudgetAction/ActionThreshold_ActionThresholdType") -Or
            ($_ -eq "Update-BGTNotification/NewNotification_ThresholdType") -Or
            ($_ -eq "Get-BGTSubscribersForNotification/Notification_ThresholdType") -Or
            ($_ -eq "New-BGTNotification/Notification_ThresholdType") -Or
            ($_ -eq "New-BGTSubscriber/Notification_ThresholdType") -Or
            ($_ -eq "Remove-BGTNotification/Notification_ThresholdType") -Or
            ($_ -eq "Remove-BGTSubscriber/Notification_ThresholdType") -Or
            ($_ -eq "Update-BGTSubscriber/Notification_ThresholdType") -Or
            ($_ -eq "Update-BGTNotification/OldNotification_ThresholdType")
        }
        {
            $v = "ABSOLUTE_VALUE","PERCENTAGE"
            break
        }

        # Amazon.Budgets.TimeUnit
        {
            ($_ -eq "New-BGTBudget/Budget_TimeUnit") -Or
            ($_ -eq "Update-BGTBudget/NewBudget_TimeUnit")
        }
        {
            $v = "ANNUALLY","DAILY","MONTHLY","QUARTERLY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BGT_map = @{
    "ActionThreshold_ActionThresholdType"=@("New-BGTBudgetAction","Update-BGTBudgetAction")
    "ActionType"=@("New-BGTBudgetAction")
    "ApprovalModel"=@("New-BGTBudgetAction","Update-BGTBudgetAction")
    "AutoAdjustData_AutoAdjustType"=@("New-BGTBudget","Update-BGTBudget")
    "Budget_BudgetType"=@("New-BGTBudget")
    "Budget_TimeUnit"=@("New-BGTBudget")
    "ExecutionType"=@("Invoke-BGTBudgetAction")
    "NewBudget_BudgetType"=@("Update-BGTBudget")
    "NewBudget_TimeUnit"=@("Update-BGTBudget")
    "NewNotification_ComparisonOperator"=@("Update-BGTNotification")
    "NewNotification_NotificationState"=@("Update-BGTNotification")
    "NewNotification_NotificationType"=@("Update-BGTNotification")
    "NewNotification_ThresholdType"=@("Update-BGTNotification")
    "NewSubscriber_SubscriptionType"=@("Update-BGTSubscriber")
    "Notification_ComparisonOperator"=@("Get-BGTSubscribersForNotification","New-BGTNotification","New-BGTSubscriber","Remove-BGTNotification","Remove-BGTSubscriber","Update-BGTSubscriber")
    "Notification_NotificationState"=@("Get-BGTSubscribersForNotification","New-BGTNotification","New-BGTSubscriber","Remove-BGTNotification","Remove-BGTSubscriber","Update-BGTSubscriber")
    "Notification_NotificationType"=@("Get-BGTSubscribersForNotification","New-BGTNotification","New-BGTSubscriber","Remove-BGTNotification","Remove-BGTSubscriber","Update-BGTSubscriber")
    "Notification_ThresholdType"=@("Get-BGTSubscribersForNotification","New-BGTNotification","New-BGTSubscriber","Remove-BGTNotification","Remove-BGTSubscriber","Update-BGTSubscriber")
    "NotificationType"=@("New-BGTBudgetAction","Update-BGTBudgetAction")
    "OldNotification_ComparisonOperator"=@("Update-BGTNotification")
    "OldNotification_NotificationState"=@("Update-BGTNotification")
    "OldNotification_NotificationType"=@("Update-BGTNotification")
    "OldNotification_ThresholdType"=@("Update-BGTNotification")
    "OldSubscriber_SubscriptionType"=@("Update-BGTSubscriber")
    "SsmActionDefinition_ActionSubType"=@("New-BGTBudgetAction","Update-BGTBudgetAction")
    "Subscriber_SubscriptionType"=@("New-BGTSubscriber","Remove-BGTSubscriber")
}

_awsArgumentCompleterRegistration $BGT_Completers $BGT_map

$BGT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BGT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$BGT_SelectMap = @{
    "Select"=@("New-BGTBudget",
               "New-BGTBudgetAction",
               "New-BGTNotification",
               "New-BGTSubscriber",
               "Remove-BGTBudget",
               "Remove-BGTBudgetAction",
               "Remove-BGTNotification",
               "Remove-BGTSubscriber",
               "Get-BGTBudget",
               "Get-BGTBudgetAction",
               "Get-BGTBudgetActionHistory",
               "Get-BGTBudgetActionsForAccount",
               "Get-BGTBudgetActionsForBudget",
               "Get-BGTBudgetNotificationsForAccount",
               "Get-BGTBudgetPerformanceHistory",
               "Get-BGTBudgetList",
               "Get-BGTNotificationsForBudget",
               "Get-BGTSubscribersForNotification",
               "Invoke-BGTBudgetAction",
               "Get-BGTResourceTag",
               "Add-BGTResourceTag",
               "Remove-BGTResourceTag",
               "Update-BGTBudget",
               "Update-BGTBudgetAction",
               "Update-BGTNotification",
               "Update-BGTSubscriber")
}

_awsArgumentCompleterRegistration $BGT_SelectCompleters $BGT_SelectMap
# Argument completions for service AWS Cost Explorer


$CE_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CostExplorer.AccountScope
        {
            ($_ -eq "Get-CEReservationPurchaseRecommendation/AccountScope") -Or
            ($_ -eq "Get-CESavingsPlansPurchaseRecommendation/AccountScope")
        }
        {
            $v = "LINKED","PAYER"
            break
        }

        # Amazon.CostExplorer.AnomalyFeedbackType
        {
            ($_ -eq "Get-CEAnomaly/Feedback") -Or
            ($_ -eq "Set-CEAnomalyFeedback/Feedback")
        }
        {
            $v = "NO","PLANNED_ACTIVITY","YES"
            break
        }

        # Amazon.CostExplorer.AnomalySubscriptionFrequency
        {
            ($_ -eq "New-CEAnomalySubscription/AnomalySubscription_Frequency") -Or
            ($_ -eq "Update-CEAnomalySubscription/Frequency")
        }
        {
            $v = "DAILY","IMMEDIATE","WEEKLY"
            break
        }

        # Amazon.CostExplorer.ApproximationDimension
        "Get-CEApproximateUsageRecord/ApproximationDimension"
        {
            $v = "RESOURCE","SERVICE"
            break
        }

        # Amazon.CostExplorer.Context
        "Get-CEDimensionValue/Context"
        {
            $v = "COST_AND_USAGE","RESERVATIONS","SAVINGS_PLANS"
            break
        }

        # Amazon.CostExplorer.CostAllocationTagStatus
        "Get-CECostAllocationTagList/Status"
        {
            $v = "Active","Inactive"
            break
        }

        # Amazon.CostExplorer.CostAllocationTagType
        "Get-CECostAllocationTagList/Type"
        {
            $v = "AWSGenerated","UserDefined"
            break
        }

        # Amazon.CostExplorer.CostCategoryRuleVersion
        {
            ($_ -eq "New-CECostCategoryDefinition/RuleVersion") -Or
            ($_ -eq "Update-CECostCategoryDefinition/RuleVersion")
        }
        {
            $v = "CostCategoryExpression.v1"
            break
        }

        # Amazon.CostExplorer.Dimension
        "Get-CEDimensionValue/Dimension"
        {
            $v = "AGREEMENT_END_DATE_TIME_AFTER","AGREEMENT_END_DATE_TIME_BEFORE","ANOMALY_TOTAL_IMPACT_ABSOLUTE","ANOMALY_TOTAL_IMPACT_PERCENTAGE","AZ","BILLING_ENTITY","CACHE_ENGINE","DATABASE_ENGINE","DEPLOYMENT_OPTION","INSTANCE_TYPE","INSTANCE_TYPE_FAMILY","INVOICING_ENTITY","LEGAL_ENTITY_NAME","LINKED_ACCOUNT","LINKED_ACCOUNT_NAME","OPERATING_SYSTEM","OPERATION","PAYMENT_OPTION","PLATFORM","PURCHASE_TYPE","RECORD_TYPE","REGION","RESERVATION_ID","RESOURCE_ID","RIGHTSIZING_TYPE","SAVINGS_PLANS_TYPE","SAVINGS_PLAN_ARN","SCOPE","SERVICE","SERVICE_CODE","SUBSCRIPTION_ID","TENANCY","USAGE_TYPE","USAGE_TYPE_GROUP"
            break
        }

        # Amazon.CostExplorer.GenerationStatus
        "Get-CESavingsPlansPurchaseRecommendationGenerationList/GenerationStatus"
        {
            $v = "FAILED","PROCESSING","SUCCEEDED"
            break
        }

        # Amazon.CostExplorer.Granularity
        {
            ($_ -eq "Get-CEApproximateUsageRecord/Granularity") -Or
            ($_ -eq "Get-CECostAndUsage/Granularity") -Or
            ($_ -eq "Get-CECostAndUsageWithResource/Granularity") -Or
            ($_ -eq "Get-CECostForecast/Granularity") -Or
            ($_ -eq "Get-CEReservationCoverage/Granularity") -Or
            ($_ -eq "Get-CEReservationUtilization/Granularity") -Or
            ($_ -eq "Get-CESavingsPlansCoverage/Granularity") -Or
            ($_ -eq "Get-CESavingsPlansUtilization/Granularity") -Or
            ($_ -eq "Get-CEUsageForecast/Granularity")
        }
        {
            $v = "DAILY","HOURLY","MONTHLY"
            break
        }

        # Amazon.CostExplorer.LookbackPeriodInDays
        {
            ($_ -eq "Get-CEReservationPurchaseRecommendation/LookbackPeriodInDay") -Or
            ($_ -eq "Get-CESavingsPlansPurchaseRecommendation/LookbackPeriodInDay")
        }
        {
            $v = "SEVEN_DAYS","SIXTY_DAYS","THIRTY_DAYS"
            break
        }

        # Amazon.CostExplorer.Metric
        {
            ($_ -eq "Get-CECostForecast/Metric") -Or
            ($_ -eq "Get-CEUsageForecast/Metric")
        }
        {
            $v = "AMORTIZED_COST","BLENDED_COST","NET_AMORTIZED_COST","NET_UNBLENDED_COST","NORMALIZED_USAGE_AMOUNT","UNBLENDED_COST","USAGE_QUANTITY"
            break
        }

        # Amazon.CostExplorer.MonitorDimension
        "New-CEAnomalyMonitor/AnomalyMonitor_MonitorDimension"
        {
            $v = "SERVICE"
            break
        }

        # Amazon.CostExplorer.MonitorType
        "New-CEAnomalyMonitor/AnomalyMonitor_MonitorType"
        {
            $v = "CUSTOM","DIMENSIONAL"
            break
        }

        # Amazon.CostExplorer.NumericOperator
        "Get-CEAnomaly/TotalImpact_NumericOperator"
        {
            $v = "BETWEEN","EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL"
            break
        }

        # Amazon.CostExplorer.OfferingClass
        "Get-CEReservationPurchaseRecommendation/EC2Specification_OfferingClass"
        {
            $v = "CONVERTIBLE","STANDARD"
            break
        }

        # Amazon.CostExplorer.PaymentOption
        {
            ($_ -eq "Get-CEReservationPurchaseRecommendation/PaymentOption") -Or
            ($_ -eq "Get-CESavingsPlansPurchaseRecommendation/PaymentOption")
        }
        {
            $v = "ALL_UPFRONT","HEAVY_UTILIZATION","LIGHT_UTILIZATION","MEDIUM_UTILIZATION","NO_UPFRONT","PARTIAL_UPFRONT"
            break
        }

        # Amazon.CostExplorer.RecommendationTarget
        "Get-CERightsizingRecommendation/Configuration_RecommendationTarget"
        {
            $v = "CROSS_INSTANCE_FAMILY","SAME_INSTANCE_FAMILY"
            break
        }

        # Amazon.CostExplorer.SortOrder
        {
            ($_ -eq "Get-CEReservationCoverage/SortBy_SortOrder") -Or
            ($_ -eq "Get-CEReservationUtilization/SortBy_SortOrder") -Or
            ($_ -eq "Get-CESavingsPlansCoverage/SortBy_SortOrder") -Or
            ($_ -eq "Get-CESavingsPlansUtilization/SortBy_SortOrder") -Or
            ($_ -eq "Get-CESavingsPlansUtilizationDetail/SortBy_SortOrder")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.CostExplorer.SupportedSavingsPlansType
        "Get-CESavingsPlansPurchaseRecommendation/SavingsPlansType"
        {
            $v = "COMPUTE_SP","EC2_INSTANCE_SP","SAGEMAKER_SP"
            break
        }

        # Amazon.CostExplorer.TermInYears
        {
            ($_ -eq "Get-CEReservationPurchaseRecommendation/TermInYear") -Or
            ($_ -eq "Get-CESavingsPlansPurchaseRecommendation/TermInYear")
        }
        {
            $v = "ONE_YEAR","THREE_YEARS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CE_map = @{
    "AccountScope"=@("Get-CEReservationPurchaseRecommendation","Get-CESavingsPlansPurchaseRecommendation")
    "AnomalyMonitor_MonitorDimension"=@("New-CEAnomalyMonitor")
    "AnomalyMonitor_MonitorType"=@("New-CEAnomalyMonitor")
    "AnomalySubscription_Frequency"=@("New-CEAnomalySubscription")
    "ApproximationDimension"=@("Get-CEApproximateUsageRecord")
    "Configuration_RecommendationTarget"=@("Get-CERightsizingRecommendation")
    "Context"=@("Get-CEDimensionValue")
    "Dimension"=@("Get-CEDimensionValue")
    "EC2Specification_OfferingClass"=@("Get-CEReservationPurchaseRecommendation")
    "Feedback"=@("Get-CEAnomaly","Set-CEAnomalyFeedback")
    "Frequency"=@("Update-CEAnomalySubscription")
    "GenerationStatus"=@("Get-CESavingsPlansPurchaseRecommendationGenerationList")
    "Granularity"=@("Get-CEApproximateUsageRecord","Get-CECostAndUsage","Get-CECostAndUsageWithResource","Get-CECostForecast","Get-CEReservationCoverage","Get-CEReservationUtilization","Get-CESavingsPlansCoverage","Get-CESavingsPlansUtilization","Get-CEUsageForecast")
    "LookbackPeriodInDay"=@("Get-CEReservationPurchaseRecommendation","Get-CESavingsPlansPurchaseRecommendation")
    "Metric"=@("Get-CECostForecast","Get-CEUsageForecast")
    "PaymentOption"=@("Get-CEReservationPurchaseRecommendation","Get-CESavingsPlansPurchaseRecommendation")
    "RuleVersion"=@("New-CECostCategoryDefinition","Update-CECostCategoryDefinition")
    "SavingsPlansType"=@("Get-CESavingsPlansPurchaseRecommendation")
    "SortBy_SortOrder"=@("Get-CEReservationCoverage","Get-CEReservationUtilization","Get-CESavingsPlansCoverage","Get-CESavingsPlansUtilization","Get-CESavingsPlansUtilizationDetail")
    "Status"=@("Get-CECostAllocationTagList")
    "TermInYear"=@("Get-CEReservationPurchaseRecommendation","Get-CESavingsPlansPurchaseRecommendation")
    "TotalImpact_NumericOperator"=@("Get-CEAnomaly")
    "Type"=@("Get-CECostAllocationTagList")
}

_awsArgumentCompleterRegistration $CE_Completers $CE_map

$CE_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CE.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CE_SelectMap = @{
    "Select"=@("New-CEAnomalyMonitor",
               "New-CEAnomalySubscription",
               "New-CECostCategoryDefinition",
               "Remove-CEAnomalyMonitor",
               "Remove-CEAnomalySubscription",
               "Remove-CECostCategoryDefinition",
               "Get-CECostCategoryDefinition",
               "Get-CEAnomaly",
               "Get-CEAnomalyMonitor",
               "Get-CEAnomalySubscription",
               "Get-CEApproximateUsageRecord",
               "Get-CECostAndUsage",
               "Get-CECostAndUsageWithResource",
               "Get-CECostCategory",
               "Get-CECostForecast",
               "Get-CEDimensionValue",
               "Get-CEReservationCoverage",
               "Get-CEReservationPurchaseRecommendation",
               "Get-CEReservationUtilization",
               "Get-CERightsizingRecommendation",
               "Get-CESavingsPlanPurchaseRecommendationDetail",
               "Get-CESavingsPlansCoverage",
               "Get-CESavingsPlansPurchaseRecommendation",
               "Get-CESavingsPlansUtilization",
               "Get-CESavingsPlansUtilizationDetail",
               "Get-CETag",
               "Get-CEUsageForecast",
               "Get-CECostAllocationTagBackfillHistoryList",
               "Get-CECostAllocationTagList",
               "Get-CECostCategoryDefinitionList",
               "Get-CESavingsPlansPurchaseRecommendationGenerationList",
               "Get-CEResourceTag",
               "Set-CEAnomalyFeedback",
               "Start-CECostAllocationTagBackfill",
               "Start-CESavingsPlansPurchaseRecommendationGeneration",
               "Add-CEResourceTag",
               "Remove-CEResourceTag",
               "Update-CEAnomalyMonitor",
               "Update-CEAnomalySubscription",
               "Update-CECostAllocationTagsStatus",
               "Update-CECostCategoryDefinition")
}

_awsArgumentCompleterRegistration $CE_SelectCompleters $CE_SelectMap
# Argument completions for service AWS Chatbot


$CHAT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CHAT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHAT_SelectMap = @{
    "Select"=@("New-CHATChimeWebhookConfiguration",
               "New-CHATMicrosoftTeamsChannelConfiguration",
               "New-CHATSlackChannelConfiguration",
               "Remove-CHATChimeWebhookConfiguration",
               "Remove-CHATMicrosoftTeamsChannelConfiguration",
               "Remove-CHATMicrosoftTeamsConfiguredTeam",
               "Remove-CHATMicrosoftTeamsUserIdentity",
               "Remove-CHATSlackChannelConfiguration",
               "Remove-CHATSlackUserIdentity",
               "Remove-CHATSlackWorkspaceAuthorization",
               "Get-CHATChimeWebhookConfiguration",
               "Get-CHATSlackChannelConfiguration",
               "Get-CHATSlackUserIdentity",
               "Get-CHATSlackWorkspace",
               "Get-CHATAccountPreference",
               "Get-CHATMicrosoftTeamsChannelConfiguration",
               "Get-CHATMicrosoftTeamsChannelConfigurationList",
               "Get-CHATMicrosoftTeamsConfiguredTeamList",
               "Get-CHATMicrosoftTeamsUserIdentityList",
               "Get-CHATResourceTag",
               "Add-CHATResourceTag",
               "Remove-CHATResourceTag",
               "Update-CHATAccountPreference",
               "Update-CHATChimeWebhookConfiguration",
               "Update-CHATMicrosoftTeamsChannelConfiguration",
               "Update-CHATSlackChannelConfiguration")
}

_awsArgumentCompleterRegistration $CHAT_SelectCompleters $CHAT_SelectMap
# Argument completions for service Amazon Chime


$CHM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Chime.ArtifactsState
        {
            ($_ -eq "New-CHMMediaCapturePipeline/Content_State") -Or
            ($_ -eq "New-CHMMediaCapturePipeline/Video_State")
        }
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.Chime.AudioMuxType
        "New-CHMMediaCapturePipeline/Audio_MuxType"
        {
            $v = "AudioOnly","AudioWithActiveSpeakerVideo"
            break
        }

        # Amazon.Chime.ChannelMembershipType
        {
            ($_ -eq "Get-CHMChannelMembershipList/Type") -Or
            ($_ -eq "New-CHMChannelMembership/Type") -Or
            ($_ -eq "New-CHMCreateChannelMembership/Type")
        }
        {
            $v = "DEFAULT","HIDDEN"
            break
        }

        # Amazon.Chime.ChannelMessagePersistenceType
        "Send-CHMChannelMessage/Persistence"
        {
            $v = "NON_PERSISTENT","PERSISTENT"
            break
        }

        # Amazon.Chime.ChannelMessageType
        "Send-CHMChannelMessage/Type"
        {
            $v = "CONTROL","STANDARD"
            break
        }

        # Amazon.Chime.ChannelMode
        {
            ($_ -eq "New-CHMChannel/Mode") -Or
            ($_ -eq "Update-CHMChannel/Mode")
        }
        {
            $v = "RESTRICTED","UNRESTRICTED"
            break
        }

        # Amazon.Chime.ChannelPrivacy
        {
            ($_ -eq "Get-CHMChannelList/Privacy") -Or
            ($_ -eq "New-CHMChannel/Privacy")
        }
        {
            $v = "PRIVATE","PUBLIC"
            break
        }

        # Amazon.Chime.ContentMuxType
        "New-CHMMediaCapturePipeline/Content_MuxType"
        {
            $v = "ContentOnly"
            break
        }

        # Amazon.Chime.GeoMatchLevel
        "New-CHMProxySession/GeoMatchLevel"
        {
            $v = "AreaCode","Country"
            break
        }

        # Amazon.Chime.License
        {
            ($_ -eq "Update-CHMAccount/DefaultLicense") -Or
            ($_ -eq "Update-CHMUser/LicenseType")
        }
        {
            $v = "Basic","Plus","Pro","ProTrial"
            break
        }

        # Amazon.Chime.MediaPipelineSinkType
        "New-CHMMediaCapturePipeline/SinkType"
        {
            $v = "S3Bucket"
            break
        }

        # Amazon.Chime.MediaPipelineSourceType
        "New-CHMMediaCapturePipeline/SourceType"
        {
            $v = "ChimeSdkMeeting"
            break
        }

        # Amazon.Chime.NumberSelectionBehavior
        "New-CHMProxySession/NumberSelectionBehavior"
        {
            $v = "AvoidSticky","PreferSticky"
            break
        }

        # Amazon.Chime.PhoneNumberAssociationName
        "Get-CHMPhoneNumberList/FilterName"
        {
            $v = "AccountId","SipRuleId","UserId","VoiceConnectorGroupId","VoiceConnectorId"
            break
        }

        # Amazon.Chime.PhoneNumberProductType
        {
            ($_ -eq "Get-CHMPhoneNumberList/ProductType") -Or
            ($_ -eq "Get-CHMSupportedPhoneNumberCountryList/ProductType") -Or
            ($_ -eq "New-CHMPhoneNumberOrder/ProductType") -Or
            ($_ -eq "Update-CHMPhoneNumber/ProductType")
        }
        {
            $v = "BusinessCalling","SipMediaApplicationDialIn","VoiceConnector"
            break
        }

        # Amazon.Chime.PhoneNumberStatus
        "Get-CHMPhoneNumberList/Status"
        {
            $v = "AcquireFailed","AcquireInProgress","Assigned","DeleteFailed","DeleteInProgress","ReleaseFailed","ReleaseInProgress","Unassigned"
            break
        }

        # Amazon.Chime.PhoneNumberType
        "Search-CHMAvailablePhoneNumber/PhoneNumberType"
        {
            $v = "Local","TollFree"
            break
        }

        # Amazon.Chime.ProxySessionStatus
        "Get-CHMProxySessionList/Status"
        {
            $v = "Closed","InProgress","Open"
            break
        }

        # Amazon.Chime.RoomMembershipRole
        {
            ($_ -eq "New-CHMRoomMembership/Role") -Or
            ($_ -eq "Update-CHMRoomMembership/Role")
        }
        {
            $v = "Administrator","Member"
            break
        }

        # Amazon.Chime.SipRuleTriggerType
        "New-CHMSipRule/TriggerType"
        {
            $v = "RequestUriHostname","ToPhoneNumber"
            break
        }

        # Amazon.Chime.SortOrder
        "Get-CHMChannelMessageList/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.Chime.TranscribeContentIdentificationType
        "Start-CHMMeetingTranscription/EngineTranscribeSettings_ContentIdentificationType"
        {
            $v = "PII"
            break
        }

        # Amazon.Chime.TranscribeContentRedactionType
        "Start-CHMMeetingTranscription/EngineTranscribeSettings_ContentRedactionType"
        {
            $v = "PII"
            break
        }

        # Amazon.Chime.TranscribeLanguageCode
        {
            ($_ -eq "Start-CHMMeetingTranscription/EngineTranscribeSettings_LanguageCode") -Or
            ($_ -eq "Start-CHMMeetingTranscription/EngineTranscribeSettings_PreferredLanguage")
        }
        {
            $v = "de-DE","en-AU","en-GB","en-US","es-US","fr-CA","fr-FR","hi-IN","it-IT","ja-JP","ko-KR","pt-BR","th-TH","zh-CN"
            break
        }

        # Amazon.Chime.TranscribeMedicalContentIdentificationType
        "Start-CHMMeetingTranscription/EngineTranscribeMedicalSettings_ContentIdentificationType"
        {
            $v = "PHI"
            break
        }

        # Amazon.Chime.TranscribeMedicalLanguageCode
        "Start-CHMMeetingTranscription/EngineTranscribeMedicalSettings_LanguageCode"
        {
            $v = "en-US"
            break
        }

        # Amazon.Chime.TranscribeMedicalRegion
        "Start-CHMMeetingTranscription/EngineTranscribeMedicalSettings_Region"
        {
            $v = "ap-southeast-2","auto","ca-central-1","eu-west-1","us-east-1","us-east-2","us-west-2"
            break
        }

        # Amazon.Chime.TranscribeMedicalSpecialty
        "Start-CHMMeetingTranscription/EngineTranscribeMedicalSettings_Specialty"
        {
            $v = "CARDIOLOGY","NEUROLOGY","ONCOLOGY","PRIMARYCARE","RADIOLOGY","UROLOGY"
            break
        }

        # Amazon.Chime.TranscribeMedicalType
        "Start-CHMMeetingTranscription/EngineTranscribeMedicalSettings_Type"
        {
            $v = "CONVERSATION","DICTATION"
            break
        }

        # Amazon.Chime.TranscribePartialResultsStability
        "Start-CHMMeetingTranscription/EngineTranscribeSettings_PartialResultsStability"
        {
            $v = "high","low","medium"
            break
        }

        # Amazon.Chime.TranscribeRegion
        "Start-CHMMeetingTranscription/EngineTranscribeSettings_Region"
        {
            $v = "ap-northeast-1","ap-northeast-2","ap-southeast-2","auto","ca-central-1","eu-central-1","eu-west-1","eu-west-2","sa-east-1","us-east-1","us-east-2","us-west-2"
            break
        }

        # Amazon.Chime.TranscribeVocabularyFilterMethod
        "Start-CHMMeetingTranscription/EngineTranscribeSettings_VocabularyFilterMethod"
        {
            $v = "mask","remove","tag"
            break
        }

        # Amazon.Chime.UserType
        {
            ($_ -eq "Get-CHMUserList/UserType") -Or
            ($_ -eq "New-CHMUser/UserType") -Or
            ($_ -eq "Send-CHMUserInvitation/UserType") -Or
            ($_ -eq "Update-CHMUser/UserType")
        }
        {
            $v = "PrivateUser","SharedDevice"
            break
        }

        # Amazon.Chime.VideoMuxType
        "New-CHMMediaCapturePipeline/Video_MuxType"
        {
            $v = "VideoOnly"
            break
        }

        # Amazon.Chime.VoiceConnectorAwsRegion
        "New-CHMVoiceConnector/AwsRegion"
        {
            $v = "us-east-1","us-west-2"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHM_map = @{
    "Audio_MuxType"=@("New-CHMMediaCapturePipeline")
    "AwsRegion"=@("New-CHMVoiceConnector")
    "Content_MuxType"=@("New-CHMMediaCapturePipeline")
    "Content_State"=@("New-CHMMediaCapturePipeline")
    "DefaultLicense"=@("Update-CHMAccount")
    "EngineTranscribeMedicalSettings_ContentIdentificationType"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeMedicalSettings_LanguageCode"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeMedicalSettings_Region"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeMedicalSettings_Specialty"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeMedicalSettings_Type"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeSettings_ContentIdentificationType"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeSettings_ContentRedactionType"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeSettings_LanguageCode"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeSettings_PartialResultsStability"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeSettings_PreferredLanguage"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeSettings_Region"=@("Start-CHMMeetingTranscription")
    "EngineTranscribeSettings_VocabularyFilterMethod"=@("Start-CHMMeetingTranscription")
    "FilterName"=@("Get-CHMPhoneNumberList")
    "GeoMatchLevel"=@("New-CHMProxySession")
    "LicenseType"=@("Update-CHMUser")
    "Mode"=@("New-CHMChannel","Update-CHMChannel")
    "NumberSelectionBehavior"=@("New-CHMProxySession")
    "Persistence"=@("Send-CHMChannelMessage")
    "PhoneNumberType"=@("Search-CHMAvailablePhoneNumber")
    "Privacy"=@("Get-CHMChannelList","New-CHMChannel")
    "ProductType"=@("Get-CHMPhoneNumberList","Get-CHMSupportedPhoneNumberCountryList","New-CHMPhoneNumberOrder","Update-CHMPhoneNumber")
    "Role"=@("New-CHMRoomMembership","Update-CHMRoomMembership")
    "SinkType"=@("New-CHMMediaCapturePipeline")
    "SortOrder"=@("Get-CHMChannelMessageList")
    "SourceType"=@("New-CHMMediaCapturePipeline")
    "Status"=@("Get-CHMPhoneNumberList","Get-CHMProxySessionList")
    "TriggerType"=@("New-CHMSipRule")
    "Type"=@("Get-CHMChannelMembershipList","New-CHMChannelMembership","New-CHMCreateChannelMembership","Send-CHMChannelMessage")
    "UserType"=@("Get-CHMUserList","New-CHMUser","Send-CHMUserInvitation","Update-CHMUser")
    "Video_MuxType"=@("New-CHMMediaCapturePipeline")
    "Video_State"=@("New-CHMMediaCapturePipeline")
}

_awsArgumentCompleterRegistration $CHM_Completers $CHM_map

$CHM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CHM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHM_SelectMap = @{
    "Select"=@("Add-CHMPhoneNumbersToVoiceConnector",
               "Add-CHMPhoneNumbersToVoiceConnectorGroup",
               "Add-CHMPhoneNumberToUser",
               "Add-CHMSigninDelegateGroupsToAccount",
               "New-CHMAttendeeBatch",
               "New-CHMCreateChannelMembership",
               "New-CHMRoomMembershipBatch",
               "Remove-CHMPhoneNumberBatch",
               "Enable-CHMUserSuspensionBatch",
               "Disable-CHMUserSuspensionBatch",
               "Update-CHMPhoneNumberBatch",
               "Update-CHMUserBatch",
               "New-CHMAccount",
               "New-CHMAppInstance",
               "New-CHMAppInstanceAdmin",
               "New-CHMAppInstanceUser",
               "New-CHMAttendee",
               "New-CHMBot",
               "New-CHMChannel",
               "New-CHMChannelBan",
               "New-CHMChannelMembership",
               "New-CHMChannelModerator",
               "New-CHMMediaCapturePipeline",
               "New-CHMMeeting",
               "New-CHMMeetingDialOut",
               "New-CHMMeetingWithAttendee",
               "New-CHMPhoneNumberOrder",
               "New-CHMProxySession",
               "New-CHMRoom",
               "New-CHMRoomMembership",
               "New-CHMSipMediaApplication",
               "New-CHMSipMediaApplicationCall",
               "New-CHMSipRule",
               "New-CHMUser",
               "New-CHMVoiceConnector",
               "New-CHMVoiceConnectorGroup",
               "Remove-CHMAccount",
               "Remove-CHMAppInstance",
               "Remove-CHMAppInstanceAdmin",
               "Remove-CHMAppInstanceStreamingConfiguration",
               "Remove-CHMAppInstanceUser",
               "Remove-CHMAttendee",
               "Remove-CHMChannel",
               "Remove-CHMChannelBan",
               "Remove-CHMChannelMembership",
               "Remove-CHMChannelMessage",
               "Remove-CHMChannelModerator",
               "Remove-CHMEventsConfiguration",
               "Remove-CHMMediaCapturePipeline",
               "Remove-CHMMeeting",
               "Remove-CHMPhoneNumber",
               "Remove-CHMProxySession",
               "Remove-CHMRoom",
               "Remove-CHMRoomMembership",
               "Remove-CHMSipMediaApplication",
               "Remove-CHMSipRule",
               "Remove-CHMVoiceConnector",
               "Remove-CHMVoiceConnectorEmergencyCallingConfiguration",
               "Remove-CHMVoiceConnectorGroup",
               "Remove-CHMVoiceConnectorOrigination",
               "Remove-CHMVoiceConnectorProxy",
               "Remove-CHMVoiceConnectorStreamingConfiguration",
               "Remove-CHMVoiceConnectorTermination",
               "Remove-CHMVoiceConnectorTerminationCredential",
               "Get-CHMAppInstance",
               "Get-CHMAppInstanceAdmin",
               "Get-CHMAppInstanceUser",
               "Get-CHMChannel",
               "Get-CHMChannelBan",
               "Get-CHMChannelMembership",
               "Get-CHMChannelMembershipForAppInstanceUser",
               "Get-CHMChannelModeratedByAppInstanceUser",
               "Get-CHMChannelModerator",
               "Remove-CHMPhoneNumberFromUser",
               "Remove-CHMPhoneNumbersFromVoiceConnector",
               "Remove-CHMPhoneNumbersFromVoiceConnectorGroup",
               "Remove-CHMSigninDelegateGroupsFromAccount",
               "Get-CHMAccount",
               "Get-CHMAccountSetting",
               "Get-CHMAppInstanceRetentionSetting",
               "Get-CHMAppInstanceStreamingConfiguration",
               "Get-CHMAttendee",
               "Get-CHMBot",
               "Get-CHMChannelMessage",
               "Get-CHMEventsConfiguration",
               "Get-CHMGlobalSetting",
               "Get-CHMMediaCapturePipeline",
               "Get-CHMMeeting",
               "Get-CHMMessagingSessionEndpoint",
               "Get-CHMPhoneNumber",
               "Get-CHMPhoneNumberOrder",
               "Get-CHMPhoneNumberSetting",
               "Get-CHMProxySession",
               "Get-CHMRetentionSetting",
               "Get-CHMRoom",
               "Get-CHMSipMediaApplication",
               "Get-CHMSipMediaApplicationLoggingConfiguration",
               "Get-CHMSipRule",
               "Get-CHMUser",
               "Get-CHMUserSetting",
               "Get-CHMVoiceConnector",
               "Get-CHMVoiceConnectorEmergencyCallingConfiguration",
               "Get-CHMVoiceConnectorGroup",
               "Get-CHMVoiceConnectorLoggingConfiguration",
               "Get-CHMVoiceConnectorOrigination",
               "Get-CHMVoiceConnectorProxy",
               "Get-CHMVoiceConnectorStreamingConfiguration",
               "Get-CHMVoiceConnectorTermination",
               "Get-CHMVoiceConnectorTerminationHealth",
               "Send-CHMUserInvitation",
               "Get-CHMAccountList",
               "Get-CHMAppInstanceAdminList",
               "Get-CHMAppInstanceList",
               "Get-CHMAppInstanceUserList",
               "Get-CHMAttendeeList",
               "Get-CHMAttendeeTagList",
               "Get-CHMBotList",
               "Get-CHMChannelBanList",
               "Get-CHMChannelMembershipList",
               "Get-CHMChannelMembershipsForAppInstanceUserList",
               "Get-CHMChannelMessageList",
               "Get-CHMChannelModeratorList",
               "Get-CHMChannelList",
               "Get-CHMChannelsModeratedByAppInstanceUserList",
               "Get-CHMMediaCapturePipelineList",
               "Get-CHMMeetingList",
               "Get-CHMMeetingTagList",
               "Get-CHMPhoneNumberOrderList",
               "Get-CHMPhoneNumberList",
               "Get-CHMProxySessionList",
               "Get-CHMRoomMembershipList",
               "Get-CHMRoomList",
               "Get-CHMSipMediaApplicationList",
               "Get-CHMSipRuleList",
               "Get-CHMSupportedPhoneNumberCountryList",
               "Get-CHMResourceTag",
               "Get-CHMUserList",
               "Get-CHMVoiceConnectorGroupList",
               "Get-CHMVoiceConnectorList",
               "Get-CHMVoiceConnectorTerminationCredentialList",
               "Invoke-CHMUserLogout",
               "Write-CHMAppInstanceRetentionSetting",
               "Write-CHMAppInstanceStreamingConfiguration",
               "Write-CHMEventsConfiguration",
               "Write-CHMRetentionSetting",
               "Write-CHMSipMediaApplicationLoggingConfiguration",
               "Write-CHMVoiceConnectorEmergencyCallingConfiguration",
               "Write-CHMVoiceConnectorLoggingConfiguration",
               "Write-CHMVoiceConnectorOrigination",
               "Write-CHMVoiceConnectorProxy",
               "Write-CHMVoiceConnectorStreamingConfiguration",
               "Write-CHMVoiceConnectorTermination",
               "Write-CHMVoiceConnectorTerminationCredential",
               "Hide-CHMChannelMessage",
               "Hide-CHMConversationMessage",
               "Hide-CHMRoomMessage",
               "Update-CHMSecurityToken",
               "Reset-CHMPersonalPIN",
               "Restore-CHMPhoneNumber",
               "Search-CHMAvailablePhoneNumber",
               "Send-CHMChannelMessage",
               "Start-CHMMeetingTranscription",
               "Stop-CHMMeetingTranscription",
               "Add-CHMAttendee",
               "Add-CHMMeeting",
               "Add-CHMResourceTag",
               "Remove-CHMAttendeeTag",
               "Remove-CHMMeetingTag",
               "Remove-CHMResourceTag",
               "Update-CHMAccount",
               "Update-CHMAccountSetting",
               "Update-CHMAppInstance",
               "Update-CHMAppInstanceUser",
               "Update-CHMBot",
               "Update-CHMChannel",
               "Update-CHMChannelMessage",
               "Update-CHMChannelReadMarker",
               "Update-CHMGlobalSetting",
               "Update-CHMPhoneNumber",
               "Update-CHMPhoneNumberSetting",
               "Update-CHMProxySession",
               "Update-CHMRoom",
               "Update-CHMRoomMembership",
               "Update-CHMSipMediaApplication",
               "Update-CHMSipMediaApplicationCall",
               "Update-CHMSipRule",
               "Update-CHMUser",
               "Update-CHMUserSetting",
               "Update-CHMVoiceConnector",
               "Update-CHMVoiceConnectorGroup",
               "Confirm-CHME911Address")
}

_awsArgumentCompleterRegistration $CHM_SelectCompleters $CHM_SelectMap
# Argument completions for service Amazon Chime SDK Identity


$CHMID_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ChimeSDKIdentity.AllowMessages
        {
            ($_ -eq "Register-CHMIDAppInstanceUserEndpoint/AllowMessage") -Or
            ($_ -eq "Update-CHMIDAppInstanceUserEndpoint/AllowMessage")
        }
        {
            $v = "ALL","NONE"
            break
        }

        # Amazon.ChimeSDKIdentity.AppInstanceUserEndpointType
        "Register-CHMIDAppInstanceUserEndpoint/Type"
        {
            $v = "APNS","APNS_SANDBOX","GCM"
            break
        }

        # Amazon.ChimeSDKIdentity.ExpirationCriterion
        {
            ($_ -eq "New-CHMIDAppInstanceUser/ExpirationSettings_ExpirationCriterion") -Or
            ($_ -eq "Write-CHMIDAppInstanceUserExpirationSetting/ExpirationSettings_ExpirationCriterion")
        }
        {
            $v = "CREATED_TIMESTAMP"
            break
        }

        # Amazon.ChimeSDKIdentity.RespondsTo
        {
            ($_ -eq "New-CHMIDAppInstanceBot/Lex_RespondsTo") -Or
            ($_ -eq "Update-CHMIDAppInstanceBot/Lex_RespondsTo")
        }
        {
            $v = "STANDARD_MESSAGES"
            break
        }

        # Amazon.ChimeSDKIdentity.StandardMessages
        {
            ($_ -eq "New-CHMIDAppInstanceBot/InvokedBy_StandardMessage") -Or
            ($_ -eq "Update-CHMIDAppInstanceBot/InvokedBy_StandardMessage")
        }
        {
            $v = "ALL","AUTO","MENTIONS","NONE"
            break
        }

        # Amazon.ChimeSDKIdentity.TargetedMessages
        {
            ($_ -eq "New-CHMIDAppInstanceBot/InvokedBy_TargetedMessage") -Or
            ($_ -eq "Update-CHMIDAppInstanceBot/InvokedBy_TargetedMessage")
        }
        {
            $v = "ALL","NONE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHMID_map = @{
    "AllowMessage"=@("Register-CHMIDAppInstanceUserEndpoint","Update-CHMIDAppInstanceUserEndpoint")
    "ExpirationSettings_ExpirationCriterion"=@("New-CHMIDAppInstanceUser","Write-CHMIDAppInstanceUserExpirationSetting")
    "InvokedBy_StandardMessage"=@("New-CHMIDAppInstanceBot","Update-CHMIDAppInstanceBot")
    "InvokedBy_TargetedMessage"=@("New-CHMIDAppInstanceBot","Update-CHMIDAppInstanceBot")
    "Lex_RespondsTo"=@("New-CHMIDAppInstanceBot","Update-CHMIDAppInstanceBot")
    "Type"=@("Register-CHMIDAppInstanceUserEndpoint")
}

_awsArgumentCompleterRegistration $CHMID_Completers $CHMID_map

$CHMID_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CHMID.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHMID_SelectMap = @{
    "Select"=@("New-CHMIDAppInstance",
               "New-CHMIDAppInstanceAdmin",
               "New-CHMIDAppInstanceBot",
               "New-CHMIDAppInstanceUser",
               "Remove-CHMIDAppInstance",
               "Remove-CHMIDAppInstanceAdmin",
               "Remove-CHMIDAppInstanceBot",
               "Remove-CHMIDAppInstanceUser",
               "Unregister-CHMIDAppInstanceUserEndpoint",
               "Get-CHMIDAppInstance",
               "Get-CHMIDAppInstanceAdmin",
               "Get-CHMIDAppInstanceBot",
               "Get-CHMIDAppInstanceUser",
               "Get-CHMIDAppInstanceUserEndpoint",
               "Get-CHMIDAppInstanceRetentionSetting",
               "Get-CHMIDAppInstanceAdminList",
               "Get-CHMIDAppInstanceBotList",
               "Get-CHMIDAppInstanceList",
               "Get-CHMIDAppInstanceUserEndpointList",
               "Get-CHMIDAppInstanceUserList",
               "Get-CHMIDResourceTag",
               "Write-CHMIDAppInstanceRetentionSetting",
               "Write-CHMIDAppInstanceUserExpirationSetting",
               "Register-CHMIDAppInstanceUserEndpoint",
               "Add-CHMIDResourceTag",
               "Remove-CHMIDResourceTag",
               "Update-CHMIDAppInstance",
               "Update-CHMIDAppInstanceBot",
               "Update-CHMIDAppInstanceUser",
               "Update-CHMIDAppInstanceUserEndpoint")
}

_awsArgumentCompleterRegistration $CHMID_SelectCompleters $CHMID_SelectMap
# Argument completions for service Amazon Chime SDK Media Pipelines


$CHMMP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ChimeSDKMediaPipelines.ActiveSpeakerPosition
        "New-CHMMPMediaCapturePipeline/ActiveSpeakerOnlyConfiguration_ActiveSpeakerPosition"
        {
            $v = "BottomLeft","BottomRight","TopLeft","TopRight"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.ArtifactsState
        {
            ($_ -eq "New-CHMMPMediaCapturePipeline/Content_State") -Or
            ($_ -eq "New-CHMMPMediaCapturePipeline/Video_State")
        }
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.AudioMuxType
        "New-CHMMPMediaCapturePipeline/Audio_MuxType"
        {
            $v = "AudioOnly","AudioWithActiveSpeakerVideo","AudioWithCompositedVideo"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.BorderColor
        "New-CHMMPMediaCapturePipeline/VideoAttribute_BorderColor"
        {
            $v = "Black","Blue","Green","Red","White","Yellow"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.CanvasOrientation
        "New-CHMMPMediaCapturePipeline/GridViewConfiguration_CanvasOrientation"
        {
            $v = "Landscape","Portrait"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.ContentMuxType
        "New-CHMMPMediaCapturePipeline/Content_MuxType"
        {
            $v = "ContentOnly"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.ContentShareLayoutOption
        "New-CHMMPMediaCapturePipeline/GridViewConfiguration_ContentShareLayout"
        {
            $v = "ActiveSpeakerOnly","Horizontal","PresenterOnly","Vertical"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.FragmentSelectorType
        "New-CHMMPMediaInsightsPipeline/FragmentSelector_FragmentSelectorType"
        {
            $v = "ProducerTimestamp","ServerTimestamp"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.HighlightColor
        "New-CHMMPMediaCapturePipeline/VideoAttribute_HighlightColor"
        {
            $v = "Black","Blue","Green","Red","White","Yellow"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.HorizontalTilePosition
        "New-CHMMPMediaCapturePipeline/HorizontalLayoutConfiguration_TilePosition"
        {
            $v = "Bottom","Top"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.LayoutOption
        "New-CHMMPMediaCapturePipeline/CompositedVideo_Layout"
        {
            $v = "GridView"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.MediaEncoding
        "New-CHMMPMediaInsightsPipeline/KinesisVideoStreamSourceRuntimeConfiguration_MediaEncoding"
        {
            $v = "pcm"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.MediaPipelineSinkType
        "New-CHMMPMediaCapturePipeline/SinkType"
        {
            $v = "S3Bucket"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.MediaPipelineSourceType
        "New-CHMMPMediaCapturePipeline/SourceType"
        {
            $v = "ChimeSdkMeeting"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.MediaPipelineStatusUpdate
        "Update-CHMMPMediaInsightsPipelineStatus/UpdateStatus"
        {
            $v = "Pause","Resume"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.PresenterPosition
        "New-CHMMPMediaCapturePipeline/PresenterOnlyConfiguration_PresenterPosition"
        {
            $v = "BottomLeft","BottomRight","TopLeft","TopRight"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.RecordingFileFormat
        "New-CHMMPMediaInsightsPipeline/S3RecordingSinkRuntimeConfiguration_RecordingFileFormat"
        {
            $v = "Opus","Wav"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.ResolutionOption
        "New-CHMMPMediaCapturePipeline/CompositedVideo_Resolution"
        {
            $v = "FHD","HD"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.TileOrder
        {
            ($_ -eq "New-CHMMPMediaCapturePipeline/HorizontalLayoutConfiguration_TileOrder") -Or
            ($_ -eq "New-CHMMPMediaCapturePipeline/VerticalLayoutConfiguration_TileOrder")
        }
        {
            $v = "JoinSequence","SpeakerSequence"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.VerticalTilePosition
        "New-CHMMPMediaCapturePipeline/VerticalLayoutConfiguration_TilePosition"
        {
            $v = "Left","Right"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.VideoMuxType
        "New-CHMMPMediaCapturePipeline/Video_MuxType"
        {
            $v = "VideoOnly"
            break
        }

        # Amazon.ChimeSDKMediaPipelines.VoiceAnalyticsLanguageCode
        "Start-CHMMPVoiceToneAnalysisTask/LanguageCode"
        {
            $v = "en-US"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHMMP_map = @{
    "ActiveSpeakerOnlyConfiguration_ActiveSpeakerPosition"=@("New-CHMMPMediaCapturePipeline")
    "Audio_MuxType"=@("New-CHMMPMediaCapturePipeline")
    "CompositedVideo_Layout"=@("New-CHMMPMediaCapturePipeline")
    "CompositedVideo_Resolution"=@("New-CHMMPMediaCapturePipeline")
    "Content_MuxType"=@("New-CHMMPMediaCapturePipeline")
    "Content_State"=@("New-CHMMPMediaCapturePipeline")
    "FragmentSelector_FragmentSelectorType"=@("New-CHMMPMediaInsightsPipeline")
    "GridViewConfiguration_CanvasOrientation"=@("New-CHMMPMediaCapturePipeline")
    "GridViewConfiguration_ContentShareLayout"=@("New-CHMMPMediaCapturePipeline")
    "HorizontalLayoutConfiguration_TileOrder"=@("New-CHMMPMediaCapturePipeline")
    "HorizontalLayoutConfiguration_TilePosition"=@("New-CHMMPMediaCapturePipeline")
    "KinesisVideoStreamSourceRuntimeConfiguration_MediaEncoding"=@("New-CHMMPMediaInsightsPipeline")
    "LanguageCode"=@("Start-CHMMPVoiceToneAnalysisTask")
    "PresenterOnlyConfiguration_PresenterPosition"=@("New-CHMMPMediaCapturePipeline")
    "S3RecordingSinkRuntimeConfiguration_RecordingFileFormat"=@("New-CHMMPMediaInsightsPipeline")
    "SinkType"=@("New-CHMMPMediaCapturePipeline")
    "SourceType"=@("New-CHMMPMediaCapturePipeline")
    "UpdateStatus"=@("Update-CHMMPMediaInsightsPipelineStatus")
    "VerticalLayoutConfiguration_TileOrder"=@("New-CHMMPMediaCapturePipeline")
    "VerticalLayoutConfiguration_TilePosition"=@("New-CHMMPMediaCapturePipeline")
    "Video_MuxType"=@("New-CHMMPMediaCapturePipeline")
    "Video_State"=@("New-CHMMPMediaCapturePipeline")
    "VideoAttribute_BorderColor"=@("New-CHMMPMediaCapturePipeline")
    "VideoAttribute_HighlightColor"=@("New-CHMMPMediaCapturePipeline")
}

_awsArgumentCompleterRegistration $CHMMP_Completers $CHMMP_map

$CHMMP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CHMMP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHMMP_SelectMap = @{
    "Select"=@("New-CHMMPMediaCapturePipeline",
               "New-CHMMPMediaConcatenationPipeline",
               "New-CHMMPMediaInsightsPipeline",
               "New-CHMMPMediaInsightsPipelineConfiguration",
               "New-CHMMPMediaLiveConnectorPipeline",
               "New-CHMMPMediaPipelineKinesisVideoStreamPool",
               "New-CHMMPMediaStreamPipeline",
               "Remove-CHMMPMediaCapturePipeline",
               "Remove-CHMMPMediaInsightsPipelineConfiguration",
               "Remove-CHMMPMediaPipeline",
               "Remove-CHMMPMediaPipelineKinesisVideoStreamPool",
               "Get-CHMMPMediaCapturePipeline",
               "Get-CHMMPMediaInsightsPipelineConfiguration",
               "Get-CHMMPMediaPipeline",
               "Get-CHMMPMediaPipelineKinesisVideoStreamPool",
               "Get-CHMMPSpeakerSearchTask",
               "Get-CHMMPVoiceToneAnalysisTask",
               "Get-CHMMPMediaCapturePipelineList",
               "Get-CHMMPMediaInsightsPipelineConfigurationList",
               "Get-CHMMPMediaPipelineKinesisVideoStreamPoolList",
               "Get-CHMMPMediaPipelineList",
               "Get-CHMMPResourceTag",
               "Start-CHMMPSpeakerSearchTask",
               "Start-CHMMPVoiceToneAnalysisTask",
               "Stop-CHMMPSpeakerSearchTask",
               "Stop-CHMMPVoiceToneAnalysisTask",
               "Add-CHMMPResourceTag",
               "Remove-CHMMPResourceTag",
               "Update-CHMMPMediaInsightsPipelineConfiguration",
               "Update-CHMMPMediaInsightsPipelineStatus",
               "Update-CHMMPMediaPipelineKinesisVideoStreamPool")
}

_awsArgumentCompleterRegistration $CHMMP_SelectCompleters $CHMMP_SelectMap
# Argument completions for service Amazon Chime SDK Meetings


$CHMTG_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ChimeSDKMeetings.ContentResolution
        {
            ($_ -eq "New-CHMTGMeeting/Content_MaxResolution") -Or
            ($_ -eq "New-CHMTGMeetingWithAttendee/Content_MaxResolution")
        }
        {
            $v = "FHD","None","UHD"
            break
        }

        # Amazon.ChimeSDKMeetings.MediaCapabilities
        {
            ($_ -eq "New-CHMTGAttendee/Capabilities_Audio") -Or
            ($_ -eq "Update-CHMTGAttendeeCapability/Capabilities_Audio") -Or
            ($_ -eq "Update-CHMTGUpdateAttendeeCapabilitiesExcept/Capabilities_Audio") -Or
            ($_ -eq "New-CHMTGAttendee/Capabilities_Content") -Or
            ($_ -eq "Update-CHMTGAttendeeCapability/Capabilities_Content") -Or
            ($_ -eq "Update-CHMTGUpdateAttendeeCapabilitiesExcept/Capabilities_Content") -Or
            ($_ -eq "New-CHMTGAttendee/Capabilities_Video") -Or
            ($_ -eq "Update-CHMTGAttendeeCapability/Capabilities_Video") -Or
            ($_ -eq "Update-CHMTGUpdateAttendeeCapabilitiesExcept/Capabilities_Video")
        }
        {
            $v = "None","Receive","Send","SendReceive"
            break
        }

        # Amazon.ChimeSDKMeetings.MeetingFeatureStatus
        {
            ($_ -eq "New-CHMTGMeeting/Audio_EchoReduction") -Or
            ($_ -eq "New-CHMTGMeetingWithAttendee/Audio_EchoReduction")
        }
        {
            $v = "AVAILABLE","UNAVAILABLE"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribeContentIdentificationType
        "Start-CHMTGMeetingTranscription/EngineTranscribeSettings_ContentIdentificationType"
        {
            $v = "PII"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribeContentRedactionType
        "Start-CHMTGMeetingTranscription/EngineTranscribeSettings_ContentRedactionType"
        {
            $v = "PII"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribeLanguageCode
        {
            ($_ -eq "Start-CHMTGMeetingTranscription/EngineTranscribeSettings_LanguageCode") -Or
            ($_ -eq "Start-CHMTGMeetingTranscription/EngineTranscribeSettings_PreferredLanguage")
        }
        {
            $v = "de-DE","en-AU","en-GB","en-US","es-US","fr-CA","fr-FR","hi-IN","it-IT","ja-JP","ko-KR","pt-BR","th-TH","zh-CN"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribeMedicalContentIdentificationType
        "Start-CHMTGMeetingTranscription/EngineTranscribeMedicalSettings_ContentIdentificationType"
        {
            $v = "PHI"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribeMedicalLanguageCode
        "Start-CHMTGMeetingTranscription/EngineTranscribeMedicalSettings_LanguageCode"
        {
            $v = "en-US"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribeMedicalRegion
        "Start-CHMTGMeetingTranscription/EngineTranscribeMedicalSettings_Region"
        {
            $v = "ap-southeast-2","auto","ca-central-1","eu-west-1","us-east-1","us-east-2","us-west-2"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribeMedicalSpecialty
        "Start-CHMTGMeetingTranscription/EngineTranscribeMedicalSettings_Specialty"
        {
            $v = "CARDIOLOGY","NEUROLOGY","ONCOLOGY","PRIMARYCARE","RADIOLOGY","UROLOGY"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribeMedicalType
        "Start-CHMTGMeetingTranscription/EngineTranscribeMedicalSettings_Type"
        {
            $v = "CONVERSATION","DICTATION"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribePartialResultsStability
        "Start-CHMTGMeetingTranscription/EngineTranscribeSettings_PartialResultsStability"
        {
            $v = "high","low","medium"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribeRegion
        "Start-CHMTGMeetingTranscription/EngineTranscribeSettings_Region"
        {
            $v = "ap-northeast-1","ap-northeast-2","ap-southeast-2","auto","ca-central-1","eu-central-1","eu-west-1","eu-west-2","sa-east-1","us-east-1","us-east-2","us-gov-west-1","us-west-2"
            break
        }

        # Amazon.ChimeSDKMeetings.TranscribeVocabularyFilterMethod
        "Start-CHMTGMeetingTranscription/EngineTranscribeSettings_VocabularyFilterMethod"
        {
            $v = "mask","remove","tag"
            break
        }

        # Amazon.ChimeSDKMeetings.VideoResolution
        {
            ($_ -eq "New-CHMTGMeeting/Video_MaxResolution") -Or
            ($_ -eq "New-CHMTGMeetingWithAttendee/Video_MaxResolution")
        }
        {
            $v = "FHD","HD","None"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHMTG_map = @{
    "Audio_EchoReduction"=@("New-CHMTGMeeting","New-CHMTGMeetingWithAttendee")
    "Capabilities_Audio"=@("New-CHMTGAttendee","Update-CHMTGAttendeeCapability","Update-CHMTGUpdateAttendeeCapabilitiesExcept")
    "Capabilities_Content"=@("New-CHMTGAttendee","Update-CHMTGAttendeeCapability","Update-CHMTGUpdateAttendeeCapabilitiesExcept")
    "Capabilities_Video"=@("New-CHMTGAttendee","Update-CHMTGAttendeeCapability","Update-CHMTGUpdateAttendeeCapabilitiesExcept")
    "Content_MaxResolution"=@("New-CHMTGMeeting","New-CHMTGMeetingWithAttendee")
    "EngineTranscribeMedicalSettings_ContentIdentificationType"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeMedicalSettings_LanguageCode"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeMedicalSettings_Region"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeMedicalSettings_Specialty"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeMedicalSettings_Type"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeSettings_ContentIdentificationType"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeSettings_ContentRedactionType"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeSettings_LanguageCode"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeSettings_PartialResultsStability"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeSettings_PreferredLanguage"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeSettings_Region"=@("Start-CHMTGMeetingTranscription")
    "EngineTranscribeSettings_VocabularyFilterMethod"=@("Start-CHMTGMeetingTranscription")
    "Video_MaxResolution"=@("New-CHMTGMeeting","New-CHMTGMeetingWithAttendee")
}

_awsArgumentCompleterRegistration $CHMTG_Completers $CHMTG_map

$CHMTG_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CHMTG.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHMTG_SelectMap = @{
    "Select"=@("New-CHMTGAttendeeBatch",
               "Update-CHMTGUpdateAttendeeCapabilitiesExcept",
               "New-CHMTGAttendee",
               "New-CHMTGMeeting",
               "New-CHMTGMeetingWithAttendee",
               "Remove-CHMTGAttendee",
               "Remove-CHMTGMeeting",
               "Get-CHMTGAttendee",
               "Get-CHMTGMeeting",
               "Get-CHMTGAttendeeList",
               "Get-CHMTGResourceTag",
               "Start-CHMTGMeetingTranscription",
               "Stop-CHMTGMeetingTranscription",
               "Add-CHMTGResourceTag",
               "Remove-CHMTGResourceTag",
               "Update-CHMTGAttendeeCapability")
}

_awsArgumentCompleterRegistration $CHMTG_SelectCompleters $CHMTG_SelectMap
# Argument completions for service Amazon Chime SDK Messaging


$CHMMG_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ChimeSDKMessaging.AllowNotifications
        "Write-CHMMGChannelMembershipPreference/PushNotifications_AllowNotification"
        {
            $v = "ALL","FILTERED","NONE"
            break
        }

        # Amazon.ChimeSDKMessaging.ChannelMembershipType
        {
            ($_ -eq "Get-CHMMGChannelMembershipList/Type") -Or
            ($_ -eq "New-CHMMGChannelMembership/Type") -Or
            ($_ -eq "New-CHMMGCreateChannelMembership/Type")
        }
        {
            $v = "DEFAULT","HIDDEN"
            break
        }

        # Amazon.ChimeSDKMessaging.ChannelMessagePersistenceType
        "Send-CHMMGChannelMessage/Persistence"
        {
            $v = "NON_PERSISTENT","PERSISTENT"
            break
        }

        # Amazon.ChimeSDKMessaging.ChannelMessageType
        "Send-CHMMGChannelMessage/Type"
        {
            $v = "CONTROL","STANDARD"
            break
        }

        # Amazon.ChimeSDKMessaging.ChannelMode
        {
            ($_ -eq "New-CHMMGChannel/Mode") -Or
            ($_ -eq "Update-CHMMGChannel/Mode")
        }
        {
            $v = "RESTRICTED","UNRESTRICTED"
            break
        }

        # Amazon.ChimeSDKMessaging.ChannelPrivacy
        {
            ($_ -eq "Get-CHMMGChannelList/Privacy") -Or
            ($_ -eq "New-CHMMGChannel/Privacy")
        }
        {
            $v = "PRIVATE","PUBLIC"
            break
        }

        # Amazon.ChimeSDKMessaging.ExpirationCriterion
        {
            ($_ -eq "New-CHMMGChannel/ExpirationSettings_ExpirationCriterion") -Or
            ($_ -eq "Write-CHMMGChannelExpirationSetting/ExpirationSettings_ExpirationCriterion")
        }
        {
            $v = "CREATED_TIMESTAMP","LAST_MESSAGE_TIMESTAMP"
            break
        }

        # Amazon.ChimeSDKMessaging.PushNotificationType
        {
            ($_ -eq "Send-CHMMGChannelFlowCallback/PushNotification_Type") -Or
            ($_ -eq "Send-CHMMGChannelMessage/PushNotification_Type")
        }
        {
            $v = "DEFAULT","VOIP"
            break
        }

        # Amazon.ChimeSDKMessaging.SortOrder
        "Get-CHMMGChannelMessageList/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHMMG_map = @{
    "ExpirationSettings_ExpirationCriterion"=@("New-CHMMGChannel","Write-CHMMGChannelExpirationSetting")
    "Mode"=@("New-CHMMGChannel","Update-CHMMGChannel")
    "Persistence"=@("Send-CHMMGChannelMessage")
    "Privacy"=@("Get-CHMMGChannelList","New-CHMMGChannel")
    "PushNotification_Type"=@("Send-CHMMGChannelFlowCallback","Send-CHMMGChannelMessage")
    "PushNotifications_AllowNotification"=@("Write-CHMMGChannelMembershipPreference")
    "SortOrder"=@("Get-CHMMGChannelMessageList")
    "Type"=@("Get-CHMMGChannelMembershipList","New-CHMMGChannelMembership","New-CHMMGCreateChannelMembership","Send-CHMMGChannelMessage")
}

_awsArgumentCompleterRegistration $CHMMG_Completers $CHMMG_map

$CHMMG_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CHMMG.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHMMG_SelectMap = @{
    "Select"=@("Register-CHMMGChannelFlow",
               "New-CHMMGCreateChannelMembership",
               "Send-CHMMGChannelFlowCallback",
               "New-CHMMGChannel",
               "New-CHMMGChannelBan",
               "New-CHMMGChannelFlow",
               "New-CHMMGChannelMembership",
               "New-CHMMGChannelModerator",
               "Remove-CHMMGChannel",
               "Remove-CHMMGChannelBan",
               "Remove-CHMMGChannelFlow",
               "Remove-CHMMGChannelMembership",
               "Remove-CHMMGChannelMessage",
               "Remove-CHMMGChannelModerator",
               "Remove-CHMMGMessagingStreamingConfiguration",
               "Get-CHMMGChannel",
               "Get-CHMMGChannelBan",
               "Get-CHMMGChannelFlow",
               "Get-CHMMGChannelMembership",
               "Get-CHMMGChannelMembershipForAppInstanceUser",
               "Get-CHMMGChannelModeratedByAppInstanceUser",
               "Get-CHMMGChannelModerator",
               "Unregister-CHMMGChannelFlow",
               "Get-CHMMGChannelMembershipPreference",
               "Get-CHMMGChannelMessage",
               "Get-CHMMGChannelMessageStatus",
               "Get-CHMMGMessagingSessionEndpoint",
               "Get-CHMMGMessagingStreamingConfiguration",
               "Get-CHMMGChannelBanList",
               "Get-CHMMGChannelFlowList",
               "Get-CHMMGChannelMembershipList",
               "Get-CHMMGChannelMembershipsForAppInstanceUserList",
               "Get-CHMMGChannelMessageList",
               "Get-CHMMGChannelModeratorList",
               "Get-CHMMGChannelList",
               "Get-CHMMGChannelsAssociatedWithChannelFlowList",
               "Get-CHMMGChannelsModeratedByAppInstanceUserList",
               "Get-CHMMGSubChannelList",
               "Get-CHMMGResourceTag",
               "Write-CHMMGChannelExpirationSetting",
               "Write-CHMMGChannelMembershipPreference",
               "Write-CHMMGMessagingStreamingConfiguration",
               "Hide-CHMMGChannelMessage",
               "Search-CHMMGChannel",
               "Send-CHMMGChannelMessage",
               "Add-CHMMGResourceTag",
               "Remove-CHMMGResourceTag",
               "Update-CHMMGChannel",
               "Update-CHMMGChannelFlow",
               "Update-CHMMGChannelMessage",
               "Update-CHMMGChannelReadMarker")
}

_awsArgumentCompleterRegistration $CHMMG_SelectCompleters $CHMMG_SelectMap
# Argument completions for service Amazon Chime SDK Voice


$CHMVO_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ChimeSDKVoice.AlexaSkillStatus
        "Write-CHMVOSipMediaApplicationAlexaSkillConfiguration/SipMediaApplicationAlexaSkillConfiguration_AlexaSkillStatus"
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.ChimeSDKVoice.CallLegType
        "Start-CHMVOSpeakerSearchTask/CallLeg"
        {
            $v = "Callee","Caller"
            break
        }

        # Amazon.ChimeSDKVoice.GeoMatchLevel
        "New-CHMVOProxySession/GeoMatchLevel"
        {
            $v = "AreaCode","Country"
            break
        }

        # Amazon.ChimeSDKVoice.LanguageCode
        "Start-CHMVOVoiceToneAnalysisTask/LanguageCode"
        {
            $v = "en-US"
            break
        }

        # Amazon.ChimeSDKVoice.NumberSelectionBehavior
        "New-CHMVOProxySession/NumberSelectionBehavior"
        {
            $v = "AvoidSticky","PreferSticky"
            break
        }

        # Amazon.ChimeSDKVoice.PhoneNumberAssociationName
        "Get-CHMVOPhoneNumberList/FilterName"
        {
            $v = "SipRuleId","VoiceConnectorGroupId","VoiceConnectorId"
            break
        }

        # Amazon.ChimeSDKVoice.PhoneNumberProductType
        {
            ($_ -eq "Get-CHMVOPhoneNumberList/ProductType") -Or
            ($_ -eq "Get-CHMVOSupportedPhoneNumberCountryList/ProductType") -Or
            ($_ -eq "New-CHMVOPhoneNumberOrder/ProductType") -Or
            ($_ -eq "Update-CHMVOPhoneNumber/ProductType")
        }
        {
            $v = "SipMediaApplicationDialIn","VoiceConnector"
            break
        }

        # Amazon.ChimeSDKVoice.PhoneNumberType
        "Search-CHMVOAvailablePhoneNumber/PhoneNumberType"
        {
            $v = "Local","TollFree"
            break
        }

        # Amazon.ChimeSDKVoice.ProxySessionStatus
        "Get-CHMVOProxySessionList/Status"
        {
            $v = "Closed","InProgress","Open"
            break
        }

        # Amazon.ChimeSDKVoice.SipRuleTriggerType
        "New-CHMVOSipRule/TriggerType"
        {
            $v = "RequestUriHostname","ToPhoneNumber"
            break
        }

        # Amazon.ChimeSDKVoice.VoiceConnectorAwsRegion
        "New-CHMVOVoiceConnector/AwsRegion"
        {
            $v = "ap-northeast-1","ap-northeast-2","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-west-1","eu-west-2","us-east-1","us-west-2"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHMVO_map = @{
    "AwsRegion"=@("New-CHMVOVoiceConnector")
    "CallLeg"=@("Start-CHMVOSpeakerSearchTask")
    "FilterName"=@("Get-CHMVOPhoneNumberList")
    "GeoMatchLevel"=@("New-CHMVOProxySession")
    "LanguageCode"=@("Start-CHMVOVoiceToneAnalysisTask")
    "NumberSelectionBehavior"=@("New-CHMVOProxySession")
    "PhoneNumberType"=@("Search-CHMVOAvailablePhoneNumber")
    "ProductType"=@("Get-CHMVOPhoneNumberList","Get-CHMVOSupportedPhoneNumberCountryList","New-CHMVOPhoneNumberOrder","Update-CHMVOPhoneNumber")
    "SipMediaApplicationAlexaSkillConfiguration_AlexaSkillStatus"=@("Write-CHMVOSipMediaApplicationAlexaSkillConfiguration")
    "Status"=@("Get-CHMVOProxySessionList")
    "TriggerType"=@("New-CHMVOSipRule")
}

_awsArgumentCompleterRegistration $CHMVO_Completers $CHMVO_map

$CHMVO_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CHMVO.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CHMVO_SelectMap = @{
    "Select"=@("Add-CHMVOPhoneNumbersWithVoiceConnector",
               "Add-CHMVOPhoneNumbersWithVoiceConnectorGroup",
               "Group-CHMVODeletePhoneNumber",
               "Group-CHMVOUpdatePhoneNumber",
               "New-CHMVOPhoneNumberOrder",
               "New-CHMVOProxySession",
               "New-CHMVOSipMediaApplication",
               "New-CHMVOSipMediaApplicationCall",
               "New-CHMVOSipRule",
               "New-CHMVOVoiceConnector",
               "New-CHMVOVoiceConnectorGroup",
               "New-CHMVOVoiceProfile",
               "New-CHMVOVoiceProfileDomain",
               "Remove-CHMVOPhoneNumber",
               "Remove-CHMVOProxySession",
               "Remove-CHMVOSipMediaApplication",
               "Remove-CHMVOSipRule",
               "Remove-CHMVOVoiceConnector",
               "Remove-CHMVOVoiceConnectorEmergencyCallingConfiguration",
               "Remove-CHMVOVoiceConnectorGroup",
               "Remove-CHMVOVoiceConnectorOrigination",
               "Remove-CHMVOVoiceConnectorProxy",
               "Remove-CHMVOVoiceConnectorStreamingConfiguration",
               "Remove-CHMVOVoiceConnectorTermination",
               "Remove-CHMVOVoiceConnectorTerminationCredential",
               "Remove-CHMVOVoiceProfile",
               "Remove-CHMVOVoiceProfileDomain",
               "Remove-CHMVOPhoneNumbersFromVoiceConnector",
               "Remove-CHMVOPhoneNumbersFromVoiceConnectorGroup",
               "Get-CHMVOGlobalSetting",
               "Get-CHMVOPhoneNumber",
               "Get-CHMVOPhoneNumberOrder",
               "Get-CHMVOPhoneNumberSetting",
               "Get-CHMVOProxySession",
               "Get-CHMVOSipMediaApplication",
               "Get-CHMVOSipMediaApplicationAlexaSkillConfiguration",
               "Get-CHMVOSipMediaApplicationLoggingConfiguration",
               "Get-CHMVOSipRule",
               "Get-CHMVOSpeakerSearchTask",
               "Get-CHMVOVoiceConnector",
               "Get-CHMVOVoiceConnectorEmergencyCallingConfiguration",
               "Get-CHMVOVoiceConnectorGroup",
               "Get-CHMVOVoiceConnectorLoggingConfiguration",
               "Get-CHMVOVoiceConnectorOrigination",
               "Get-CHMVOVoiceConnectorProxy",
               "Get-CHMVOVoiceConnectorStreamingConfiguration",
               "Get-CHMVOVoiceConnectorTermination",
               "Get-CHMVOVoiceConnectorTerminationHealth",
               "Get-CHMVOVoiceProfile",
               "Get-CHMVOVoiceProfileDomain",
               "Get-CHMVOVoiceToneAnalysisTask",
               "Get-CHMVOAvailableVoiceConnectorRegionList",
               "Get-CHMVOPhoneNumberOrderList",
               "Get-CHMVOPhoneNumberList",
               "Get-CHMVOProxySessionList",
               "Get-CHMVOSipMediaApplicationList",
               "Get-CHMVOSipRuleList",
               "Get-CHMVOSupportedPhoneNumberCountryList",
               "Get-CHMVOResourceTag",
               "Get-CHMVOVoiceConnectorGroupList",
               "Get-CHMVOVoiceConnectorList",
               "Get-CHMVOVoiceConnectorTerminationCredentialList",
               "Get-CHMVOVoiceProfileDomainList",
               "Get-CHMVOVoiceProfileList",
               "Write-CHMVOSipMediaApplicationAlexaSkillConfiguration",
               "Write-CHMVOSipMediaApplicationLoggingConfiguration",
               "Write-CHMVOVoiceConnectorEmergencyCallingConfiguration",
               "Write-CHMVOVoiceConnectorLoggingConfiguration",
               "Write-CHMVOVoiceConnectorOrigination",
               "Write-CHMVOVoiceConnectorProxy",
               "Write-CHMVOVoiceConnectorStreamingConfiguration",
               "Write-CHMVOVoiceConnectorTermination",
               "Write-CHMVOVoiceConnectorTerminationCredential",
               "Restore-CHMVOPhoneNumber",
               "Search-CHMVOAvailablePhoneNumber",
               "Start-CHMVOSpeakerSearchTask",
               "Start-CHMVOVoiceToneAnalysisTask",
               "Stop-CHMVOSpeakerSearchTask",
               "Stop-CHMVOVoiceToneAnalysisTask",
               "Add-CHMVOResourceTag",
               "Remove-CHMVOResourceTag",
               "Update-CHMVOGlobalSetting",
               "Update-CHMVOPhoneNumber",
               "Update-CHMVOPhoneNumberSetting",
               "Update-CHMVOProxySession",
               "Update-CHMVOSipMediaApplication",
               "Update-CHMVOSipMediaApplicationCall",
               "Update-CHMVOSipRule",
               "Update-CHMVOVoiceConnector",
               "Update-CHMVOVoiceConnectorGroup",
               "Update-CHMVOVoiceProfile",
               "Update-CHMVOVoiceProfileDomain",
               "Confirm-CHMVOE911Address")
}

_awsArgumentCompleterRegistration $CHMVO_SelectCompleters $CHMVO_SelectMap
# Argument completions for service AWS Clean Rooms Service


$CRS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CleanRooms.AdditionalAnalyses
        {
            ($_ -eq "New-CRSConfiguredTableAnalysisRule/Aggregation_AdditionalAnalysis") -Or
            ($_ -eq "Update-CRSConfiguredTableAnalysisRule/Aggregation_AdditionalAnalysis") -Or
            ($_ -eq "New-CRSConfiguredTableAnalysisRule/Custom_AdditionalAnalysis") -Or
            ($_ -eq "Update-CRSConfiguredTableAnalysisRule/Custom_AdditionalAnalysis") -Or
            ($_ -eq "New-CRSConfiguredTableAnalysisRule/List_AdditionalAnalysis") -Or
            ($_ -eq "Update-CRSConfiguredTableAnalysisRule/List_AdditionalAnalysis")
        }
        {
            $v = "ALLOWED","NOT_ALLOWED","REQUIRED"
            break
        }

        # Amazon.CleanRooms.AnalysisFormat
        "New-CRSAnalysisTemplate/Format"
        {
            $v = "SQL"
            break
        }

        # Amazon.CleanRooms.AnalysisMethod
        "New-CRSConfiguredTable/AnalysisMethod"
        {
            $v = "DIRECT_QUERY"
            break
        }

        # Amazon.CleanRooms.AnalysisRuleType
        "Get-CRSSchemaAnalysisRule/Type"
        {
            $v = "AGGREGATION","CUSTOM","ID_MAPPING_TABLE","LIST"
            break
        }

        # Amazon.CleanRooms.AnalyticsEngine
        "New-CRSCollaboration/AnalyticsEngine"
        {
            $v = "CLEAN_ROOMS_SQL","SPARK"
            break
        }

        # Amazon.CleanRooms.CollaborationQueryLogStatus
        "New-CRSCollaboration/QueryLogStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.CleanRooms.ConfiguredTableAnalysisRuleType
        {
            ($_ -eq "Get-CRSConfiguredTableAnalysisRule/AnalysisRuleType") -Or
            ($_ -eq "New-CRSConfiguredTableAnalysisRule/AnalysisRuleType") -Or
            ($_ -eq "Remove-CRSConfiguredTableAnalysisRule/AnalysisRuleType") -Or
            ($_ -eq "Update-CRSConfiguredTableAnalysisRule/AnalysisRuleType")
        }
        {
            $v = "AGGREGATION","CUSTOM","LIST"
            break
        }

        # Amazon.CleanRooms.ConfiguredTableAssociationAnalysisRuleType
        {
            ($_ -eq "Get-CRSConfiguredTableAssociationAnalysisRule/AnalysisRuleType") -Or
            ($_ -eq "New-CRSConfiguredTableAssociationAnalysisRule/AnalysisRuleType") -Or
            ($_ -eq "Remove-CRSConfiguredTableAssociationAnalysisRule/AnalysisRuleType") -Or
            ($_ -eq "Update-CRSConfiguredTableAssociationAnalysisRule/AnalysisRuleType")
        }
        {
            $v = "AGGREGATION","CUSTOM","LIST"
            break
        }

        # Amazon.CleanRooms.FilterableMemberStatus
        "Get-CRSCollaborationList/MemberStatus"
        {
            $v = "ACTIVE","INVITED"
            break
        }

        # Amazon.CleanRooms.JoinRequiredOption
        {
            ($_ -eq "New-CRSConfiguredTableAnalysisRule/Aggregation_JoinRequired") -Or
            ($_ -eq "Update-CRSConfiguredTableAnalysisRule/Aggregation_JoinRequired")
        }
        {
            $v = "QUERY_RUNNER"
            break
        }

        # Amazon.CleanRooms.MembershipQueryLogStatus
        {
            ($_ -eq "New-CRSMembership/QueryLogStatus") -Or
            ($_ -eq "Update-CRSMembership/QueryLogStatus")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.CleanRooms.MembershipStatus
        "Get-CRSMembershipList/Status"
        {
            $v = "ACTIVE","COLLABORATION_DELETED","REMOVED"
            break
        }

        # Amazon.CleanRooms.PrivacyBudgetTemplateAutoRefresh
        "New-CRSPrivacyBudgetTemplate/AutoRefresh"
        {
            $v = "CALENDAR_MONTH","NONE"
            break
        }

        # Amazon.CleanRooms.PrivacyBudgetType
        {
            ($_ -eq "Get-CRSCollaborationPrivacyBudgetList/PrivacyBudgetType") -Or
            ($_ -eq "Get-CRSPrivacyBudgetList/PrivacyBudgetType") -Or
            ($_ -eq "New-CRSPrivacyBudgetTemplate/PrivacyBudgetType") -Or
            ($_ -eq "Update-CRSPrivacyBudgetTemplate/PrivacyBudgetType")
        }
        {
            $v = "DIFFERENTIAL_PRIVACY"
            break
        }

        # Amazon.CleanRooms.ProtectedQueryStatus
        "Get-CRSProtectedQueryList/Status"
        {
            $v = "CANCELLED","CANCELLING","FAILED","STARTED","SUBMITTED","SUCCESS","TIMED_OUT"
            break
        }

        # Amazon.CleanRooms.ProtectedQueryType
        "Start-CRSProtectedQuery/Type"
        {
            $v = "SQL"
            break
        }

        # Amazon.CleanRooms.ResultFormat
        {
            ($_ -eq "New-CRSMembership/S3_ResultFormat") -Or
            ($_ -eq "Start-CRSProtectedQuery/S3_ResultFormat") -Or
            ($_ -eq "Update-CRSMembership/S3_ResultFormat")
        }
        {
            $v = "CSV","PARQUET"
            break
        }

        # Amazon.CleanRooms.SchemaType
        "Get-CRSSchemaList/SchemaType"
        {
            $v = "ID_MAPPING_TABLE","TABLE"
            break
        }

        # Amazon.CleanRooms.TargetProtectedQueryStatus
        "Update-CRSProtectedQuery/TargetStatus"
        {
            $v = "CANCELLED"
            break
        }

        # Amazon.CleanRooms.WorkerComputeType
        "Start-CRSProtectedQuery/Worker_Type"
        {
            $v = "CR.1X","CR.4X"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CRS_map = @{
    "Aggregation_AdditionalAnalysis"=@("New-CRSConfiguredTableAnalysisRule","Update-CRSConfiguredTableAnalysisRule")
    "Aggregation_JoinRequired"=@("New-CRSConfiguredTableAnalysisRule","Update-CRSConfiguredTableAnalysisRule")
    "AnalysisMethod"=@("New-CRSConfiguredTable")
    "AnalysisRuleType"=@("Get-CRSConfiguredTableAnalysisRule","Get-CRSConfiguredTableAssociationAnalysisRule","New-CRSConfiguredTableAnalysisRule","New-CRSConfiguredTableAssociationAnalysisRule","Remove-CRSConfiguredTableAnalysisRule","Remove-CRSConfiguredTableAssociationAnalysisRule","Update-CRSConfiguredTableAnalysisRule","Update-CRSConfiguredTableAssociationAnalysisRule")
    "AnalyticsEngine"=@("New-CRSCollaboration")
    "AutoRefresh"=@("New-CRSPrivacyBudgetTemplate")
    "Custom_AdditionalAnalysis"=@("New-CRSConfiguredTableAnalysisRule","Update-CRSConfiguredTableAnalysisRule")
    "Format"=@("New-CRSAnalysisTemplate")
    "List_AdditionalAnalysis"=@("New-CRSConfiguredTableAnalysisRule","Update-CRSConfiguredTableAnalysisRule")
    "MemberStatus"=@("Get-CRSCollaborationList")
    "PrivacyBudgetType"=@("Get-CRSCollaborationPrivacyBudgetList","Get-CRSPrivacyBudgetList","New-CRSPrivacyBudgetTemplate","Update-CRSPrivacyBudgetTemplate")
    "QueryLogStatus"=@("New-CRSCollaboration","New-CRSMembership","Update-CRSMembership")
    "S3_ResultFormat"=@("New-CRSMembership","Start-CRSProtectedQuery","Update-CRSMembership")
    "SchemaType"=@("Get-CRSSchemaList")
    "Status"=@("Get-CRSMembershipList","Get-CRSProtectedQueryList")
    "TargetStatus"=@("Update-CRSProtectedQuery")
    "Type"=@("Get-CRSSchemaAnalysisRule","Start-CRSProtectedQuery")
    "Worker_Type"=@("Start-CRSProtectedQuery")
}

_awsArgumentCompleterRegistration $CRS_Completers $CRS_map

$CRS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CRS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CRS_SelectMap = @{
    "Select"=@("Get-CRSBatchCollaborationAnalysisTemplate",
               "Get-CRSBatchSchema",
               "Get-CRSBatchGetSchemaAnalysisRule",
               "New-CRSAnalysisTemplate",
               "New-CRSCollaboration",
               "New-CRSConfiguredAudienceModelAssociation",
               "New-CRSConfiguredTable",
               "New-CRSConfiguredTableAnalysisRule",
               "New-CRSConfiguredTableAssociation",
               "New-CRSConfiguredTableAssociationAnalysisRule",
               "New-CRSIdMappingTable",
               "New-CRSIdNamespaceAssociation",
               "New-CRSMembership",
               "New-CRSPrivacyBudgetTemplate",
               "Remove-CRSAnalysisTemplate",
               "Remove-CRSCollaboration",
               "Remove-CRSConfiguredAudienceModelAssociation",
               "Remove-CRSConfiguredTable",
               "Remove-CRSConfiguredTableAnalysisRule",
               "Remove-CRSConfiguredTableAssociation",
               "Remove-CRSConfiguredTableAssociationAnalysisRule",
               "Remove-CRSIdMappingTable",
               "Remove-CRSIdNamespaceAssociation",
               "Remove-CRSMember",
               "Remove-CRSMembership",
               "Remove-CRSPrivacyBudgetTemplate",
               "Get-CRSAnalysisTemplate",
               "Get-CRSCollaboration",
               "Get-CRSCollaborationAnalysisTemplate",
               "Get-CRSCollaborationConfiguredAudienceModelAssociation",
               "Get-CRSCollaborationIdNamespaceAssociation",
               "Get-CRSCollaborationPrivacyBudgetTemplate",
               "Get-CRSConfiguredAudienceModelAssociation",
               "Get-CRSConfiguredTable",
               "Get-CRSConfiguredTableAnalysisRule",
               "Get-CRSConfiguredTableAssociation",
               "Get-CRSConfiguredTableAssociationAnalysisRule",
               "Get-CRSIdMappingTable",
               "Get-CRSIdNamespaceAssociation",
               "Get-CRSMembership",
               "Get-CRSPrivacyBudgetTemplate",
               "Get-CRSProtectedQuery",
               "Get-CRSSchema",
               "Get-CRSSchemaAnalysisRule",
               "Get-CRSAnalysisTemplateList",
               "Get-CRSCollaborationAnalysisTemplateList",
               "Get-CRSCollaborationConfiguredAudienceModelAssociationList",
               "Get-CRSCollaborationIdNamespaceAssociationList",
               "Get-CRSCollaborationPrivacyBudgetList",
               "Get-CRSCollaborationPrivacyBudgetTemplateList",
               "Get-CRSCollaborationList",
               "Get-CRSConfiguredAudienceModelAssociationList",
               "Get-CRSConfiguredTableAssociationList",
               "Get-CRSConfiguredTableList",
               "Get-CRSIdMappingTableList",
               "Get-CRSIdNamespaceAssociationList",
               "Get-CRSMemberList",
               "Get-CRSMembershipList",
               "Get-CRSPrivacyBudgetList",
               "Get-CRSPrivacyBudgetTemplateList",
               "Get-CRSProtectedQueryList",
               "Get-CRSSchemaList",
               "Get-CRSResourceTag",
               "Invoke-CRSIdMappingTable",
               "Test-CRSPrivacyImpact",
               "Start-CRSProtectedQuery",
               "Add-CRSResourceTag",
               "Remove-CRSResourceTag",
               "Update-CRSAnalysisTemplate",
               "Update-CRSCollaboration",
               "Update-CRSConfiguredAudienceModelAssociation",
               "Update-CRSConfiguredTable",
               "Update-CRSConfiguredTableAnalysisRule",
               "Update-CRSConfiguredTableAssociation",
               "Update-CRSConfiguredTableAssociationAnalysisRule",
               "Update-CRSIdMappingTable",
               "Update-CRSIdNamespaceAssociation",
               "Update-CRSMembership",
               "Update-CRSPrivacyBudgetTemplate",
               "Update-CRSProtectedQuery")
}

_awsArgumentCompleterRegistration $CRS_SelectCompleters $CRS_SelectMap
# Argument completions for service CleanRoomsML


$CRML_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CleanRoomsML.AudienceSizeType
        {
            ($_ -eq "Start-CRMLAudienceExportJob/AudienceSize_Type") -Or
            ($_ -eq "New-CRMLConfiguredAudienceModel/AudienceSizeConfig_AudienceSizeType") -Or
            ($_ -eq "Update-CRMLConfiguredAudienceModel/AudienceSizeConfig_AudienceSizeType")
        }
        {
            $v = "ABSOLUTE","PERCENTAGE"
            break
        }

        # Amazon.CleanRoomsML.PolicyExistenceCondition
        "Write-CRMLConfiguredAudienceModelPolicy/PolicyExistenceCondition"
        {
            $v = "POLICY_MUST_EXIST","POLICY_MUST_NOT_EXIST"
            break
        }

        # Amazon.CleanRoomsML.TagOnCreatePolicy
        "New-CRMLConfiguredAudienceModel/ChildResourceTagOnCreatePolicy"
        {
            $v = "FROM_PARENT_RESOURCE","NONE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CRML_map = @{
    "AudienceSize_Type"=@("Start-CRMLAudienceExportJob")
    "AudienceSizeConfig_AudienceSizeType"=@("New-CRMLConfiguredAudienceModel","Update-CRMLConfiguredAudienceModel")
    "ChildResourceTagOnCreatePolicy"=@("New-CRMLConfiguredAudienceModel")
    "PolicyExistenceCondition"=@("Write-CRMLConfiguredAudienceModelPolicy")
}

_awsArgumentCompleterRegistration $CRML_Completers $CRML_map

$CRML_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CRML.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CRML_SelectMap = @{
    "Select"=@("New-CRMLAudienceModel",
               "New-CRMLConfiguredAudienceModel",
               "New-CRMLTrainingDataset",
               "Remove-CRMLAudienceGenerationJob",
               "Remove-CRMLAudienceModel",
               "Remove-CRMLConfiguredAudienceModel",
               "Remove-CRMLConfiguredAudienceModelPolicy",
               "Remove-CRMLTrainingDataset",
               "Get-CRMLAudienceGenerationJob",
               "Get-CRMLAudienceModel",
               "Get-CRMLConfiguredAudienceModel",
               "Get-CRMLConfiguredAudienceModelPolicy",
               "Get-CRMLTrainingDataset",
               "Get-CRMLAudienceExportJobList",
               "Get-CRMLAudienceGenerationJobList",
               "Get-CRMLAudienceModelList",
               "Get-CRMLConfiguredAudienceModelList",
               "Get-CRMLResourceTag",
               "Get-CRMLTrainingDatasetList",
               "Write-CRMLConfiguredAudienceModelPolicy",
               "Start-CRMLAudienceExportJob",
               "Start-CRMLAudienceGenerationJob",
               "Add-CRMLResourceTag",
               "Remove-CRMLResourceTag",
               "Update-CRMLConfiguredAudienceModel")
}

_awsArgumentCompleterRegistration $CRML_SelectCompleters $CRML_SelectMap
# Argument completions for service AWS Cloud9


$C9_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Cloud9.ConnectionType
        "New-C9EnvironmentEC2/ConnectionType"
        {
            $v = "CONNECT_SSH","CONNECT_SSM"
            break
        }

        # Amazon.Cloud9.ManagedCredentialsAction
        "Update-C9Environment/ManagedCredentialsAction"
        {
            $v = "DISABLE","ENABLE"
            break
        }

        # Amazon.Cloud9.MemberPermissions
        {
            ($_ -eq "New-C9EnvironmentMembership/Permission") -Or
            ($_ -eq "Update-C9EnvironmentMembership/Permission")
        }
        {
            $v = "read-only","read-write"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$C9_map = @{
    "ConnectionType"=@("New-C9EnvironmentEC2")
    "ManagedCredentialsAction"=@("Update-C9Environment")
    "Permission"=@("New-C9EnvironmentMembership","Update-C9EnvironmentMembership")
}

_awsArgumentCompleterRegistration $C9_Completers $C9_map

$C9_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.C9.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$C9_SelectMap = @{
    "Select"=@("New-C9EnvironmentEC2",
               "New-C9EnvironmentMembership",
               "Remove-C9Environment",
               "Remove-C9EnvironmentMembership",
               "Get-C9EnvironmentMembershipList",
               "Get-C9EnvironmentData",
               "Get-C9EnvironmentStatus",
               "Get-C9EnvironmentList",
               "Get-C9ResourceTag",
               "Add-C9ResourceTag",
               "Remove-C9ResourceTag",
               "Update-C9Environment",
               "Update-C9EnvironmentMembership")
}

_awsArgumentCompleterRegistration $C9_SelectCompleters $C9_SelectMap
# Argument completions for service AWS Cloud Control API


$CCA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CCA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CCA_SelectMap = @{
    "Select"=@("Stop-CCAResourceRequest",
               "New-CCAResource",
               "Remove-CCAResource",
               "Get-CCAResource",
               "Get-CCAResourceRequestStatus",
               "Get-CCAResourceRequestList",
               "Get-CCAResourceList",
               "Update-CCAResource")
}

_awsArgumentCompleterRegistration $CCA_SelectCompleters $CCA_SelectMap
# Argument completions for service Amazon Cloud Directory


$CDIR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudDirectory.ConsistencyLevel
        {
            ($_ -eq "Get-CDIRIncomingTypedLink/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIRIndex/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIRLinkAttribute/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIRObjectAttribute/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIRObjectAttributeList/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIRObjectChild/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIRObjectIndex/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIRObjectInformation/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIRObjectParent/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIRObjectPolicy/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIROutgoingTypedLink/ConsistencyLevel") -Or
            ($_ -eq "Get-CDIRPolicyAttachment/ConsistencyLevel") -Or
            ($_ -eq "Read-CDIRDirectoryBatch/ConsistencyLevel")
        }
        {
            $v = "EVENTUAL","SERIALIZABLE"
            break
        }

        # Amazon.CloudDirectory.DirectoryState
        "Get-CDIRDirectory/State"
        {
            $v = "DELETED","DISABLED","ENABLED"
            break
        }

        # Amazon.CloudDirectory.FacetStyle
        "New-CDIRFacet/FacetStyle"
        {
            $v = "DYNAMIC","STATIC"
            break
        }

        # Amazon.CloudDirectory.ObjectType
        {
            ($_ -eq "New-CDIRFacet/ObjectType") -Or
            ($_ -eq "Update-CDIRFacet/ObjectType")
        }
        {
            $v = "INDEX","LEAF_NODE","NODE","POLICY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CDIR_map = @{
    "ConsistencyLevel"=@("Get-CDIRIncomingTypedLink","Get-CDIRIndex","Get-CDIRLinkAttribute","Get-CDIRObjectAttribute","Get-CDIRObjectAttributeList","Get-CDIRObjectChild","Get-CDIRObjectIndex","Get-CDIRObjectInformation","Get-CDIRObjectParent","Get-CDIRObjectPolicy","Get-CDIROutgoingTypedLink","Get-CDIRPolicyAttachment","Read-CDIRDirectoryBatch")
    "FacetStyle"=@("New-CDIRFacet")
    "ObjectType"=@("New-CDIRFacet","Update-CDIRFacet")
    "State"=@("Get-CDIRDirectory")
}

_awsArgumentCompleterRegistration $CDIR_Completers $CDIR_map

$CDIR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CDIR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CDIR_SelectMap = @{
    "Select"=@("Add-CDIRFacetToObject",
               "Add-CDIRSchema",
               "Connect-CDIRObject",
               "Mount-CDIRPolicy",
               "Mount-CDIRObjectToIndex",
               "Mount-CDIRTypedLink",
               "Read-CDIRDirectoryBatch",
               "Write-CDIRDirectoryBatch",
               "New-CDIRDirectory",
               "New-CDIRFacet",
               "New-CDIRIndex",
               "New-CDIRDirectoryObject",
               "New-CDIRSchema",
               "New-CDIRTypedLinkFacet",
               "Remove-CDIRDirectory",
               "Remove-CDIRFacet",
               "Remove-CDIRDirectoryObject",
               "Remove-CDIRSchema",
               "Remove-CDIRTypedLinkFacet",
               "Dismount-CDIRObjectFromIndex",
               "Disconnect-CDIRObject",
               "Dismount-CDIRPolicyFromObject",
               "Dismount-CDIRTypedLink",
               "Disable-CDIRDirectory",
               "Enable-CDIRDirectory",
               "Get-CDIRAppliedSchemaVersion",
               "Get-CDIRDirectoryMetadata",
               "Get-CDIRFacet",
               "Get-CDIRLinkAttribute",
               "Get-CDIRObjectAttribute",
               "Get-CDIRObjectInformation",
               "Get-CDIRSchemaAsJson",
               "Get-CDIRTypedLinkFacetInformation",
               "Get-CDIRAppliedSchemaArn",
               "Get-CDIRObjectIndex",
               "Get-CDIRDevelopmentSchemaArn",
               "Get-CDIRDirectory",
               "Get-CDIRFacetAttribute",
               "Get-CDIRFacetName",
               "Get-CDIRIncomingTypedLink",
               "Get-CDIRIndex",
               "Get-CDIRManagedSchemaArn",
               "Get-CDIRObjectAttributeList",
               "Get-CDIRObjectChild",
               "Get-CDIRObjectParentPath",
               "Get-CDIRObjectParent",
               "Get-CDIRObjectPolicy",
               "Get-CDIROutgoingTypedLink",
               "Get-CDIRPolicyAttachment",
               "Get-CDIRPublishedSchemaArn",
               "Get-CDIRResourceTag",
               "Get-CDIRTypedLinkFacetAttribute",
               "Get-CDIRTypedLinkFacetName",
               "Get-CDIRDirectoryPolicy",
               "Publish-CDIRSchema",
               "Write-CDIRSchemaFromJson",
               "Remove-CDIRFacetFromObject",
               "Add-CDIRResourceTag",
               "Remove-CDIRResourceTag",
               "Update-CDIRFacet",
               "Update-CDIRLinkAttribute",
               "Update-CDIRObjectAttribute",
               "Update-CDIRSchema",
               "Update-CDIRTypedLinkFacet",
               "Update-CDIRAppliedSchema",
               "Update-CDIRPublishedSchema")
}

_awsArgumentCompleterRegistration $CDIR_SelectCompleters $CDIR_SelectMap
# Argument completions for service AWS CloudFormation


$CFN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudFormation.AccountFilterType
        {
            ($_ -eq "New-CFNStackInstance/DeploymentTargets_AccountFilterType") -Or
            ($_ -eq "Remove-CFNStackInstance/DeploymentTargets_AccountFilterType") -Or
            ($_ -eq "Update-CFNStackInstance/DeploymentTargets_AccountFilterType") -Or
            ($_ -eq "Update-CFNStackSet/DeploymentTargets_AccountFilterType")
        }
        {
            $v = "DIFFERENCE","INTERSECTION","NONE","UNION"
            break
        }

        # Amazon.CloudFormation.CallAs
        {
            ($_ -eq "Get-CFNOrganizationsAccess/CallAs") -Or
            ($_ -eq "Get-CFNStackInstance/CallAs") -Or
            ($_ -eq "Get-CFNStackInstanceList/CallAs") -Or
            ($_ -eq "Get-CFNStackInstanceResourceDrift/CallAs") -Or
            ($_ -eq "Get-CFNStackSet/CallAs") -Or
            ($_ -eq "Get-CFNStackSetAutoDeploymentTarget/CallAs") -Or
            ($_ -eq "Get-CFNStackSetList/CallAs") -Or
            ($_ -eq "Get-CFNStackSetOperation/CallAs") -Or
            ($_ -eq "Get-CFNStackSetOperationList/CallAs") -Or
            ($_ -eq "Get-CFNStackSetOperationResultList/CallAs") -Or
            ($_ -eq "Get-CFNTemplateSummary/CallAs") -Or
            ($_ -eq "Import-CFNStacksToStackSet/CallAs") -Or
            ($_ -eq "New-CFNStackInstance/CallAs") -Or
            ($_ -eq "New-CFNStackSet/CallAs") -Or
            ($_ -eq "Remove-CFNStackInstance/CallAs") -Or
            ($_ -eq "Remove-CFNStackSet/CallAs") -Or
            ($_ -eq "Start-CFNStackSetDriftDetection/CallAs") -Or
            ($_ -eq "Stop-CFNStackSetOperation/CallAs") -Or
            ($_ -eq "Update-CFNStackInstance/CallAs") -Or
            ($_ -eq "Update-CFNStackSet/CallAs")
        }
        {
            $v = "DELEGATED_ADMIN","SELF"
            break
        }

        # Amazon.CloudFormation.Category
        "Get-CFNTypeList/Filters_Category"
        {
            $v = "ACTIVATED","AWS_TYPES","REGISTERED","THIRD_PARTY"
            break
        }

        # Amazon.CloudFormation.ChangeSetType
        "New-CFNChangeSet/ChangeSetType"
        {
            $v = "CREATE","IMPORT","UPDATE"
            break
        }

        # Amazon.CloudFormation.DeletionMode
        "Remove-CFNStack/DeletionMode"
        {
            $v = "FORCE_DELETE_STACK","STANDARD"
            break
        }

        # Amazon.CloudFormation.DeprecatedStatus
        {
            ($_ -eq "Get-CFNTypeList/DeprecatedStatus") -Or
            ($_ -eq "Get-CFNTypeVersion/DeprecatedStatus")
        }
        {
            $v = "DEPRECATED","LIVE"
            break
        }

        # Amazon.CloudFormation.GeneratedTemplateDeletionPolicy
        {
            ($_ -eq "New-CFNGeneratedTemplate/TemplateConfiguration_DeletionPolicy") -Or
            ($_ -eq "Update-CFNGeneratedTemplate/TemplateConfiguration_DeletionPolicy")
        }
        {
            $v = "DELETE","RETAIN"
            break
        }

        # Amazon.CloudFormation.GeneratedTemplateUpdateReplacePolicy
        {
            ($_ -eq "New-CFNGeneratedTemplate/TemplateConfiguration_UpdateReplacePolicy") -Or
            ($_ -eq "Update-CFNGeneratedTemplate/TemplateConfiguration_UpdateReplacePolicy")
        }
        {
            $v = "DELETE","RETAIN"
            break
        }

        # Amazon.CloudFormation.HandlerErrorCode
        "Write-CFNHandlerProgress/ErrorCode"
        {
            $v = "AccessDenied","AlreadyExists","GeneralServiceException","HandlerInternalFailure","InternalFailure","InvalidCredentials","InvalidRequest","InvalidTypeConfiguration","NetworkFailure","NonCompliant","NotFound","NotStabilized","NotUpdatable","ResourceConflict","ServiceInternalError","ServiceLimitExceeded","Throttling","Unknown","UnsupportedTarget"
            break
        }

        # Amazon.CloudFormation.OnFailure
        "New-CFNStack/OnFailure"
        {
            $v = "DELETE","DO_NOTHING","ROLLBACK"
            break
        }

        # Amazon.CloudFormation.OnStackFailure
        "New-CFNChangeSet/OnStackFailure"
        {
            $v = "DELETE","DO_NOTHING","ROLLBACK"
            break
        }

        # Amazon.CloudFormation.OperationStatus
        {
            ($_ -eq "Write-CFNHandlerProgress/CurrentOperationStatus") -Or
            ($_ -eq "Write-CFNHandlerProgress/OperationStatus")
        }
        {
            $v = "FAILED","IN_PROGRESS","PENDING","SUCCESS"
            break
        }

        # Amazon.CloudFormation.PermissionModels
        {
            ($_ -eq "New-CFNStackSet/PermissionModel") -Or
            ($_ -eq "Update-CFNStackSet/PermissionModel")
        }
        {
            $v = "SELF_MANAGED","SERVICE_MANAGED"
            break
        }

        # Amazon.CloudFormation.ProvisioningType
        "Get-CFNTypeList/ProvisioningType"
        {
            $v = "FULLY_MUTABLE","IMMUTABLE","NON_PROVISIONABLE"
            break
        }

        # Amazon.CloudFormation.RegistrationStatus
        "Get-CFNTypeRegistrationList/RegistrationStatusFilter"
        {
            $v = "COMPLETE","FAILED","IN_PROGRESS"
            break
        }

        # Amazon.CloudFormation.RegistryType
        {
            ($_ -eq "Get-CFNType/Type") -Or
            ($_ -eq "Get-CFNTypeList/Type") -Or
            ($_ -eq "Get-CFNTypeRegistrationList/Type") -Or
            ($_ -eq "Get-CFNTypeVersion/Type") -Or
            ($_ -eq "Register-CFNType/Type") -Or
            ($_ -eq "Set-CFNTypeDefaultVersion/Type") -Or
            ($_ -eq "Unregister-CFNType/Type")
        }
        {
            $v = "HOOK","MODULE","RESOURCE"
            break
        }

        # Amazon.CloudFormation.ResourceSignalStatus
        "Send-CFNResourceSignal/Status"
        {
            $v = "FAILURE","SUCCESS"
            break
        }

        # Amazon.CloudFormation.StackSetStatus
        "Get-CFNStackSetList/Status"
        {
            $v = "ACTIVE","DELETED"
            break
        }

        # Amazon.CloudFormation.StackStatus
        {
            ($_ -eq "Test-CFNStack/Status") -Or
            ($_ -eq "Wait-CFNStack/Status")
        }
        {
            $v = "CREATE_COMPLETE","CREATE_FAILED","CREATE_IN_PROGRESS","DELETE_COMPLETE","DELETE_FAILED","DELETE_IN_PROGRESS","IMPORT_COMPLETE","IMPORT_IN_PROGRESS","IMPORT_ROLLBACK_COMPLETE","IMPORT_ROLLBACK_FAILED","IMPORT_ROLLBACK_IN_PROGRESS","REVIEW_IN_PROGRESS","ROLLBACK_COMPLETE","ROLLBACK_FAILED","ROLLBACK_IN_PROGRESS","UPDATE_COMPLETE","UPDATE_COMPLETE_CLEANUP_IN_PROGRESS","UPDATE_FAILED","UPDATE_IN_PROGRESS","UPDATE_ROLLBACK_COMPLETE","UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS","UPDATE_ROLLBACK_FAILED","UPDATE_ROLLBACK_IN_PROGRESS"
            break
        }

        # Amazon.CloudFormation.TemplateFormat
        "Get-CFNGeneratedTemplate/Format"
        {
            $v = "JSON","YAML"
            break
        }

        # Amazon.CloudFormation.TemplateStage
        "Get-CFNTemplate/TemplateStage"
        {
            $v = "Original","Processed"
            break
        }

        # Amazon.CloudFormation.ThirdPartyType
        {
            ($_ -eq "Disable-CFNType/Type") -Or
            ($_ -eq "Enable-CFNType/Type") -Or
            ($_ -eq "Publish-CFNType/Type") -Or
            ($_ -eq "Set-CFNTypeConfiguration/Type") -Or
            ($_ -eq "Test-CFNType/Type")
        }
        {
            $v = "HOOK","MODULE","RESOURCE"
            break
        }

        # Amazon.CloudFormation.VersionBump
        "Enable-CFNType/VersionBump"
        {
            $v = "MAJOR","MINOR"
            break
        }

        # Amazon.CloudFormation.Visibility
        "Get-CFNTypeList/Visibility"
        {
            $v = "PRIVATE","PUBLIC"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CFN_map = @{
    "CallAs"=@("Get-CFNOrganizationsAccess","Get-CFNStackInstance","Get-CFNStackInstanceList","Get-CFNStackInstanceResourceDrift","Get-CFNStackSet","Get-CFNStackSetAutoDeploymentTarget","Get-CFNStackSetList","Get-CFNStackSetOperation","Get-CFNStackSetOperationList","Get-CFNStackSetOperationResultList","Get-CFNTemplateSummary","Import-CFNStacksToStackSet","New-CFNStackInstance","New-CFNStackSet","Remove-CFNStackInstance","Remove-CFNStackSet","Start-CFNStackSetDriftDetection","Stop-CFNStackSetOperation","Update-CFNStackInstance","Update-CFNStackSet")
    "ChangeSetType"=@("New-CFNChangeSet")
    "CurrentOperationStatus"=@("Write-CFNHandlerProgress")
    "DeletionMode"=@("Remove-CFNStack")
    "DeploymentTargets_AccountFilterType"=@("New-CFNStackInstance","Remove-CFNStackInstance","Update-CFNStackInstance","Update-CFNStackSet")
    "DeprecatedStatus"=@("Get-CFNTypeList","Get-CFNTypeVersion")
    "ErrorCode"=@("Write-CFNHandlerProgress")
    "Filters_Category"=@("Get-CFNTypeList")
    "Format"=@("Get-CFNGeneratedTemplate")
    "OnFailure"=@("New-CFNStack")
    "OnStackFailure"=@("New-CFNChangeSet")
    "OperationStatus"=@("Write-CFNHandlerProgress")
    "PermissionModel"=@("New-CFNStackSet","Update-CFNStackSet")
    "ProvisioningType"=@("Get-CFNTypeList")
    "RegistrationStatusFilter"=@("Get-CFNTypeRegistrationList")
    "Status"=@("Get-CFNStackSetList","Send-CFNResourceSignal","Test-CFNStack","Wait-CFNStack")
    "TemplateConfiguration_DeletionPolicy"=@("New-CFNGeneratedTemplate","Update-CFNGeneratedTemplate")
    "TemplateConfiguration_UpdateReplacePolicy"=@("New-CFNGeneratedTemplate","Update-CFNGeneratedTemplate")
    "TemplateStage"=@("Get-CFNTemplate")
    "Type"=@("Disable-CFNType","Enable-CFNType","Get-CFNType","Get-CFNTypeList","Get-CFNTypeRegistrationList","Get-CFNTypeVersion","Publish-CFNType","Register-CFNType","Set-CFNTypeConfiguration","Set-CFNTypeDefaultVersion","Test-CFNType","Unregister-CFNType")
    "VersionBump"=@("Enable-CFNType")
    "Visibility"=@("Get-CFNTypeList")
}

_awsArgumentCompleterRegistration $CFN_Completers $CFN_map

$CFN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CFN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CFN_SelectMap = @{
    "Select"=@("Enable-CFNOrganizationsAccess",
               "Enable-CFNType",
               "Get-CFNDescribeTypeConfiguration",
               "Stop-CFNUpdateStack",
               "Resume-CFNUpdateRollback",
               "New-CFNChangeSet",
               "New-CFNGeneratedTemplate",
               "New-CFNStack",
               "New-CFNStackInstance",
               "New-CFNStackSet",
               "Disable-CFNOrganizationsAccess",
               "Disable-CFNType",
               "Remove-CFNChangeSet",
               "Remove-CFNGeneratedTemplate",
               "Remove-CFNStack",
               "Remove-CFNStackInstance",
               "Remove-CFNStackSet",
               "Unregister-CFNType",
               "Get-CFNAccountLimit",
               "Get-CFNChangeSet",
               "Get-CFNChangeSetHook",
               "Get-CFNGeneratedTemplateInformation",
               "Get-CFNOrganizationsAccess",
               "Get-CFNPublisher",
               "Get-CFNResourceScan",
               "Get-CFNStackDriftDetectionStatus",
               "Get-CFNStackEvent",
               "Get-CFNStackInstance",
               "Get-CFNStackResource",
               "Get-CFNDetectedStackResourceDrift",
               "Get-CFNStackResourceList",
               "Get-CFNStack",
               "Get-CFNStackSet",
               "Get-CFNStackSetOperation",
               "Get-CFNType",
               "Get-CFNTypeRegistration",
               "Start-CFNStackDriftDetection",
               "Get-CFNStackResourceDrift",
               "Start-CFNStackSetDriftDetection",
               "Measure-CFNTemplateCost",
               "Start-CFNChangeSet",
               "Get-CFNGeneratedTemplate",
               "Get-CFNStackPolicy",
               "Get-CFNTemplate",
               "Get-CFNTemplateSummary",
               "Import-CFNStacksToStackSet",
               "Get-CFNChangeSetList",
               "Get-CFNExport",
               "Get-CFNGeneratedTemplateList",
               "Get-CFNImportList",
               "Get-CFNResourceScanRelatedResource",
               "Get-CFNResourceScanResource",
               "Get-CFNResourceScanList",
               "Get-CFNStackInstanceResourceDrift",
               "Get-CFNStackInstanceList",
               "Get-CFNStackResourceSummary",
               "Get-CFNStackSummary",
               "Get-CFNStackSetAutoDeploymentTarget",
               "Get-CFNStackSetOperationResultList",
               "Get-CFNStackSetOperationList",
               "Get-CFNStackSetList",
               "Get-CFNTypeRegistrationList",
               "Get-CFNTypeList",
               "Get-CFNTypeVersion",
               "Publish-CFNType",
               "Write-CFNHandlerProgress",
               "Register-CFNPublisher",
               "Register-CFNType",
               "Undo-CFNStack",
               "Set-CFNStackPolicy",
               "Set-CFNTypeConfiguration",
               "Set-CFNTypeDefaultVersion",
               "Send-CFNResourceSignal",
               "Start-CFNResourceScan",
               "Stop-CFNStackSetOperation",
               "Test-CFNType",
               "Update-CFNGeneratedTemplate",
               "Update-CFNStack",
               "Update-CFNStackInstance",
               "Update-CFNStackSet",
               "Update-CFNTerminationProtection",
               "Test-CFNTemplate",
               "Test-CFNStack",
               "Wait-CFNStack")
}

_awsArgumentCompleterRegistration $CFN_SelectCompleters $CFN_SelectMap
# Argument completions for service Amazon CloudFront


$CF_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudFront.CachePolicyCookieBehavior
        {
            ($_ -eq "New-CFCachePolicy/CookiesConfig_CookieBehavior") -Or
            ($_ -eq "Update-CFCachePolicy/CookiesConfig_CookieBehavior")
        }
        {
            $v = "all","allExcept","none","whitelist"
            break
        }

        # Amazon.CloudFront.CachePolicyHeaderBehavior
        {
            ($_ -eq "New-CFCachePolicy/HeadersConfig_HeaderBehavior") -Or
            ($_ -eq "Update-CFCachePolicy/HeadersConfig_HeaderBehavior")
        }
        {
            $v = "none","whitelist"
            break
        }

        # Amazon.CloudFront.CachePolicyQueryStringBehavior
        {
            ($_ -eq "New-CFCachePolicy/QueryStringsConfig_QueryStringBehavior") -Or
            ($_ -eq "Update-CFCachePolicy/QueryStringsConfig_QueryStringBehavior")
        }
        {
            $v = "all","allExcept","none","whitelist"
            break
        }

        # Amazon.CloudFront.CachePolicyType
        "Get-CFCachePolicyList/Type"
        {
            $v = "custom","managed"
            break
        }

        # Amazon.CloudFront.CertificateSource
        {
            ($_ -eq "New-CFDistribution/ViewerCertificate_CertificateSource") -Or
            ($_ -eq "New-CFDistributionWithTag/ViewerCertificate_CertificateSource") -Or
            ($_ -eq "Update-CFDistribution/ViewerCertificate_CertificateSource")
        }
        {
            $v = "acm","cloudfront","iam"
            break
        }

        # Amazon.CloudFront.ContinuousDeploymentPolicyType
        {
            ($_ -eq "New-CFContinuousDeploymentPolicy/TrafficConfig_Type") -Or
            ($_ -eq "Update-CFContinuousDeploymentPolicy/TrafficConfig_Type")
        }
        {
            $v = "SingleHeader","SingleWeight"
            break
        }

        # Amazon.CloudFront.FrameOptionsList
        {
            ($_ -eq "New-CFResponseHeadersPolicy/FrameOptions_FrameOption") -Or
            ($_ -eq "Update-CFResponseHeadersPolicy/FrameOptions_FrameOption")
        }
        {
            $v = "DENY","SAMEORIGIN"
            break
        }

        # Amazon.CloudFront.FunctionRuntime
        {
            ($_ -eq "New-CFFunction/FunctionConfig_Runtime") -Or
            ($_ -eq "Update-CFFunction/FunctionConfig_Runtime")
        }
        {
            $v = "cloudfront-js-1.0","cloudfront-js-2.0"
            break
        }

        # Amazon.CloudFront.FunctionStage
        {
            ($_ -eq "Get-CFFunction/Stage") -Or
            ($_ -eq "Get-CFFunctionList/Stage") -Or
            ($_ -eq "Get-CFFunctionSummary/Stage") -Or
            ($_ -eq "Test-CFFunction/Stage")
        }
        {
            $v = "DEVELOPMENT","LIVE"
            break
        }

        # Amazon.CloudFront.GeoRestrictionType
        {
            ($_ -eq "New-CFDistribution/GeoRestriction_RestrictionType") -Or
            ($_ -eq "New-CFDistributionWithTag/GeoRestriction_RestrictionType") -Or
            ($_ -eq "Update-CFDistribution/GeoRestriction_RestrictionType")
        }
        {
            $v = "blacklist","none","whitelist"
            break
        }

        # Amazon.CloudFront.HttpVersion
        {
            ($_ -eq "New-CFDistribution/DistributionConfig_HttpVersion") -Or
            ($_ -eq "New-CFDistributionWithTag/DistributionConfig_HttpVersion") -Or
            ($_ -eq "Update-CFDistribution/DistributionConfig_HttpVersion")
        }
        {
            $v = "http1.1","http2","http2and3","http3"
            break
        }

        # Amazon.CloudFront.ImportSourceType
        "New-CFKeyValueStore/ImportSource_SourceType"
        {
            $v = "S3"
            break
        }

        # Amazon.CloudFront.ItemSelection
        {
            ($_ -eq "New-CFDistribution/Cookies_Forward") -Or
            ($_ -eq "New-CFDistributionWithTag/Cookies_Forward") -Or
            ($_ -eq "Update-CFDistribution/Cookies_Forward")
        }
        {
            $v = "all","none","whitelist"
            break
        }

        # Amazon.CloudFront.MinimumProtocolVersion
        {
            ($_ -eq "New-CFDistribution/ViewerCertificate_MinimumProtocolVersion") -Or
            ($_ -eq "New-CFDistributionWithTag/ViewerCertificate_MinimumProtocolVersion") -Or
            ($_ -eq "Update-CFDistribution/ViewerCertificate_MinimumProtocolVersion")
        }
        {
            $v = "SSLv3","TLSv1","TLSv1.1_2016","TLSv1.2_2018","TLSv1.2_2019","TLSv1.2_2021","TLSv1_2016"
            break
        }

        # Amazon.CloudFront.OriginAccessControlOriginTypes
        {
            ($_ -eq "New-CFOriginAccessControl/OriginAccessControlConfig_OriginAccessControlOriginType") -Or
            ($_ -eq "Update-CFOriginAccessControl/OriginAccessControlConfig_OriginAccessControlOriginType")
        }
        {
            $v = "lambda","mediapackagev2","mediastore","s3"
            break
        }

        # Amazon.CloudFront.OriginAccessControlSigningBehaviors
        {
            ($_ -eq "New-CFOriginAccessControl/OriginAccessControlConfig_SigningBehavior") -Or
            ($_ -eq "Update-CFOriginAccessControl/OriginAccessControlConfig_SigningBehavior")
        }
        {
            $v = "always","never","no-override"
            break
        }

        # Amazon.CloudFront.OriginAccessControlSigningProtocols
        {
            ($_ -eq "New-CFOriginAccessControl/OriginAccessControlConfig_SigningProtocol") -Or
            ($_ -eq "Update-CFOriginAccessControl/OriginAccessControlConfig_SigningProtocol")
        }
        {
            $v = "sigv4"
            break
        }

        # Amazon.CloudFront.OriginRequestPolicyCookieBehavior
        {
            ($_ -eq "New-CFOriginRequestPolicy/CookiesConfig_CookieBehavior") -Or
            ($_ -eq "Update-CFOriginRequestPolicy/CookiesConfig_CookieBehavior")
        }
        {
            $v = "all","allExcept","none","whitelist"
            break
        }

        # Amazon.CloudFront.OriginRequestPolicyHeaderBehavior
        {
            ($_ -eq "New-CFOriginRequestPolicy/HeadersConfig_HeaderBehavior") -Or
            ($_ -eq "Update-CFOriginRequestPolicy/HeadersConfig_HeaderBehavior")
        }
        {
            $v = "allExcept","allViewer","allViewerAndWhitelistCloudFront","none","whitelist"
            break
        }

        # Amazon.CloudFront.OriginRequestPolicyQueryStringBehavior
        {
            ($_ -eq "New-CFOriginRequestPolicy/QueryStringsConfig_QueryStringBehavior") -Or
            ($_ -eq "Update-CFOriginRequestPolicy/QueryStringsConfig_QueryStringBehavior")
        }
        {
            $v = "all","allExcept","none","whitelist"
            break
        }

        # Amazon.CloudFront.OriginRequestPolicyType
        "Get-CFOriginRequestPolicyList/Type"
        {
            $v = "custom","managed"
            break
        }

        # Amazon.CloudFront.PriceClass
        {
            ($_ -eq "New-CFDistribution/DistributionConfig_PriceClass") -Or
            ($_ -eq "New-CFDistributionWithTag/DistributionConfig_PriceClass") -Or
            ($_ -eq "Update-CFDistribution/DistributionConfig_PriceClass") -Or
            ($_ -eq "New-CFStreamingDistribution/StreamingDistributionConfig_PriceClass") -Or
            ($_ -eq "New-CFStreamingDistributionWithTag/StreamingDistributionConfig_PriceClass") -Or
            ($_ -eq "Update-CFStreamingDistribution/StreamingDistributionConfig_PriceClass")
        }
        {
            $v = "PriceClass_100","PriceClass_200","PriceClass_All"
            break
        }

        # Amazon.CloudFront.RealtimeMetricsSubscriptionStatus
        "New-CFMonitoringSubscription/RealtimeMetricsSubscriptionConfig_RealtimeMetricsSubscriptionStatus"
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.CloudFront.ReferrerPolicyList
        {
            ($_ -eq "New-CFResponseHeadersPolicy/ReferrerPolicy_ReferrerPolicy") -Or
            ($_ -eq "Update-CFResponseHeadersPolicy/ReferrerPolicy_ReferrerPolicy")
        }
        {
            $v = "no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"
            break
        }

        # Amazon.CloudFront.ResponseHeadersPolicyType
        "Get-CFResponseHeadersPolicyList/Type"
        {
            $v = "custom","managed"
            break
        }

        # Amazon.CloudFront.SSLSupportMethod
        {
            ($_ -eq "New-CFDistribution/ViewerCertificate_SSLSupportMethod") -Or
            ($_ -eq "New-CFDistributionWithTag/ViewerCertificate_SSLSupportMethod") -Or
            ($_ -eq "Update-CFDistribution/ViewerCertificate_SSLSupportMethod")
        }
        {
            $v = "sni-only","static-ip","vip"
            break
        }

        # Amazon.CloudFront.ViewerProtocolPolicy
        {
            ($_ -eq "New-CFDistribution/DefaultCacheBehavior_ViewerProtocolPolicy") -Or
            ($_ -eq "New-CFDistributionWithTag/DefaultCacheBehavior_ViewerProtocolPolicy") -Or
            ($_ -eq "Update-CFDistribution/DefaultCacheBehavior_ViewerProtocolPolicy")
        }
        {
            $v = "allow-all","https-only","redirect-to-https"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CF_map = @{
    "Cookies_Forward"=@("New-CFDistribution","New-CFDistributionWithTag","Update-CFDistribution")
    "CookiesConfig_CookieBehavior"=@("New-CFCachePolicy","New-CFOriginRequestPolicy","Update-CFCachePolicy","Update-CFOriginRequestPolicy")
    "DefaultCacheBehavior_ViewerProtocolPolicy"=@("New-CFDistribution","New-CFDistributionWithTag","Update-CFDistribution")
    "DistributionConfig_HttpVersion"=@("New-CFDistribution","New-CFDistributionWithTag","Update-CFDistribution")
    "DistributionConfig_PriceClass"=@("New-CFDistribution","New-CFDistributionWithTag","Update-CFDistribution")
    "FrameOptions_FrameOption"=@("New-CFResponseHeadersPolicy","Update-CFResponseHeadersPolicy")
    "FunctionConfig_Runtime"=@("New-CFFunction","Update-CFFunction")
    "GeoRestriction_RestrictionType"=@("New-CFDistribution","New-CFDistributionWithTag","Update-CFDistribution")
    "HeadersConfig_HeaderBehavior"=@("New-CFCachePolicy","New-CFOriginRequestPolicy","Update-CFCachePolicy","Update-CFOriginRequestPolicy")
    "ImportSource_SourceType"=@("New-CFKeyValueStore")
    "OriginAccessControlConfig_OriginAccessControlOriginType"=@("New-CFOriginAccessControl","Update-CFOriginAccessControl")
    "OriginAccessControlConfig_SigningBehavior"=@("New-CFOriginAccessControl","Update-CFOriginAccessControl")
    "OriginAccessControlConfig_SigningProtocol"=@("New-CFOriginAccessControl","Update-CFOriginAccessControl")
    "QueryStringsConfig_QueryStringBehavior"=@("New-CFCachePolicy","New-CFOriginRequestPolicy","Update-CFCachePolicy","Update-CFOriginRequestPolicy")
    "RealtimeMetricsSubscriptionConfig_RealtimeMetricsSubscriptionStatus"=@("New-CFMonitoringSubscription")
    "ReferrerPolicy_ReferrerPolicy"=@("New-CFResponseHeadersPolicy","Update-CFResponseHeadersPolicy")
    "Stage"=@("Get-CFFunction","Get-CFFunctionList","Get-CFFunctionSummary","Test-CFFunction")
    "StreamingDistributionConfig_PriceClass"=@("New-CFStreamingDistribution","New-CFStreamingDistributionWithTag","Update-CFStreamingDistribution")
    "TrafficConfig_Type"=@("New-CFContinuousDeploymentPolicy","Update-CFContinuousDeploymentPolicy")
    "Type"=@("Get-CFCachePolicyList","Get-CFOriginRequestPolicyList","Get-CFResponseHeadersPolicyList")
    "ViewerCertificate_CertificateSource"=@("New-CFDistribution","New-CFDistributionWithTag","Update-CFDistribution")
    "ViewerCertificate_MinimumProtocolVersion"=@("New-CFDistribution","New-CFDistributionWithTag","Update-CFDistribution")
    "ViewerCertificate_SSLSupportMethod"=@("New-CFDistribution","New-CFDistributionWithTag","Update-CFDistribution")
}

_awsArgumentCompleterRegistration $CF_Completers $CF_map

$CF_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CF.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CF_SelectMap = @{
    "Select"=@("Move-CFAlias",
               "Copy-CFDistribution",
               "New-CFCachePolicy",
               "New-CFCloudFrontOriginAccessIdentity",
               "New-CFContinuousDeploymentPolicy",
               "New-CFDistribution",
               "New-CFDistributionWithTag",
               "New-CFFieldLevelEncryptionConfig",
               "New-CFFieldLevelEncryptionProfile",
               "New-CFFunction",
               "New-CFInvalidation",
               "New-CFKeyGroup",
               "New-CFKeyValueStore",
               "New-CFMonitoringSubscription",
               "New-CFOriginAccessControl",
               "New-CFOriginRequestPolicy",
               "New-CFPublicKey",
               "New-CFRealtimeLogConfig",
               "New-CFResponseHeadersPolicy",
               "New-CFStreamingDistribution",
               "New-CFStreamingDistributionWithTag",
               "Remove-CFCachePolicy",
               "Remove-CFCloudFrontOriginAccessIdentity",
               "Remove-CFContinuousDeploymentPolicy",
               "Remove-CFDistribution",
               "Remove-CFFieldLevelEncryptionConfig",
               "Remove-CFFieldLevelEncryptionProfile",
               "Remove-CFFunction",
               "Remove-CFKeyGroup",
               "Remove-CFKeyValueStore",
               "Remove-CFMonitoringSubscription",
               "Remove-CFOriginAccessControl",
               "Remove-CFOriginRequestPolicy",
               "Remove-CFPublicKey",
               "Remove-CFRealtimeLogConfig",
               "Remove-CFResponseHeadersPolicy",
               "Remove-CFStreamingDistribution",
               "Get-CFFunctionSummary",
               "Get-CFKeyValueStore",
               "Get-CFCachePolicy",
               "Get-CFCachePolicyConfig",
               "Get-CFCloudFrontOriginAccessIdentity",
               "Get-CFCloudFrontOriginAccessIdentityConfig",
               "Get-CFContinuousDeploymentPolicy",
               "Get-CFContinuousDeploymentPolicyConfig",
               "Get-CFDistribution",
               "Get-CFDistributionConfig",
               "Get-CFFieldLevelEncryption",
               "Get-CFFieldLevelEncryptionConfig",
               "Get-CFFieldLevelEncryptionProfile",
               "Get-CFFieldLevelEncryptionProfileConfig",
               "Get-CFFunction",
               "Get-CFInvalidation",
               "Get-CFKeyGroup",
               "Get-CFKeyGroupConfig",
               "Get-CFMonitoringSubscription",
               "Get-CFOriginAccessControl",
               "Get-CFOriginAccessControlConfig",
               "Get-CFOriginRequestPolicy",
               "Get-CFOriginRequestPolicyConfig",
               "Get-CFPublicKey",
               "Get-CFPublicKeyConfig",
               "Get-CFRealtimeLogConfig",
               "Get-CFResponseHeadersPolicy",
               "Get-CFResponseHeadersPolicyConfig",
               "Get-CFStreamingDistribution",
               "Get-CFStreamingDistributionConfig",
               "Get-CFCachePolicyList",
               "Get-CFCloudFrontOriginAccessIdentityList",
               "Get-CFConflictingAlias",
               "Get-CFContinuousDeploymentPolicyList",
               "Get-CFDistributionList",
               "Get-CFDistributionsByCachePolicyId",
               "Get-CFDistributionsByKeyGroup",
               "Get-CFDistributionsByOriginRequestPolicyId",
               "Get-CFDistributionsByRealtimeLogConfig",
               "Get-CFDistributionsByResponseHeadersPolicyId",
               "Get-CFDistributionListByWebACLId",
               "Get-CFFieldLevelEncryptionConfigList",
               "Get-CFFieldLevelEncryptionProfileList",
               "Get-CFFunctionList",
               "Get-CFInvalidationList",
               "Get-CFKeyGroupList",
               "Get-CFKeyValueStoreListItem",
               "Get-CFOriginAccessControlList",
               "Get-CFOriginRequestPolicyList",
               "Get-CFPublicKeyList",
               "Get-CFRealtimeLogConfigList",
               "Get-CFResponseHeadersPolicyList",
               "Get-CFStreamingDistributionList",
               "Get-CFResourceTag",
               "Publish-CFFunction",
               "Add-CFResourceTag",
               "Test-CFFunction",
               "Remove-CFResourceTag",
               "Update-CFCachePolicy",
               "Update-CFCloudFrontOriginAccessIdentity",
               "Update-CFContinuousDeploymentPolicy",
               "Update-CFDistribution",
               "Update-CFDistributionWithStagingConfig",
               "Update-CFFieldLevelEncryptionConfig",
               "Update-CFFieldLevelEncryptionProfile",
               "Update-CFFunction",
               "Update-CFKeyGroup",
               "Update-CFKeyValueStore",
               "Update-CFOriginAccessControl",
               "Update-CFOriginRequestPolicy",
               "Update-CFPublicKey",
               "Update-CFRealtimeLogConfig",
               "Update-CFResponseHeadersPolicy",
               "Update-CFStreamingDistribution",
               "New-CFSignedCookie",
               "New-CFSignedUrl")
}

_awsArgumentCompleterRegistration $CF_SelectCompleters $CF_SelectMap
# Argument completions for service Amazon CloudFront KeyValueStore


$CFKV_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CFKV.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CFKV_SelectMap = @{
    "Select"=@("Remove-CFKVKey",
               "Get-CFKVKeyValueStore",
               "Get-CFKVKey",
               "Get-CFKVKeyList",
               "Write-CFKVKey",
               "Update-CFKVKey")
}

_awsArgumentCompleterRegistration $CFKV_SelectCompleters $CFKV_SelectMap
# Argument completions for service AWS CloudHSM


$HSM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudHSM.ClientVersion
        "Get-HSMConfig/ClientVersion"
        {
            $v = "5.1","5.3"
            break
        }

        # Amazon.CloudHSM.SubscriptionType
        "New-HSMItem/SubscriptionType"
        {
            $v = "PRODUCTION"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$HSM_map = @{
    "ClientVersion"=@("Get-HSMConfig")
    "SubscriptionType"=@("New-HSMItem")
}

_awsArgumentCompleterRegistration $HSM_Completers $HSM_map

$HSM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.HSM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$HSM_SelectMap = @{
    "Select"=@("Set-HSMResourceTag",
               "New-HSMPartitionGroup",
               "New-HSMItem",
               "New-HSMLunaClient",
               "Remove-HSMPartitionGroup",
               "Remove-HSMItem",
               "Remove-HSMLunaClient",
               "Get-HSMPartitionGroup",
               "Get-HSMItem",
               "Get-HSMLunaClient",
               "Get-HSMConfig",
               "Get-HSMAvailableZone",
               "Get-HSMPartitionGroupList",
               "Get-HSMItemList",
               "Get-HSMLunaClientList",
               "Get-HSMResourceTag",
               "Edit-HSMPartitionGroup",
               "Edit-HSMItem",
               "Edit-HSMLunaClient",
               "Remove-HSMResourceTag")
}

_awsArgumentCompleterRegistration $HSM_SelectCompleters $HSM_SelectMap
# Argument completions for service AWS CloudHSM V2


$HSM2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudHSMV2.BackupRetentionType
        {
            ($_ -eq "Edit-HSM2Cluster/BackupRetentionPolicy_Type") -Or
            ($_ -eq "New-HSM2Cluster/BackupRetentionPolicy_Type")
        }
        {
            $v = "DAYS"
            break
        }

        # Amazon.CloudHSMV2.ClusterMode
        "New-HSM2Cluster/Mode"
        {
            $v = "FIPS","NON_FIPS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$HSM2_map = @{
    "BackupRetentionPolicy_Type"=@("Edit-HSM2Cluster","New-HSM2Cluster")
    "Mode"=@("New-HSM2Cluster")
}

_awsArgumentCompleterRegistration $HSM2_Completers $HSM2_map

$HSM2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.HSM2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$HSM2_SelectMap = @{
    "Select"=@("Copy-HSM2BackupToRegion",
               "New-HSM2Cluster",
               "New-HSM2Hsm",
               "Remove-HSM2Backup",
               "Remove-HSM2Cluster",
               "Remove-HSM2Hsm",
               "Remove-HSM2ResourcePolicy",
               "Get-HSM2Backup",
               "Get-HSM2Cluster",
               "Get-HSM2ResourcePolicy",
               "Initialize-HSM2Cluster",
               "Get-HSM2ResourceTag",
               "Edit-HSM2BackupAttribute",
               "Edit-HSM2Cluster",
               "Write-HSM2ResourcePolicy",
               "Restore-HSM2Backup",
               "Add-HSM2ResourceTag",
               "Remove-HSM2ResourceTag")
}

_awsArgumentCompleterRegistration $HSM2_SelectCompleters $HSM2_SelectMap
# Argument completions for service Amazon CloudSearch


$CS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudSearch.AlgorithmicStemming
        "Set-CSAnalysisScheme/AnalysisOptions_AlgorithmicStemming"
        {
            $v = "full","light","minimal","none"
            break
        }

        # Amazon.CloudSearch.AnalysisSchemeLanguage
        "Set-CSAnalysisScheme/AnalysisScheme_AnalysisSchemeLanguage"
        {
            $v = "ar","bg","ca","cs","da","de","el","en","es","eu","fa","fi","fr","ga","gl","he","hi","hu","hy","id","it","ja","ko","lv","mul","nl","no","pt","ro","ru","sv","th","tr","zh-Hans","zh-Hant"
            break
        }

        # Amazon.CloudSearch.IndexFieldType
        "Set-CSIndexField/IndexField_IndexFieldType"
        {
            $v = "date","date-array","double","double-array","int","int-array","latlon","literal","literal-array","text","text-array"
            break
        }

        # Amazon.CloudSearch.PartitionInstanceType
        "Update-CSScalingParameter/ScalingParameters_DesiredInstanceType"
        {
            $v = "search.2xlarge","search.large","search.m1.large","search.m1.small","search.m2.2xlarge","search.m2.xlarge","search.m3.2xlarge","search.m3.large","search.m3.medium","search.m3.xlarge","search.medium","search.previousgeneration.2xlarge","search.previousgeneration.large","search.previousgeneration.small","search.previousgeneration.xlarge","search.small","search.xlarge"
            break
        }

        # Amazon.CloudSearch.SuggesterFuzzyMatching
        "Set-CSSuggester/DocumentSuggesterOptions_FuzzyMatching"
        {
            $v = "high","low","none"
            break
        }

        # Amazon.CloudSearch.TLSSecurityPolicy
        "Update-CSDomainEndpointOption/DomainEndpointOptions_TLSSecurityPolicy"
        {
            $v = "Policy-Min-TLS-1-0-2019-07","Policy-Min-TLS-1-2-2019-07"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CS_map = @{
    "AnalysisOptions_AlgorithmicStemming"=@("Set-CSAnalysisScheme")
    "AnalysisScheme_AnalysisSchemeLanguage"=@("Set-CSAnalysisScheme")
    "DocumentSuggesterOptions_FuzzyMatching"=@("Set-CSSuggester")
    "DomainEndpointOptions_TLSSecurityPolicy"=@("Update-CSDomainEndpointOption")
    "IndexField_IndexFieldType"=@("Set-CSIndexField")
    "ScalingParameters_DesiredInstanceType"=@("Update-CSScalingParameter")
}

_awsArgumentCompleterRegistration $CS_Completers $CS_map

$CS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CS_SelectMap = @{
    "Select"=@("Start-CSSuggestersBuild",
               "New-CSDomain",
               "Set-CSAnalysisScheme",
               "Set-CSExpression",
               "Set-CSIndexField",
               "Set-CSSuggester",
               "Remove-CSAnalysisScheme",
               "Remove-CSDomain",
               "Remove-CSExpression",
               "Remove-CSIndexField",
               "Remove-CSSuggester",
               "Get-CSAnalysisScheme",
               "Get-CSAvailabilityOption",
               "Get-CSDomainEndpointOption",
               "Get-CSDomain",
               "Get-CSExpression",
               "Get-CSIndexField",
               "Get-CSScalingParameter",
               "Get-CSServiceAccessPolicy",
               "Get-CSSuggester",
               "Start-CSIndex",
               "Get-CSDomainNameList",
               "Update-CSAvailabilityOption",
               "Update-CSDomainEndpointOption",
               "Update-CSScalingParameter",
               "Update-CSServiceAccessPolicy")
}

_awsArgumentCompleterRegistration $CS_SelectCompleters $CS_SelectMap
# Argument completions for service Amazon CloudSearch Domain


$CSD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudSearchDomain.ContentType
        "Write-CSDDocument/ContentType"
        {
            $v = "application/json","application/xml"
            break
        }

        # Amazon.CloudSearchDomain.QueryParser
        "Search-CSDDocument/QueryParser"
        {
            $v = "dismax","lucene","simple","structured"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CSD_map = @{
    "ContentType"=@("Write-CSDDocument")
    "QueryParser"=@("Search-CSDDocument")
}

_awsArgumentCompleterRegistration $CSD_Completers $CSD_map

$CSD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CSD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CSD_SelectMap = @{
    "Select"=@("Get-CSDSuggestion",
               "Search-CSDDocument",
               "Write-CSDDocument")
}

_awsArgumentCompleterRegistration $CSD_SelectCompleters $CSD_SelectMap
# Argument completions for service AWS CloudTrail


$CT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudTrail.BillingMode
        {
            ($_ -eq "New-CTEventDataStore/BillingMode") -Or
            ($_ -eq "Update-CTEventDataStore/BillingMode")
        }
        {
            $v = "EXTENDABLE_RETENTION_PRICING","FIXED_RETENTION_PRICING"
            break
        }

        # Amazon.CloudTrail.EventCategory
        "Find-CTEvent/EventCategory"
        {
            $v = "insight"
            break
        }

        # Amazon.CloudTrail.ImportStatus
        "Get-CTImportList/ImportStatus"
        {
            $v = "COMPLETED","FAILED","INITIALIZING","IN_PROGRESS","STOPPED"
            break
        }

        # Amazon.CloudTrail.InsightsMetricDataType
        "Get-CTInsightsMetricData/DataType"
        {
            $v = "FillWithZeros","NonZeroData"
            break
        }

        # Amazon.CloudTrail.InsightType
        "Get-CTInsightsMetricData/InsightType"
        {
            $v = "ApiCallRateInsight","ApiErrorRateInsight"
            break
        }

        # Amazon.CloudTrail.QueryStatus
        "Get-CTQuerySummary/QueryStatus"
        {
            $v = "CANCELLED","FAILED","FINISHED","QUEUED","RUNNING","TIMED_OUT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CT_map = @{
    "BillingMode"=@("New-CTEventDataStore","Update-CTEventDataStore")
    "DataType"=@("Get-CTInsightsMetricData")
    "EventCategory"=@("Find-CTEvent")
    "ImportStatus"=@("Get-CTImportList")
    "InsightType"=@("Get-CTInsightsMetricData")
    "QueryStatus"=@("Get-CTQuerySummary")
}

_awsArgumentCompleterRegistration $CT_Completers $CT_map

$CT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CT_SelectMap = @{
    "Select"=@("Add-CTResourceTag",
               "Stop-CTQuery",
               "New-CTChannel",
               "New-CTEventDataStore",
               "New-CTTrail",
               "Remove-CTChannel",
               "Remove-CTEventDataStore",
               "Remove-CTResourcePolicy",
               "Remove-CTTrail",
               "Unregister-CTOrganizationDelegatedAdmin",
               "Get-CTQuery",
               "Get-CTTrail",
               "Disable-CTFederation",
               "Enable-CTFederation",
               "Get-CTChannel",
               "Get-CTEventDataStore",
               "Get-CTEventSelector",
               "Get-CTImport",
               "Get-CTInsightSelector",
               "Get-CTQueryResult",
               "Get-CTResourcePolicy",
               "Get-CTTrailByName",
               "Get-CTTrailStatus",
               "Get-CTChannelSummary",
               "Get-CTEventDataStoreSummary",
               "Get-CTImportFailure",
               "Get-CTImportList",
               "Get-CTInsightsMetricData",
               "Get-CTPublicKey",
               "Get-CTQuerySummary",
               "Get-CTResourceTag",
               "Get-CTTrailSummary",
               "Find-CTEvent",
               "Write-CTEventSelector",
               "Write-CTInsightSelector",
               "Write-CTResourcePolicy",
               "Register-CTOrganizationDelegatedAdmin",
               "Remove-CTResourceTag",
               "Restore-CTEventDataStore",
               "Start-CTEventDataStoreIngestion",
               "Start-CTImport",
               "Start-CTLogging",
               "Start-CTQuery",
               "Stop-CTEventDataStoreIngestion",
               "Stop-CTImport",
               "Stop-CTLogging",
               "Update-CTChannel",
               "Update-CTEventDataStore",
               "Update-CTTrail")
}

_awsArgumentCompleterRegistration $CT_SelectCompleters $CT_SelectMap
# Argument completions for service AWS CloudTrail Data Service


$CTD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CTD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CTD_SelectMap = @{
    "Select"=@("Write-CTDAuditEvent")
}

_awsArgumentCompleterRegistration $CTD_SelectCompleters $CTD_SelectMap
# Argument completions for service AWS CodeArtifact


$CA_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeArtifact.AllowPublish
        {
            ($_ -eq "Get-CAPackageList/Publish") -Or
            ($_ -eq "Write-CAPackageOriginConfiguration/Restrictions_Publish")
        }
        {
            $v = "ALLOW","BLOCK"
            break
        }

        # Amazon.CodeArtifact.AllowUpstream
        {
            ($_ -eq "Write-CAPackageOriginConfiguration/Restrictions_Upstream") -Or
            ($_ -eq "Get-CAPackageList/Upstream")
        }
        {
            $v = "ALLOW","BLOCK"
            break
        }

        # Amazon.CodeArtifact.EndpointType
        "Get-CARepositoryEndpoint/EndpointType"
        {
            $v = "dualstack","ipv4"
            break
        }

        # Amazon.CodeArtifact.PackageFormat
        {
            ($_ -eq "Copy-CAPackageVersion/Format") -Or
            ($_ -eq "Get-CAAssociatedPackageGroup/Format") -Or
            ($_ -eq "Get-CAPackage/Format") -Or
            ($_ -eq "Get-CAPackageList/Format") -Or
            ($_ -eq "Get-CAPackageVersion/Format") -Or
            ($_ -eq "Get-CAPackageVersionAsset/Format") -Or
            ($_ -eq "Get-CAPackageVersionAssetList/Format") -Or
            ($_ -eq "Get-CAPackageVersionDependencyList/Format") -Or
            ($_ -eq "Get-CAPackageVersionList/Format") -Or
            ($_ -eq "Get-CAPackageVersionReadme/Format") -Or
            ($_ -eq "Get-CARepositoryEndpoint/Format") -Or
            ($_ -eq "Publish-CAPackageVersion/Format") -Or
            ($_ -eq "Remove-CAPackage/Format") -Or
            ($_ -eq "Remove-CAPackageVersion/Format") -Or
            ($_ -eq "Unpublish-CAPackageVersion/Format") -Or
            ($_ -eq "Update-CAPackageVersionsStatus/Format") -Or
            ($_ -eq "Write-CAPackageOriginConfiguration/Format")
        }
        {
            $v = "cargo","generic","maven","npm","nuget","pypi","ruby","swift"
            break
        }

        # Amazon.CodeArtifact.PackageGroupOriginRestrictionType
        "Get-CAAllowedRepositoriesForGroupList/OriginRestrictionType"
        {
            $v = "EXTERNAL_UPSTREAM","INTERNAL_UPSTREAM","PUBLISH"
            break
        }

        # Amazon.CodeArtifact.PackageVersionOriginType
        "Get-CAPackageVersionList/OriginType"
        {
            $v = "EXTERNAL","INTERNAL","UNKNOWN"
            break
        }

        # Amazon.CodeArtifact.PackageVersionSortType
        "Get-CAPackageVersionList/SortBy"
        {
            $v = "PUBLISHED_TIME"
            break
        }

        # Amazon.CodeArtifact.PackageVersionStatus
        {
            ($_ -eq "Remove-CAPackageVersion/ExpectedStatus") -Or
            ($_ -eq "Unpublish-CAPackageVersion/ExpectedStatus") -Or
            ($_ -eq "Update-CAPackageVersionsStatus/ExpectedStatus") -Or
            ($_ -eq "Get-CAPackageVersionList/Status") -Or
            ($_ -eq "Update-CAPackageVersionsStatus/TargetStatus")
        }
        {
            $v = "Archived","Deleted","Disposed","Published","Unfinished","Unlisted"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CA_map = @{
    "EndpointType"=@("Get-CARepositoryEndpoint")
    "ExpectedStatus"=@("Remove-CAPackageVersion","Unpublish-CAPackageVersion","Update-CAPackageVersionsStatus")
    "Format"=@("Copy-CAPackageVersion","Get-CAAssociatedPackageGroup","Get-CAPackage","Get-CAPackageList","Get-CAPackageVersion","Get-CAPackageVersionAsset","Get-CAPackageVersionAssetList","Get-CAPackageVersionDependencyList","Get-CAPackageVersionList","Get-CAPackageVersionReadme","Get-CARepositoryEndpoint","Publish-CAPackageVersion","Remove-CAPackage","Remove-CAPackageVersion","Unpublish-CAPackageVersion","Update-CAPackageVersionsStatus","Write-CAPackageOriginConfiguration")
    "OriginRestrictionType"=@("Get-CAAllowedRepositoriesForGroupList")
    "OriginType"=@("Get-CAPackageVersionList")
    "Publish"=@("Get-CAPackageList")
    "Restrictions_Publish"=@("Write-CAPackageOriginConfiguration")
    "Restrictions_Upstream"=@("Write-CAPackageOriginConfiguration")
    "SortBy"=@("Get-CAPackageVersionList")
    "Status"=@("Get-CAPackageVersionList")
    "TargetStatus"=@("Update-CAPackageVersionsStatus")
    "Upstream"=@("Get-CAPackageList")
}

_awsArgumentCompleterRegistration $CA_Completers $CA_map

$CA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CA_SelectMap = @{
    "Select"=@("Connect-CAExternalConnection",
               "Copy-CAPackageVersion",
               "New-CADomain",
               "New-CAPackageGroup",
               "New-CARepository",
               "Remove-CADomain",
               "Remove-CADomainPermissionsPolicy",
               "Remove-CAPackage",
               "Remove-CAPackageGroup",
               "Remove-CAPackageVersion",
               "Remove-CARepository",
               "Remove-CARepositoryPermissionsPolicy",
               "Get-CADomain",
               "Get-CAPackage",
               "Get-CAPackageGroup",
               "Get-CAPackageVersion",
               "Get-CARepository",
               "Disconnect-CAExternalConnection",
               "Unpublish-CAPackageVersion",
               "Get-CAAssociatedPackageGroup",
               "Get-CAAuthorizationToken",
               "Get-CADomainPermissionsPolicy",
               "Get-CAPackageVersionAsset",
               "Get-CAPackageVersionReadme",
               "Get-CARepositoryEndpoint",
               "Get-CARepositoryPermissionsPolicy",
               "Get-CAAllowedRepositoriesForGroupList",
               "Get-CAAssociatedPackageList",
               "Get-CADomainList",
               "Get-CAPackageGroupList",
               "Get-CAPackageList",
               "Get-CAPackageVersionAssetList",
               "Get-CAPackageVersionDependencyList",
               "Get-CAPackageVersionList",
               "Get-CARepositoryList",
               "Get-CARepositoriesInDomainList",
               "Get-CASubPackageGroupList",
               "Get-CAResourceTag",
               "Publish-CAPackageVersion",
               "Write-CADomainPermissionsPolicy",
               "Write-CAPackageOriginConfiguration",
               "Write-CARepositoryPermissionsPolicy",
               "Add-CAResourceTag",
               "Remove-CAResourceTag",
               "Update-CAPackageGroup",
               "Update-CAPackageGroupOriginConfiguration",
               "Update-CAPackageVersionsStatus",
               "Update-CARepository")
}

_awsArgumentCompleterRegistration $CA_SelectCompleters $CA_SelectMap
# Argument completions for service AWS CodeBuild


$CB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeBuild.ArtifactNamespace
        {
            ($_ -eq "New-CBProject/Artifacts_NamespaceType") -Or
            ($_ -eq "Update-CBProject/Artifacts_NamespaceType") -Or
            ($_ -eq "Start-CBBatch/ArtifactsOverride_NamespaceType") -Or
            ($_ -eq "Start-CBBuild/ArtifactsOverride_NamespaceType")
        }
        {
            $v = "BUILD_ID","NONE"
            break
        }

        # Amazon.CodeBuild.ArtifactPackaging
        {
            ($_ -eq "New-CBProject/Artifacts_Packaging") -Or
            ($_ -eq "Update-CBProject/Artifacts_Packaging") -Or
            ($_ -eq "Start-CBBatch/ArtifactsOverride_Packaging") -Or
            ($_ -eq "Start-CBBuild/ArtifactsOverride_Packaging")
        }
        {
            $v = "NONE","ZIP"
            break
        }

        # Amazon.CodeBuild.ArtifactsType
        {
            ($_ -eq "New-CBProject/Artifacts_Type") -Or
            ($_ -eq "Update-CBProject/Artifacts_Type") -Or
            ($_ -eq "Start-CBBatch/ArtifactsOverride_Type") -Or
            ($_ -eq "Start-CBBuild/ArtifactsOverride_Type")
        }
        {
            $v = "CODEPIPELINE","NO_ARTIFACTS","S3"
            break
        }

        # Amazon.CodeBuild.AuthType
        "Import-CBSourceCredential/AuthType"
        {
            $v = "BASIC_AUTH","CODECONNECTIONS","OAUTH","PERSONAL_ACCESS_TOKEN","SECRETS_MANAGER"
            break
        }

        # Amazon.CodeBuild.BatchReportModeType
        {
            ($_ -eq "New-CBProject/BuildBatchConfig_BatchReportMode") -Or
            ($_ -eq "Update-CBProject/BuildBatchConfig_BatchReportMode") -Or
            ($_ -eq "Start-CBBatch/BuildBatchConfigOverride_BatchReportMode")
        }
        {
            $v = "REPORT_AGGREGATED_BATCH","REPORT_INDIVIDUAL_BUILDS"
            break
        }

        # Amazon.CodeBuild.BucketOwnerAccess
        {
            ($_ -eq "New-CBProject/Artifacts_BucketOwnerAccess") -Or
            ($_ -eq "Update-CBProject/Artifacts_BucketOwnerAccess") -Or
            ($_ -eq "Start-CBBatch/ArtifactsOverride_BucketOwnerAccess") -Or
            ($_ -eq "Start-CBBuild/ArtifactsOverride_BucketOwnerAccess") -Or
            ($_ -eq "New-CBProject/S3Logs_BucketOwnerAccess") -Or
            ($_ -eq "Start-CBBatch/S3Logs_BucketOwnerAccess") -Or
            ($_ -eq "Start-CBBuild/S3Logs_BucketOwnerAccess") -Or
            ($_ -eq "Update-CBProject/S3Logs_BucketOwnerAccess")
        }
        {
            $v = "FULL","NONE","READ_ONLY"
            break
        }

        # Amazon.CodeBuild.CacheType
        {
            ($_ -eq "New-CBProject/Cache_Type") -Or
            ($_ -eq "Update-CBProject/Cache_Type") -Or
            ($_ -eq "Start-CBBatch/CacheOverride_Type") -Or
            ($_ -eq "Start-CBBuild/CacheOverride_Type")
        }
        {
            $v = "LOCAL","NO_CACHE","S3"
            break
        }

        # Amazon.CodeBuild.ComputeType
        {
            ($_ -eq "New-CBFleet/ComputeType") -Or
            ($_ -eq "Update-CBFleet/ComputeType") -Or
            ($_ -eq "Start-CBBatch/ComputeTypeOverride") -Or
            ($_ -eq "Start-CBBuild/ComputeTypeOverride") -Or
            ($_ -eq "New-CBProject/Environment_ComputeType") -Or
            ($_ -eq "Update-CBProject/Environment_ComputeType")
        }
        {
            $v = "BUILD_GENERAL1_2XLARGE","BUILD_GENERAL1_LARGE","BUILD_GENERAL1_MEDIUM","BUILD_GENERAL1_SMALL","BUILD_GENERAL1_XLARGE","BUILD_LAMBDA_10GB","BUILD_LAMBDA_1GB","BUILD_LAMBDA_2GB","BUILD_LAMBDA_4GB","BUILD_LAMBDA_8GB"
            break
        }

        # Amazon.CodeBuild.CredentialProviderType
        {
            ($_ -eq "New-CBProject/RegistryCredential_CredentialProvider") -Or
            ($_ -eq "Update-CBProject/RegistryCredential_CredentialProvider") -Or
            ($_ -eq "Start-CBBatch/RegistryCredentialOverride_CredentialProvider") -Or
            ($_ -eq "Start-CBBuild/RegistryCredentialOverride_CredentialProvider")
        }
        {
            $v = "SECRETS_MANAGER"
            break
        }

        # Amazon.CodeBuild.EnvironmentType
        {
            ($_ -eq "New-CBProject/Environment_Type") -Or
            ($_ -eq "Update-CBProject/Environment_Type") -Or
            ($_ -eq "New-CBFleet/EnvironmentType") -Or
            ($_ -eq "Update-CBFleet/EnvironmentType") -Or
            ($_ -eq "Start-CBBatch/EnvironmentTypeOverride") -Or
            ($_ -eq "Start-CBBuild/EnvironmentTypeOverride")
        }
        {
            $v = "ARM_CONTAINER","ARM_LAMBDA_CONTAINER","LINUX_CONTAINER","LINUX_GPU_CONTAINER","LINUX_LAMBDA_CONTAINER","MAC_ARM","WINDOWS_CONTAINER","WINDOWS_SERVER_2019_CONTAINER"
            break
        }

        # Amazon.CodeBuild.FleetOverflowBehavior
        {
            ($_ -eq "New-CBFleet/OverflowBehavior") -Or
            ($_ -eq "Update-CBFleet/OverflowBehavior")
        }
        {
            $v = "ON_DEMAND","QUEUE"
            break
        }

        # Amazon.CodeBuild.FleetProxyRuleBehavior
        {
            ($_ -eq "New-CBFleet/ProxyConfiguration_DefaultBehavior") -Or
            ($_ -eq "Update-CBFleet/ProxyConfiguration_DefaultBehavior")
        }
        {
            $v = "ALLOW_ALL","DENY_ALL"
            break
        }

        # Amazon.CodeBuild.FleetScalingType
        {
            ($_ -eq "New-CBFleet/ScalingConfiguration_ScalingType") -Or
            ($_ -eq "Update-CBFleet/ScalingConfiguration_ScalingType")
        }
        {
            $v = "TARGET_TRACKING_SCALING"
            break
        }

        # Amazon.CodeBuild.FleetSortByType
        "Get-CBFleetList/SortBy"
        {
            $v = "CREATED_TIME","LAST_MODIFIED_TIME","NAME"
            break
        }

        # Amazon.CodeBuild.ImagePullCredentialsType
        {
            ($_ -eq "New-CBProject/Environment_ImagePullCredentialsType") -Or
            ($_ -eq "Update-CBProject/Environment_ImagePullCredentialsType") -Or
            ($_ -eq "Start-CBBatch/ImagePullCredentialsTypeOverride") -Or
            ($_ -eq "Start-CBBuild/ImagePullCredentialsTypeOverride")
        }
        {
            $v = "CODEBUILD","SERVICE_ROLE"
            break
        }

        # Amazon.CodeBuild.LogsConfigStatusType
        {
            ($_ -eq "New-CBProject/CloudWatchLogs_Status") -Or
            ($_ -eq "Start-CBBatch/CloudWatchLogs_Status") -Or
            ($_ -eq "Start-CBBuild/CloudWatchLogs_Status") -Or
            ($_ -eq "Update-CBProject/CloudWatchLogs_Status") -Or
            ($_ -eq "New-CBProject/S3Logs_Status") -Or
            ($_ -eq "Start-CBBatch/S3Logs_Status") -Or
            ($_ -eq "Start-CBBuild/S3Logs_Status") -Or
            ($_ -eq "Update-CBProject/S3Logs_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.CodeBuild.ProjectSortByType
        "Get-CBProjectList/SortBy"
        {
            $v = "CREATED_TIME","LAST_MODIFIED_TIME","NAME"
            break
        }

        # Amazon.CodeBuild.ProjectVisibilityType
        "Update-CBProjectVisibility/ProjectVisibility"
        {
            $v = "PRIVATE","PUBLIC_READ"
            break
        }

        # Amazon.CodeBuild.ReportCodeCoverageSortByType
        "Get-CBCodeCoverage/SortBy"
        {
            $v = "FILE_PATH","LINE_COVERAGE_PERCENTAGE"
            break
        }

        # Amazon.CodeBuild.ReportExportConfigType
        {
            ($_ -eq "New-CBReportGroup/ExportConfig_ExportConfigType") -Or
            ($_ -eq "Update-CBReportGroup/ExportConfig_ExportConfigType")
        }
        {
            $v = "NO_EXPORT","S3"
            break
        }

        # Amazon.CodeBuild.ReportGroupSortByType
        "Get-CBReportGroupList/SortBy"
        {
            $v = "CREATED_TIME","LAST_MODIFIED_TIME","NAME"
            break
        }

        # Amazon.CodeBuild.ReportGroupTrendFieldType
        "Get-CBReportGroupTrend/TrendField"
        {
            $v = "BRANCHES_COVERED","BRANCHES_MISSED","BRANCH_COVERAGE","DURATION","LINES_COVERED","LINES_MISSED","LINE_COVERAGE","PASS_RATE","TOTAL"
            break
        }

        # Amazon.CodeBuild.ReportPackagingType
        {
            ($_ -eq "New-CBReportGroup/S3Destination_Packaging") -Or
            ($_ -eq "Update-CBReportGroup/S3Destination_Packaging")
        }
        {
            $v = "NONE","ZIP"
            break
        }

        # Amazon.CodeBuild.ReportStatusType
        {
            ($_ -eq "Get-CBReportList/Filter_Status") -Or
            ($_ -eq "Get-CBReportsForReportGroupList/Filter_Status")
        }
        {
            $v = "DELETING","FAILED","GENERATING","INCOMPLETE","SUCCEEDED"
            break
        }

        # Amazon.CodeBuild.ReportType
        "New-CBReportGroup/Type"
        {
            $v = "CODE_COVERAGE","TEST"
            break
        }

        # Amazon.CodeBuild.RetryBuildBatchType
        "Redo-CBBatch/RetryType"
        {
            $v = "RETRY_ALL_BUILDS","RETRY_FAILED_BUILDS"
            break
        }

        # Amazon.CodeBuild.ServerType
        "Import-CBSourceCredential/ServerType"
        {
            $v = "BITBUCKET","GITHUB","GITHUB_ENTERPRISE","GITLAB","GITLAB_SELF_MANAGED"
            break
        }

        # Amazon.CodeBuild.SharedResourceSortByType
        {
            ($_ -eq "Get-CBSharedProjectList/SortBy") -Or
            ($_ -eq "Get-CBSharedReportGroupList/SortBy")
        }
        {
            $v = "ARN","MODIFIED_TIME"
            break
        }

        # Amazon.CodeBuild.SortOrderType
        {
            ($_ -eq "Get-CBBatchIdList/SortOrder") -Or
            ($_ -eq "Get-CBBatchIdListForProject/SortOrder") -Or
            ($_ -eq "Get-CBBuildIdList/SortOrder") -Or
            ($_ -eq "Get-CBBuildIdListForProject/SortOrder") -Or
            ($_ -eq "Get-CBCodeCoverage/SortOrder") -Or
            ($_ -eq "Get-CBFleetList/SortOrder") -Or
            ($_ -eq "Get-CBProjectList/SortOrder") -Or
            ($_ -eq "Get-CBReportGroupList/SortOrder") -Or
            ($_ -eq "Get-CBReportList/SortOrder") -Or
            ($_ -eq "Get-CBReportsForReportGroupList/SortOrder") -Or
            ($_ -eq "Get-CBSharedProjectList/SortOrder") -Or
            ($_ -eq "Get-CBSharedReportGroupList/SortOrder")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.CodeBuild.SourceAuthType
        {
            ($_ -eq "New-CBProject/Auth_Type") -Or
            ($_ -eq "Update-CBProject/Auth_Type") -Or
            ($_ -eq "Start-CBBatch/SourceAuthOverride_Type") -Or
            ($_ -eq "Start-CBBuild/SourceAuthOverride_Type")
        }
        {
            $v = "CODECONNECTIONS","OAUTH","SECRETS_MANAGER"
            break
        }

        # Amazon.CodeBuild.SourceType
        {
            ($_ -eq "New-CBProject/Source_Type") -Or
            ($_ -eq "Update-CBProject/Source_Type") -Or
            ($_ -eq "Start-CBBatch/SourceTypeOverride") -Or
            ($_ -eq "Start-CBBuild/SourceTypeOverride")
        }
        {
            $v = "BITBUCKET","CODECOMMIT","CODEPIPELINE","GITHUB","GITHUB_ENTERPRISE","GITLAB","GITLAB_SELF_MANAGED","NO_SOURCE","S3"
            break
        }

        # Amazon.CodeBuild.StatusType
        {
            ($_ -eq "Get-CBBatchIdList/Filter_Status") -Or
            ($_ -eq "Get-CBBatchIdListForProject/Filter_Status")
        }
        {
            $v = "FAILED","FAULT","IN_PROGRESS","STOPPED","SUCCEEDED","TIMED_OUT"
            break
        }

        # Amazon.CodeBuild.WebhookBuildType
        {
            ($_ -eq "New-CBWebhook/BuildType") -Or
            ($_ -eq "Update-CBWebhook/BuildType")
        }
        {
            $v = "BUILD","BUILD_BATCH"
            break
        }

        # Amazon.CodeBuild.WebhookScopeType
        "New-CBWebhook/ScopeConfiguration_Scope"
        {
            $v = "GITHUB_GLOBAL","GITHUB_ORGANIZATION","GITLAB_GROUP"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CB_map = @{
    "Artifacts_BucketOwnerAccess"=@("New-CBProject","Update-CBProject")
    "Artifacts_NamespaceType"=@("New-CBProject","Update-CBProject")
    "Artifacts_Packaging"=@("New-CBProject","Update-CBProject")
    "Artifacts_Type"=@("New-CBProject","Update-CBProject")
    "ArtifactsOverride_BucketOwnerAccess"=@("Start-CBBatch","Start-CBBuild")
    "ArtifactsOverride_NamespaceType"=@("Start-CBBatch","Start-CBBuild")
    "ArtifactsOverride_Packaging"=@("Start-CBBatch","Start-CBBuild")
    "ArtifactsOverride_Type"=@("Start-CBBatch","Start-CBBuild")
    "Auth_Type"=@("New-CBProject","Update-CBProject")
    "AuthType"=@("Import-CBSourceCredential")
    "BuildBatchConfig_BatchReportMode"=@("New-CBProject","Update-CBProject")
    "BuildBatchConfigOverride_BatchReportMode"=@("Start-CBBatch")
    "BuildType"=@("New-CBWebhook","Update-CBWebhook")
    "Cache_Type"=@("New-CBProject","Update-CBProject")
    "CacheOverride_Type"=@("Start-CBBatch","Start-CBBuild")
    "CloudWatchLogs_Status"=@("New-CBProject","Start-CBBatch","Start-CBBuild","Update-CBProject")
    "ComputeType"=@("New-CBFleet","Update-CBFleet")
    "ComputeTypeOverride"=@("Start-CBBatch","Start-CBBuild")
    "Environment_ComputeType"=@("New-CBProject","Update-CBProject")
    "Environment_ImagePullCredentialsType"=@("New-CBProject","Update-CBProject")
    "Environment_Type"=@("New-CBProject","Update-CBProject")
    "EnvironmentType"=@("New-CBFleet","Update-CBFleet")
    "EnvironmentTypeOverride"=@("Start-CBBatch","Start-CBBuild")
    "ExportConfig_ExportConfigType"=@("New-CBReportGroup","Update-CBReportGroup")
    "Filter_Status"=@("Get-CBBatchIdList","Get-CBBatchIdListForProject","Get-CBReportList","Get-CBReportsForReportGroupList")
    "ImagePullCredentialsTypeOverride"=@("Start-CBBatch","Start-CBBuild")
    "OverflowBehavior"=@("New-CBFleet","Update-CBFleet")
    "ProjectVisibility"=@("Update-CBProjectVisibility")
    "ProxyConfiguration_DefaultBehavior"=@("New-CBFleet","Update-CBFleet")
    "RegistryCredential_CredentialProvider"=@("New-CBProject","Update-CBProject")
    "RegistryCredentialOverride_CredentialProvider"=@("Start-CBBatch","Start-CBBuild")
    "RetryType"=@("Redo-CBBatch")
    "S3Destination_Packaging"=@("New-CBReportGroup","Update-CBReportGroup")
    "S3Logs_BucketOwnerAccess"=@("New-CBProject","Start-CBBatch","Start-CBBuild","Update-CBProject")
    "S3Logs_Status"=@("New-CBProject","Start-CBBatch","Start-CBBuild","Update-CBProject")
    "ScalingConfiguration_ScalingType"=@("New-CBFleet","Update-CBFleet")
    "ScopeConfiguration_Scope"=@("New-CBWebhook")
    "ServerType"=@("Import-CBSourceCredential")
    "SortBy"=@("Get-CBCodeCoverage","Get-CBFleetList","Get-CBProjectList","Get-CBReportGroupList","Get-CBSharedProjectList","Get-CBSharedReportGroupList")
    "SortOrder"=@("Get-CBBatchIdList","Get-CBBatchIdListForProject","Get-CBBuildIdList","Get-CBBuildIdListForProject","Get-CBCodeCoverage","Get-CBFleetList","Get-CBProjectList","Get-CBReportGroupList","Get-CBReportList","Get-CBReportsForReportGroupList","Get-CBSharedProjectList","Get-CBSharedReportGroupList")
    "Source_Type"=@("New-CBProject","Update-CBProject")
    "SourceAuthOverride_Type"=@("Start-CBBatch","Start-CBBuild")
    "SourceTypeOverride"=@("Start-CBBatch","Start-CBBuild")
    "TrendField"=@("Get-CBReportGroupTrend")
    "Type"=@("New-CBReportGroup")
}

_awsArgumentCompleterRegistration $CB_Completers $CB_map

$CB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CB_SelectMap = @{
    "Select"=@("Remove-CBBuildBatch",
               "Get-CBBatch",
               "Get-CBBuildBatch",
               "Get-CBCBFleetBatch",
               "Get-CBProjectBatch",
               "Get-CBReportGroupBatch",
               "Get-CBReportBatch",
               "New-CBFleet",
               "New-CBProject",
               "New-CBReportGroup",
               "New-CBWebhook",
               "Remove-CBBatch",
               "Remove-CBFleet",
               "Remove-CBProject",
               "Remove-CBReport",
               "Remove-CBReportGroup",
               "Remove-CBResourcePolicy",
               "Remove-CBSourceCredential",
               "Remove-CBWebhook",
               "Get-CBCodeCoverage",
               "Get-CBTestCase",
               "Get-CBReportGroupTrend",
               "Get-CBResourcePolicy",
               "Import-CBSourceCredential",
               "Reset-CBProjectCache",
               "Get-CBBatchIdList",
               "Get-CBBatchIdListForProject",
               "Get-CBBuildIdList",
               "Get-CBBuildIdListForProject",
               "Get-CBCuratedEnvironmentImageList",
               "Get-CBFleetList",
               "Get-CBProjectList",
               "Get-CBReportGroupList",
               "Get-CBReportList",
               "Get-CBReportsForReportGroupList",
               "Get-CBSharedProjectList",
               "Get-CBSharedReportGroupList",
               "Get-CBSourceCredentialList",
               "Write-CBResourcePolicy",
               "Redo-CBBuild",
               "Redo-CBBatch",
               "Start-CBBuild",
               "Start-CBBatch",
               "Stop-CBBuild",
               "Stop-CBBatch",
               "Update-CBFleet",
               "Update-CBProject",
               "Update-CBProjectVisibility",
               "Update-CBReportGroup",
               "Update-CBWebhook")
}

_awsArgumentCompleterRegistration $CB_SelectCompleters $CB_SelectMap
# Argument completions for service AWS CodeCatalyst


$CCAT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeCatalyst.DevEnvironmentSessionType
        "Start-CCATDevEnvironmentSession/SessionConfiguration_SessionType"
        {
            $v = "SSH","SSM"
            break
        }

        # Amazon.CodeCatalyst.InstanceType
        {
            ($_ -eq "New-CCATDevEnvironment/InstanceType") -Or
            ($_ -eq "Start-CCATDevEnvironment/InstanceType") -Or
            ($_ -eq "Update-CCATDevEnvironment/InstanceType")
        }
        {
            $v = "dev.standard1.large","dev.standard1.medium","dev.standard1.small","dev.standard1.xlarge"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CCAT_map = @{
    "InstanceType"=@("New-CCATDevEnvironment","Start-CCATDevEnvironment","Update-CCATDevEnvironment")
    "SessionConfiguration_SessionType"=@("Start-CCATDevEnvironmentSession")
}

_awsArgumentCompleterRegistration $CCAT_Completers $CCAT_map

$CCAT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CCAT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CCAT_SelectMap = @{
    "Select"=@("New-CCATAccessToken",
               "New-CCATDevEnvironment",
               "New-CCATProject",
               "New-CCATSourceRepository",
               "New-CCATSourceRepositoryBranch",
               "Remove-CCATAccessToken",
               "Remove-CCATDevEnvironment",
               "Remove-CCATProject",
               "Remove-CCATSourceRepository",
               "Remove-CCATSpace",
               "Get-CCATDevEnvironment",
               "Get-CCATProject",
               "Get-CCATSourceRepository",
               "Get-CCATSourceRepositoryCloneUrl",
               "Get-CCATSpace",
               "Get-CCATSubscription",
               "Get-CCATUserDetail",
               "Get-CCATWorkflow",
               "Get-CCATWorkflowRun",
               "Get-CCATAccessTokenList",
               "Get-CCATDevEnvironmentList",
               "Get-CCATDevEnvironmentSessionList",
               "Get-CCATEventLogList",
               "Get-CCATProjectList",
               "Get-CCATSourceRepositoryList",
               "Get-CCATSourceRepositoryBranchList",
               "Get-CCATSpaceList",
               "Get-CCATWorkflowRunList",
               "Get-CCATWorkflowList",
               "Start-CCATDevEnvironment",
               "Start-CCATDevEnvironmentSession",
               "Start-CCATWorkflowRun",
               "Stop-CCATDevEnvironment",
               "Stop-CCATDevEnvironmentSession",
               "Update-CCATDevEnvironment",
               "Update-CCATProject",
               "Update-CCATSpace",
               "Confirm-CCATSession")
}

_awsArgumentCompleterRegistration $CCAT_SelectCompleters $CCAT_SelectMap
# Argument completions for service AWS CodeCommit


$CC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeCommit.ApprovalState
        "Update-CCPullRequestApprovalState/ApprovalState"
        {
            $v = "APPROVE","REVOKE"
            break
        }

        # Amazon.CodeCommit.ConflictDetailLevelTypeEnum
        {
            ($_ -eq "Get-CCFileMergeConflict/ConflictDetailLevel") -Or
            ($_ -eq "Get-CCFileMergeConflictBatch/ConflictDetailLevel") -Or
            ($_ -eq "Get-CCMergeCommit/ConflictDetailLevel") -Or
            ($_ -eq "Get-CCMergeConflict/ConflictDetailLevel") -Or
            ($_ -eq "Get-CCMergeOption/ConflictDetailLevel") -Or
            ($_ -eq "Merge-CCBranchesBySquash/ConflictDetailLevel") -Or
            ($_ -eq "Merge-CCBranchesByThreeWay/ConflictDetailLevel") -Or
            ($_ -eq "Merge-CCPullRequestBySquash/ConflictDetailLevel") -Or
            ($_ -eq "Merge-CCPullRequestByThreeWay/ConflictDetailLevel") -Or
            ($_ -eq "New-CCUnreferencedMergeCommit/ConflictDetailLevel")
        }
        {
            $v = "FILE_LEVEL","LINE_LEVEL"
            break
        }

        # Amazon.CodeCommit.ConflictResolutionStrategyTypeEnum
        {
            ($_ -eq "Get-CCFileMergeConflict/ConflictResolutionStrategy") -Or
            ($_ -eq "Get-CCFileMergeConflictBatch/ConflictResolutionStrategy") -Or
            ($_ -eq "Get-CCMergeCommit/ConflictResolutionStrategy") -Or
            ($_ -eq "Get-CCMergeConflict/ConflictResolutionStrategy") -Or
            ($_ -eq "Get-CCMergeOption/ConflictResolutionStrategy") -Or
            ($_ -eq "Merge-CCBranchesBySquash/ConflictResolutionStrategy") -Or
            ($_ -eq "Merge-CCBranchesByThreeWay/ConflictResolutionStrategy") -Or
            ($_ -eq "Merge-CCPullRequestBySquash/ConflictResolutionStrategy") -Or
            ($_ -eq "Merge-CCPullRequestByThreeWay/ConflictResolutionStrategy") -Or
            ($_ -eq "New-CCUnreferencedMergeCommit/ConflictResolutionStrategy")
        }
        {
            $v = "ACCEPT_DESTINATION","ACCEPT_SOURCE","AUTOMERGE","NONE"
            break
        }

        # Amazon.CodeCommit.FileModeTypeEnum
        "Write-CCFile/FileMode"
        {
            $v = "EXECUTABLE","NORMAL","SYMLINK"
            break
        }

        # Amazon.CodeCommit.MergeOptionTypeEnum
        {
            ($_ -eq "Get-CCFileMergeConflict/MergeOption") -Or
            ($_ -eq "Get-CCFileMergeConflictBatch/MergeOption") -Or
            ($_ -eq "Get-CCMergeConflict/MergeOption") -Or
            ($_ -eq "New-CCUnreferencedMergeCommit/MergeOption")
        }
        {
            $v = "FAST_FORWARD_MERGE","SQUASH_MERGE","THREE_WAY_MERGE"
            break
        }

        # Amazon.CodeCommit.OrderEnum
        "Get-CCRepositoryList/Order"
        {
            $v = "ascending","descending"
            break
        }

        # Amazon.CodeCommit.OverrideStatus
        "Skip-CCPullRequestApprovalRule/OverrideStatus"
        {
            $v = "OVERRIDE","REVOKE"
            break
        }

        # Amazon.CodeCommit.PullRequestEventType
        "Get-CCPullRequestEvent/PullRequestEventType"
        {
            $v = "PULL_REQUEST_APPROVAL_RULE_CREATED","PULL_REQUEST_APPROVAL_RULE_DELETED","PULL_REQUEST_APPROVAL_RULE_OVERRIDDEN","PULL_REQUEST_APPROVAL_RULE_UPDATED","PULL_REQUEST_APPROVAL_STATE_CHANGED","PULL_REQUEST_CREATED","PULL_REQUEST_MERGE_STATE_CHANGED","PULL_REQUEST_SOURCE_REFERENCE_UPDATED","PULL_REQUEST_STATUS_CHANGED"
            break
        }

        # Amazon.CodeCommit.PullRequestStatusEnum
        {
            ($_ -eq "Get-CCPullRequestList/PullRequestStatus") -Or
            ($_ -eq "Update-CCPullRequestStatus/PullRequestStatus")
        }
        {
            $v = "CLOSED","OPEN"
            break
        }

        # Amazon.CodeCommit.RelativeFileVersionEnum
        {
            ($_ -eq "Send-CCCommentForComparedCommit/Location_RelativeFileVersion") -Or
            ($_ -eq "Send-CCCommentForPullRequest/Location_RelativeFileVersion")
        }
        {
            $v = "AFTER","BEFORE"
            break
        }

        # Amazon.CodeCommit.SortByEnum
        "Get-CCRepositoryList/SortBy"
        {
            $v = "lastModifiedDate","repositoryName"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CC_map = @{
    "ApprovalState"=@("Update-CCPullRequestApprovalState")
    "ConflictDetailLevel"=@("Get-CCFileMergeConflict","Get-CCFileMergeConflictBatch","Get-CCMergeCommit","Get-CCMergeConflict","Get-CCMergeOption","Merge-CCBranchesBySquash","Merge-CCBranchesByThreeWay","Merge-CCPullRequestBySquash","Merge-CCPullRequestByThreeWay","New-CCUnreferencedMergeCommit")
    "ConflictResolutionStrategy"=@("Get-CCFileMergeConflict","Get-CCFileMergeConflictBatch","Get-CCMergeCommit","Get-CCMergeConflict","Get-CCMergeOption","Merge-CCBranchesBySquash","Merge-CCBranchesByThreeWay","Merge-CCPullRequestBySquash","Merge-CCPullRequestByThreeWay","New-CCUnreferencedMergeCommit")
    "FileMode"=@("Write-CCFile")
    "Location_RelativeFileVersion"=@("Send-CCCommentForComparedCommit","Send-CCCommentForPullRequest")
    "MergeOption"=@("Get-CCFileMergeConflict","Get-CCFileMergeConflictBatch","Get-CCMergeConflict","New-CCUnreferencedMergeCommit")
    "Order"=@("Get-CCRepositoryList")
    "OverrideStatus"=@("Skip-CCPullRequestApprovalRule")
    "PullRequestEventType"=@("Get-CCPullRequestEvent")
    "PullRequestStatus"=@("Get-CCPullRequestList","Update-CCPullRequestStatus")
    "SortBy"=@("Get-CCRepositoryList")
}

_awsArgumentCompleterRegistration $CC_Completers $CC_map

$CC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CC_SelectMap = @{
    "Select"=@("Add-CCApprovalRuleTemplateToRepository",
               "Add-CCApprovalRuleTemplateToRepositoryBatch",
               "Get-CCFileMergeConflictBatch",
               "Remove-CCApprovalRuleTemplateFromRepositoryBatch",
               "Get-CCCommitBatch",
               "Get-CCRepositoryBatch",
               "New-CCApprovalRuleTemplate",
               "New-CCBranch",
               "New-CCCommit",
               "New-CCPullRequest",
               "New-CCPullRequestApprovalRule",
               "New-CCRepository",
               "New-CCUnreferencedMergeCommit",
               "Remove-CCApprovalRuleTemplate",
               "Remove-CCBranch",
               "Remove-CCCommentContent",
               "Remove-CCFile",
               "Remove-CCPullRequestApprovalRule",
               "Remove-CCRepository",
               "Get-CCFileMergeConflict",
               "Get-CCPullRequestEvent",
               "Remove-CCApprovalRuleTemplateFromRepository",
               "Invoke-CCPullRequestApprovalRule",
               "Get-CCApprovalRuleTemplate",
               "Get-CCBlob",
               "Get-CCBranch",
               "Get-CCComment",
               "Get-CCCommentReaction",
               "Get-CCCommentsForComparedCommit",
               "Get-CCCommentsForPullRequest",
               "Get-CCCommit",
               "Get-CCDifferenceList",
               "Get-CCFile",
               "Get-CCFolder",
               "Get-CCMergeCommit",
               "Get-CCMergeConflict",
               "Get-CCMergeOption",
               "Get-CCPullRequest",
               "Get-CCPullRequestApprovalState",
               "Get-CCPullRequestOverrideState",
               "Get-CCRepository",
               "Get-CCRepositoryTrigger",
               "Get-CCApprovalRuleTemplateList",
               "Get-CCAssociatedApprovalRuleTemplatesForRepositoryList",
               "Get-CCBranchList",
               "Get-CCFileCommitHistoryList",
               "Get-CCPullRequestList",
               "Get-CCRepositoryList",
               "Get-CCRepositoriesForApprovalRuleTemplateList",
               "Get-CCResourceTag",
               "Merge-CCBranchesByFastForward",
               "Merge-CCBranchesBySquash",
               "Merge-CCBranchesByThreeWay",
               "Merge-CCPullRequestByFastForward",
               "Merge-CCPullRequestBySquash",
               "Merge-CCPullRequestByThreeWay",
               "Skip-CCPullRequestApprovalRule",
               "Send-CCCommentForComparedCommit",
               "Send-CCCommentForPullRequest",
               "Send-CCCommentReply",
               "Write-CCCommentReaction",
               "Write-CCFile",
               "Set-CCRepositoryTrigger",
               "Add-CCResourceTag",
               "Test-CCRepositoryTrigger",
               "Remove-CCResourceTag",
               "Update-CCApprovalRuleTemplateContent",
               "Update-CCApprovalRuleTemplateDescription",
               "Update-CCApprovalRuleTemplateName",
               "Update-CCComment",
               "Update-CCDefaultBranch",
               "Update-CCPullRequestApprovalRuleContent",
               "Update-CCPullRequestApprovalState",
               "Update-CCPullRequestDescription",
               "Update-CCPullRequestStatus",
               "Update-CCPullRequestTitle",
               "Update-CCRepositoryDescription",
               "Update-CCRepositoryEncryptionKey",
               "Update-CCRepositoryName")
}

_awsArgumentCompleterRegistration $CC_SelectCompleters $CC_SelectMap
# Argument completions for service AWS CodeConnections


$CCON_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeConnections.ProviderType
        {
            ($_ -eq "New-CCONConnection/ProviderType") -Or
            ($_ -eq "New-CCONHost/ProviderType") -Or
            ($_ -eq "Get-CCONConnectionList/ProviderTypeFilter")
        }
        {
            $v = "Bitbucket","GitHub","GitHubEnterpriseServer","GitLab","GitLabSelfManaged"
            break
        }

        # Amazon.CodeConnections.PublishDeploymentStatus
        {
            ($_ -eq "New-CCONSyncConfiguration/PublishDeploymentStatus") -Or
            ($_ -eq "Update-CCONSyncConfiguration/PublishDeploymentStatus")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.CodeConnections.PullRequestComment
        {
            ($_ -eq "New-CCONSyncConfiguration/PullRequestComment") -Or
            ($_ -eq "Update-CCONSyncConfiguration/PullRequestComment")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.CodeConnections.SyncConfigurationType
        {
            ($_ -eq "Get-CCONRepositorySyncDefinitionList/SyncType") -Or
            ($_ -eq "Get-CCONRepositorySyncStatus/SyncType") -Or
            ($_ -eq "Get-CCONResourceSyncStatus/SyncType") -Or
            ($_ -eq "Get-CCONSyncBlockerSummary/SyncType") -Or
            ($_ -eq "Get-CCONSyncConfiguration/SyncType") -Or
            ($_ -eq "Get-CCONSyncConfigurationList/SyncType") -Or
            ($_ -eq "New-CCONSyncConfiguration/SyncType") -Or
            ($_ -eq "Remove-CCONSyncConfiguration/SyncType") -Or
            ($_ -eq "Update-CCONSyncBlocker/SyncType") -Or
            ($_ -eq "Update-CCONSyncConfiguration/SyncType")
        }
        {
            $v = "CFN_STACK_SYNC"
            break
        }

        # Amazon.CodeConnections.TriggerResourceUpdateOn
        {
            ($_ -eq "New-CCONSyncConfiguration/TriggerResourceUpdateOn") -Or
            ($_ -eq "Update-CCONSyncConfiguration/TriggerResourceUpdateOn")
        }
        {
            $v = "ANY_CHANGE","FILE_CHANGE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CCON_map = @{
    "ProviderType"=@("New-CCONConnection","New-CCONHost")
    "ProviderTypeFilter"=@("Get-CCONConnectionList")
    "PublishDeploymentStatus"=@("New-CCONSyncConfiguration","Update-CCONSyncConfiguration")
    "PullRequestComment"=@("New-CCONSyncConfiguration","Update-CCONSyncConfiguration")
    "SyncType"=@("Get-CCONRepositorySyncDefinitionList","Get-CCONRepositorySyncStatus","Get-CCONResourceSyncStatus","Get-CCONSyncBlockerSummary","Get-CCONSyncConfiguration","Get-CCONSyncConfigurationList","New-CCONSyncConfiguration","Remove-CCONSyncConfiguration","Update-CCONSyncBlocker","Update-CCONSyncConfiguration")
    "TriggerResourceUpdateOn"=@("New-CCONSyncConfiguration","Update-CCONSyncConfiguration")
}

_awsArgumentCompleterRegistration $CCON_Completers $CCON_map

$CCON_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CCON.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CCON_SelectMap = @{
    "Select"=@("New-CCONConnection",
               "New-CCONHost",
               "New-CCONRepositoryLink",
               "New-CCONSyncConfiguration",
               "Remove-CCONConnection",
               "Remove-CCONHost",
               "Remove-CCONRepositoryLink",
               "Remove-CCONSyncConfiguration",
               "Get-CCONConnection",
               "Get-CCONHost",
               "Get-CCONRepositoryLink",
               "Get-CCONRepositorySyncStatus",
               "Get-CCONResourceSyncStatus",
               "Get-CCONSyncBlockerSummary",
               "Get-CCONSyncConfiguration",
               "Get-CCONConnectionList",
               "Get-CCONHostList",
               "Get-CCONRepositoryLinkList",
               "Get-CCONRepositorySyncDefinitionList",
               "Get-CCONSyncConfigurationList",
               "Get-CCONResourceTag",
               "Add-CCONResourceTag",
               "Remove-CCONResourceTag",
               "Update-CCONHost",
               "Update-CCONRepositoryLink",
               "Update-CCONSyncBlocker",
               "Update-CCONSyncConfiguration")
}

_awsArgumentCompleterRegistration $CCON_SelectCompleters $CCON_SelectMap
# Argument completions for service AWS CodeDeploy


$CD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeDeploy.ApplicationRevisionSortBy
        "Get-CDApplicationRevisionList/SortBy"
        {
            $v = "firstUsedTime","lastUsedTime","registerTime"
            break
        }

        # Amazon.CodeDeploy.BundleType
        {
            ($_ -eq "Get-CDApplicationRevision/S3Location_BundleType") -Or
            ($_ -eq "New-CDDeployment/S3Location_BundleType") -Or
            ($_ -eq "Register-CDApplicationRevision/S3Location_BundleType")
        }
        {
            $v = "JSON","tar","tgz","YAML","zip"
            break
        }

        # Amazon.CodeDeploy.ComputePlatform
        {
            ($_ -eq "New-CDApplication/ComputePlatform") -Or
            ($_ -eq "New-CDDeploymentConfig/ComputePlatform")
        }
        {
            $v = "ECS","Lambda","Server"
            break
        }

        # Amazon.CodeDeploy.DeploymentOption
        {
            ($_ -eq "New-CDDeploymentGroup/DeploymentStyleOption") -Or
            ($_ -eq "Update-CDDeploymentGroup/DeploymentStyleOption")
        }
        {
            $v = "WITHOUT_TRAFFIC_CONTROL","WITH_TRAFFIC_CONTROL"
            break
        }

        # Amazon.CodeDeploy.DeploymentReadyAction
        {
            ($_ -eq "New-CDDeploymentGroup/DeploymentReadyOptionTimeoutAction") -Or
            ($_ -eq "Update-CDDeploymentGroup/DeploymentReadyOptionTimeoutAction")
        }
        {
            $v = "CONTINUE_DEPLOYMENT","STOP_DEPLOYMENT"
            break
        }

        # Amazon.CodeDeploy.DeploymentType
        {
            ($_ -eq "New-CDDeploymentGroup/DeploymentStyleType") -Or
            ($_ -eq "Update-CDDeploymentGroup/DeploymentStyleType")
        }
        {
            $v = "BLUE_GREEN","IN_PLACE"
            break
        }

        # Amazon.CodeDeploy.DeploymentWaitType
        "Resume-CDDeployment/DeploymentWaitType"
        {
            $v = "READY_WAIT","TERMINATION_WAIT"
            break
        }

        # Amazon.CodeDeploy.FileExistsBehavior
        "New-CDDeployment/FileExistsBehavior"
        {
            $v = "DISALLOW","OVERWRITE","RETAIN"
            break
        }

        # Amazon.CodeDeploy.GreenFleetProvisioningAction
        {
            ($_ -eq "New-CDDeploymentGroup/GreenFleetProvisioningOptionAction") -Or
            ($_ -eq "Update-CDDeploymentGroup/GreenFleetProvisioningOptionAction")
        }
        {
            $v = "COPY_AUTO_SCALING_GROUP","DISCOVER_EXISTING"
            break
        }

        # Amazon.CodeDeploy.InstanceAction
        {
            ($_ -eq "New-CDDeploymentGroup/OnSuccessBlueInstanceTerminationAction") -Or
            ($_ -eq "Update-CDDeploymentGroup/OnSuccessBlueInstanceTerminationAction")
        }
        {
            $v = "KEEP_ALIVE","TERMINATE"
            break
        }

        # Amazon.CodeDeploy.LifecycleEventStatus
        "Write-CDLifecycleEventHookExecutionStatus/Status"
        {
            $v = "Failed","InProgress","Pending","Skipped","Succeeded","Unknown"
            break
        }

        # Amazon.CodeDeploy.ListStateFilterAction
        "Get-CDApplicationRevisionList/Deployed"
        {
            $v = "exclude","ignore","include"
            break
        }

        # Amazon.CodeDeploy.MinimumHealthyHostsPerZoneType
        "New-CDDeploymentConfig/MinimumHealthyHostsPerZone_Type"
        {
            $v = "FLEET_PERCENT","HOST_COUNT"
            break
        }

        # Amazon.CodeDeploy.MinimumHealthyHostsType
        "New-CDDeploymentConfig/MinimumHealthyHosts_Type"
        {
            $v = "FLEET_PERCENT","HOST_COUNT"
            break
        }

        # Amazon.CodeDeploy.OutdatedInstancesStrategy
        {
            ($_ -eq "New-CDDeploymentGroup/OutdatedInstancesStrategy") -Or
            ($_ -eq "Update-CDDeploymentGroup/OutdatedInstancesStrategy")
        }
        {
            $v = "IGNORE","UPDATE"
            break
        }

        # Amazon.CodeDeploy.RegistrationStatus
        "Get-CDOnPremiseInstanceList/RegistrationStatus"
        {
            $v = "Deregistered","Registered"
            break
        }

        # Amazon.CodeDeploy.RevisionLocationType
        {
            ($_ -eq "Get-CDApplicationRevision/Revision_RevisionType") -Or
            ($_ -eq "Register-CDApplicationRevision/Revision_RevisionType") -Or
            ($_ -eq "New-CDDeployment/RevisionType")
        }
        {
            $v = "AppSpecContent","GitHub","S3","String"
            break
        }

        # Amazon.CodeDeploy.SortOrder
        "Get-CDApplicationRevisionList/SortOrder"
        {
            $v = "ascending","descending"
            break
        }

        # Amazon.CodeDeploy.TrafficRoutingType
        "New-CDDeploymentConfig/TrafficRoutingConfig_Type"
        {
            $v = "AllAtOnce","TimeBasedCanary","TimeBasedLinear"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CD_map = @{
    "ComputePlatform"=@("New-CDApplication","New-CDDeploymentConfig")
    "Deployed"=@("Get-CDApplicationRevisionList")
    "DeploymentReadyOptionTimeoutAction"=@("New-CDDeploymentGroup","Update-CDDeploymentGroup")
    "DeploymentStyleOption"=@("New-CDDeploymentGroup","Update-CDDeploymentGroup")
    "DeploymentStyleType"=@("New-CDDeploymentGroup","Update-CDDeploymentGroup")
    "DeploymentWaitType"=@("Resume-CDDeployment")
    "FileExistsBehavior"=@("New-CDDeployment")
    "GreenFleetProvisioningOptionAction"=@("New-CDDeploymentGroup","Update-CDDeploymentGroup")
    "MinimumHealthyHosts_Type"=@("New-CDDeploymentConfig")
    "MinimumHealthyHostsPerZone_Type"=@("New-CDDeploymentConfig")
    "OnSuccessBlueInstanceTerminationAction"=@("New-CDDeploymentGroup","Update-CDDeploymentGroup")
    "OutdatedInstancesStrategy"=@("New-CDDeploymentGroup","Update-CDDeploymentGroup")
    "RegistrationStatus"=@("Get-CDOnPremiseInstanceList")
    "Revision_RevisionType"=@("Get-CDApplicationRevision","Register-CDApplicationRevision")
    "RevisionType"=@("New-CDDeployment")
    "S3Location_BundleType"=@("Get-CDApplicationRevision","New-CDDeployment","Register-CDApplicationRevision")
    "SortBy"=@("Get-CDApplicationRevisionList")
    "SortOrder"=@("Get-CDApplicationRevisionList")
    "Status"=@("Write-CDLifecycleEventHookExecutionStatus")
    "TrafficRoutingConfig_Type"=@("New-CDDeploymentConfig")
}

_awsArgumentCompleterRegistration $CD_Completers $CD_map

$CD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CD_SelectMap = @{
    "Select"=@("Add-CDOnPremiseInstanceTag",
               "Get-CDApplicationRevisionBatch",
               "Get-CDApplicationBatch",
               "Get-CDDeploymentGroupBatch",
               "Get-CDDeploymentInstanceBatch",
               "Get-CDDeploymentBatch",
               "Get-CDDeploymentTargetBatch",
               "Get-CDOnPremiseInstanceBatch",
               "Resume-CDDeployment",
               "New-CDApplication",
               "New-CDDeployment",
               "New-CDDeploymentConfig",
               "New-CDDeploymentGroup",
               "Remove-CDApplication",
               "Remove-CDDeploymentConfig",
               "Remove-CDDeploymentGroup",
               "Remove-CDGitHubAccountToken",
               "Remove-CDResourcesByExternalId",
               "Unregister-CDOnPremiseInstance",
               "Get-CDApplication",
               "Get-CDApplicationRevision",
               "Get-CDDeployment",
               "Get-CDDeploymentConfig",
               "Get-CDDeploymentGroup",
               "Get-CDDeploymentInstance",
               "Get-CDDeploymentTarget",
               "Get-CDOnPremiseInstance",
               "Get-CDApplicationRevisionList",
               "Get-CDApplicationList",
               "Get-CDDeploymentConfigList",
               "Get-CDDeploymentGroupList",
               "Get-CDDeploymentInstanceList",
               "Get-CDDeploymentList",
               "Get-CDDeploymentTargetList",
               "Get-CDGitHubAccountTokenNameList",
               "Get-CDOnPremiseInstanceList",
               "Get-CDResourceTag",
               "Write-CDLifecycleEventHookExecutionStatus",
               "Register-CDApplicationRevision",
               "Register-CDOnPremiseInstance",
               "Remove-CDOnPremiseInstanceTag",
               "Skip-CDWaitTimeForInstanceTermination",
               "Stop-CDDeployment",
               "Add-CDResourceTag",
               "Remove-CDResourceTag",
               "Update-CDApplication",
               "Update-CDDeploymentGroup")
}

_awsArgumentCompleterRegistration $CD_SelectCompleters $CD_SelectMap
# Argument completions for service Amazon CodeGuru Profiler


$CGP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeGuruProfiler.ActionGroup
        {
            ($_ -eq "Remove-CGPPermission/ActionGroup") -Or
            ($_ -eq "Write-CGPPermission/ActionGroup")
        }
        {
            $v = "agentPermissions"
            break
        }

        # Amazon.CodeGuruProfiler.AggregationPeriod
        {
            ($_ -eq "Get-CGPProfileTimeList/Period") -Or
            ($_ -eq "Get-CGPGetFrameMetricData/TargetResolution")
        }
        {
            $v = "P1D","PT1H","PT5M"
            break
        }

        # Amazon.CodeGuruProfiler.ComputePlatform
        "New-CGPProfilingGroup/ComputePlatform"
        {
            $v = "AWSLambda","Default"
            break
        }

        # Amazon.CodeGuruProfiler.FeedbackType
        "Submit-CGPFeedback/Type"
        {
            $v = "Negative","Positive"
            break
        }

        # Amazon.CodeGuruProfiler.OrderBy
        "Get-CGPProfileTimeList/OrderBy"
        {
            $v = "TimestampAscending","TimestampDescending"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGP_map = @{
    "ActionGroup"=@("Remove-CGPPermission","Write-CGPPermission")
    "ComputePlatform"=@("New-CGPProfilingGroup")
    "OrderBy"=@("Get-CGPProfileTimeList")
    "Period"=@("Get-CGPProfileTimeList")
    "TargetResolution"=@("Get-CGPGetFrameMetricData")
    "Type"=@("Submit-CGPFeedback")
}

_awsArgumentCompleterRegistration $CGP_Completers $CGP_map

$CGP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CGP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGP_SelectMap = @{
    "Select"=@("Add-CGPNotificationChannel",
               "Get-CGPGetFrameMetricData",
               "Set-CGPAgentConfiguration",
               "New-CGPProfilingGroup",
               "Remove-CGPProfilingGroup",
               "Get-CGPProfilingGroup",
               "Get-CGPFindingsReportAccountSummary",
               "Get-CGPNotificationConfiguration",
               "Get-CGPPolicy",
               "Get-CGPProfile",
               "Get-CGPRecommendation",
               "Get-CGPFindingsReportList",
               "Get-CGPProfileTimeList",
               "Get-CGPProfilingGroupList",
               "Get-CGPResourceTag",
               "Send-CGPAgentProfile",
               "Write-CGPPermission",
               "Remove-CGPNotificationChannel",
               "Remove-CGPPermission",
               "Submit-CGPFeedback",
               "Add-CGPResourceTag",
               "Remove-CGPResourceTag",
               "Update-CGPProfilingGroup")
}

_awsArgumentCompleterRegistration $CGP_SelectCompleters $CGP_SelectMap
# Argument completions for service Amazon CodeGuru Reviewer


$CGR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeGuruReviewer.EncryptionOption
        "Register-CGRRepository/KMSKeyDetails_EncryptionOption"
        {
            $v = "AWS_OWNED_CMK","CUSTOMER_MANAGED_CMK"
            break
        }

        # Amazon.CodeGuruReviewer.Type
        "Get-CGRCodeReviewList/Type"
        {
            $v = "PullRequest","RepositoryAnalysis"
            break
        }

        # Amazon.CodeGuruReviewer.VendorName
        "New-CGRCodeReview/RequestMetadata_VendorName"
        {
            $v = "GitHub","GitLab","NativeS3"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGR_map = @{
    "KMSKeyDetails_EncryptionOption"=@("Register-CGRRepository")
    "RequestMetadata_VendorName"=@("New-CGRCodeReview")
    "Type"=@("Get-CGRCodeReviewList")
}

_awsArgumentCompleterRegistration $CGR_Completers $CGR_map

$CGR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CGR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGR_SelectMap = @{
    "Select"=@("Register-CGRRepository",
               "New-CGRCodeReview",
               "Get-CGRCodeReview",
               "Get-CGRRecommendationFeedback",
               "Get-CGRRepositoryAssociation",
               "Unregister-CGRRepository",
               "Get-CGRCodeReviewList",
               "Get-CGRRecommendationFeedbackList",
               "Get-CGRRecommendationList",
               "Get-CGRRepositoryAssociationList",
               "Get-CGRResourceTag",
               "Write-CGRRecommendationFeedback",
               "Add-CGRResourceTag",
               "Remove-CGRResourceTag")
}

_awsArgumentCompleterRegistration $CGR_SelectCompleters $CGR_SelectMap
# Argument completions for service Amazon CodeGuru Security


$CGS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeGuruSecurity.AnalysisType
        "New-CGSScan/AnalysisType"
        {
            $v = "All","Security"
            break
        }

        # Amazon.CodeGuruSecurity.ScanType
        "New-CGSScan/ScanType"
        {
            $v = "Express","Standard"
            break
        }

        # Amazon.CodeGuruSecurity.Status
        "Get-CGSFinding/Status"
        {
            $v = "All","Closed","Open"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGS_map = @{
    "AnalysisType"=@("New-CGSScan")
    "ScanType"=@("New-CGSScan")
    "Status"=@("Get-CGSFinding")
}

_awsArgumentCompleterRegistration $CGS_Completers $CGS_map

$CGS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CGS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGS_SelectMap = @{
    "Select"=@("Get-CGSGetFinding",
               "New-CGSScan",
               "New-CGSUploadUrl",
               "Get-CGSAccountConfiguration",
               "Get-CGSFinding",
               "Get-CGSMetricsSummary",
               "Get-CGSScan",
               "Get-CGSFindingsMetricList",
               "Get-CGSScanList",
               "Get-CGSResourceTag",
               "Add-CGSResourceTag",
               "Remove-CGSResourceTag",
               "Update-CGSAccountConfiguration")
}

_awsArgumentCompleterRegistration $CGS_SelectCompleters $CGS_SelectMap
# Argument completions for service AWS CodePipeline


$CP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodePipeline.ActionCategory
        {
            ($_ -eq "Get-CPActionableJobList/ActionTypeId_Category") -Or
            ($_ -eq "Get-CPActionableThirdPartyJobList/ActionTypeId_Category") -Or
            ($_ -eq "Get-CPActionTypeDeclaration/Category") -Or
            ($_ -eq "New-CPCustomActionType/Category") -Or
            ($_ -eq "Remove-CPCustomActionType/Category") -Or
            ($_ -eq "Update-CPActionType/Id_Category")
        }
        {
            $v = "Approval","Build","Compute","Deploy","Invoke","Source","Test"
            break
        }

        # Amazon.CodePipeline.ActionOwner
        {
            ($_ -eq "Get-CPActionType/ActionOwnerFilter") -Or
            ($_ -eq "Get-CPActionableJobList/ActionTypeId_Owner") -Or
            ($_ -eq "Get-CPActionableThirdPartyJobList/ActionTypeId_Owner")
        }
        {
            $v = "AWS","Custom","ThirdParty"
            break
        }

        # Amazon.CodePipeline.ApprovalStatus
        "Write-CPApprovalResult/Result_Status"
        {
            $v = "Approved","Rejected"
            break
        }

        # Amazon.CodePipeline.ConditionType
        "Skip-CPStageCondition/ConditionType"
        {
            $v = "BEFORE_ENTRY","ON_SUCCESS"
            break
        }

        # Amazon.CodePipeline.ExecutorType
        "Update-CPActionType/Executor_Type"
        {
            $v = "JobWorker","Lambda"
            break
        }

        # Amazon.CodePipeline.FailureType
        {
            ($_ -eq "Write-CPJobFailureResult/FailureDetails_Type") -Or
            ($_ -eq "Write-CPThirdPartyJobFailureResult/FailureDetails_Type")
        }
        {
            $v = "ConfigurationError","JobFailed","PermissionError","RevisionOutOfSync","RevisionUnavailable","SystemUnavailable"
            break
        }

        # Amazon.CodePipeline.RuleOwner
        "Get-CPRuleTypeList/RuleOwnerFilter"
        {
            $v = "AWS"
            break
        }

        # Amazon.CodePipeline.StageRetryMode
        "Redo-CPStageExecution/RetryMode"
        {
            $v = "ALL_ACTIONS","FAILED_ACTIONS"
            break
        }

        # Amazon.CodePipeline.StageTransitionType
        {
            ($_ -eq "Disable-CPStageTransition/TransitionType") -Or
            ($_ -eq "Enable-CPStageTransition/TransitionType")
        }
        {
            $v = "Inbound","Outbound"
            break
        }

        # Amazon.CodePipeline.StartTimeRange
        {
            ($_ -eq "Get-CPActionExecutionList/LatestInPipelineExecution_StartTimeRange") -Or
            ($_ -eq "Get-CPRuleExecutionList/LatestInPipelineExecution_StartTimeRange")
        }
        {
            $v = "All","Latest"
            break
        }

        # Amazon.CodePipeline.WebhookAuthenticationType
        "Write-CPWebhook/Webhook_Authentication"
        {
            $v = "GITHUB_HMAC","IP","UNAUTHENTICATED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CP_map = @{
    "ActionOwnerFilter"=@("Get-CPActionType")
    "ActionTypeId_Category"=@("Get-CPActionableJobList","Get-CPActionableThirdPartyJobList")
    "ActionTypeId_Owner"=@("Get-CPActionableJobList","Get-CPActionableThirdPartyJobList")
    "Category"=@("Get-CPActionTypeDeclaration","New-CPCustomActionType","Remove-CPCustomActionType")
    "ConditionType"=@("Skip-CPStageCondition")
    "Executor_Type"=@("Update-CPActionType")
    "FailureDetails_Type"=@("Write-CPJobFailureResult","Write-CPThirdPartyJobFailureResult")
    "Id_Category"=@("Update-CPActionType")
    "LatestInPipelineExecution_StartTimeRange"=@("Get-CPActionExecutionList","Get-CPRuleExecutionList")
    "Result_Status"=@("Write-CPApprovalResult")
    "RetryMode"=@("Redo-CPStageExecution")
    "RuleOwnerFilter"=@("Get-CPRuleTypeList")
    "TransitionType"=@("Disable-CPStageTransition","Enable-CPStageTransition")
    "Webhook_Authentication"=@("Write-CPWebhook")
}

_awsArgumentCompleterRegistration $CP_Completers $CP_map

$CP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CP_SelectMap = @{
    "Select"=@("Confirm-CPJob",
               "Confirm-CPThirdPartyJob",
               "New-CPCustomActionType",
               "New-CPPipeline",
               "Remove-CPCustomActionType",
               "Remove-CPPipeline",
               "Remove-CPWebhook",
               "Unregister-CPWebhookWithThirdParty",
               "Disable-CPStageTransition",
               "Enable-CPStageTransition",
               "Get-CPActionTypeDeclaration",
               "Get-CPJobDetail",
               "Get-CPPipeline",
               "Get-CPPipelineExecution",
               "Get-CPPipelineState",
               "Get-CPThirdPartyJobDetail",
               "Get-CPActionExecutionList",
               "Get-CPActionType",
               "Get-CPPipelineExecutionSummary",
               "Get-CPPipelineList",
               "Get-CPRuleExecutionList",
               "Get-CPRuleTypeList",
               "Get-CPResourceTag",
               "Get-CPWebhookList",
               "Skip-CPStageCondition",
               "Get-CPActionableJobList",
               "Get-CPActionableThirdPartyJobList",
               "Write-CPActionRevision",
               "Write-CPApprovalResult",
               "Write-CPJobFailureResult",
               "Write-CPJobSuccessResult",
               "Write-CPThirdPartyJobFailureResult",
               "Write-CPThirdPartyJobSuccessResult",
               "Write-CPWebhook",
               "Register-CPWebhookWithThirdParty",
               "Redo-CPStageExecution",
               "Undo-CPStageExecution",
               "Start-CPPipelineExecution",
               "Stop-CPPipelineExecution",
               "Add-CPResourceTag",
               "Remove-CPResourceTag",
               "Update-CPActionType",
               "Update-CPPipeline")
}

_awsArgumentCompleterRegistration $CP_SelectCompleters $CP_SelectMap
# Argument completions for service AWS CodeStar Connections


$CSTC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeStarconnections.ProviderType
        {
            ($_ -eq "New-CSTCConnection/ProviderType") -Or
            ($_ -eq "New-CSTCHost/ProviderType") -Or
            ($_ -eq "Get-CSTCConnectionList/ProviderTypeFilter")
        }
        {
            $v = "Bitbucket","GitHub","GitHubEnterpriseServer","GitLab","GitLabSelfManaged"
            break
        }

        # Amazon.CodeStarconnections.PublishDeploymentStatus
        {
            ($_ -eq "New-CSTCSyncConfiguration/PublishDeploymentStatus") -Or
            ($_ -eq "Update-CSTCSyncConfiguration/PublishDeploymentStatus")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.CodeStarconnections.SyncConfigurationType
        {
            ($_ -eq "Get-CSTCRepositorySyncDefinitionList/SyncType") -Or
            ($_ -eq "Get-CSTCRepositorySyncStatus/SyncType") -Or
            ($_ -eq "Get-CSTCResourceSyncStatus/SyncType") -Or
            ($_ -eq "Get-CSTCSyncBlockerSummary/SyncType") -Or
            ($_ -eq "Get-CSTCSyncConfiguration/SyncType") -Or
            ($_ -eq "Get-CSTCSyncConfigurationList/SyncType") -Or
            ($_ -eq "New-CSTCSyncConfiguration/SyncType") -Or
            ($_ -eq "Remove-CSTCSyncConfiguration/SyncType") -Or
            ($_ -eq "Update-CSTCSyncBlocker/SyncType") -Or
            ($_ -eq "Update-CSTCSyncConfiguration/SyncType")
        }
        {
            $v = "CFN_STACK_SYNC"
            break
        }

        # Amazon.CodeStarconnections.TriggerResourceUpdateOn
        {
            ($_ -eq "New-CSTCSyncConfiguration/TriggerResourceUpdateOn") -Or
            ($_ -eq "Update-CSTCSyncConfiguration/TriggerResourceUpdateOn")
        }
        {
            $v = "ANY_CHANGE","FILE_CHANGE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CSTC_map = @{
    "ProviderType"=@("New-CSTCConnection","New-CSTCHost")
    "ProviderTypeFilter"=@("Get-CSTCConnectionList")
    "PublishDeploymentStatus"=@("New-CSTCSyncConfiguration","Update-CSTCSyncConfiguration")
    "SyncType"=@("Get-CSTCRepositorySyncDefinitionList","Get-CSTCRepositorySyncStatus","Get-CSTCResourceSyncStatus","Get-CSTCSyncBlockerSummary","Get-CSTCSyncConfiguration","Get-CSTCSyncConfigurationList","New-CSTCSyncConfiguration","Remove-CSTCSyncConfiguration","Update-CSTCSyncBlocker","Update-CSTCSyncConfiguration")
    "TriggerResourceUpdateOn"=@("New-CSTCSyncConfiguration","Update-CSTCSyncConfiguration")
}

_awsArgumentCompleterRegistration $CSTC_Completers $CSTC_map

$CSTC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CSTC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CSTC_SelectMap = @{
    "Select"=@("New-CSTCConnection",
               "New-CSTCHost",
               "New-CSTCRepositoryLink",
               "New-CSTCSyncConfiguration",
               "Remove-CSTCConnection",
               "Remove-CSTCHost",
               "Remove-CSTCRepositoryLink",
               "Remove-CSTCSyncConfiguration",
               "Get-CSTCConnection",
               "Get-CSTCHost",
               "Get-CSTCRepositoryLink",
               "Get-CSTCRepositorySyncStatus",
               "Get-CSTCResourceSyncStatus",
               "Get-CSTCSyncBlockerSummary",
               "Get-CSTCSyncConfiguration",
               "Get-CSTCConnectionList",
               "Get-CSTCHostList",
               "Get-CSTCRepositoryLinkList",
               "Get-CSTCRepositorySyncDefinitionList",
               "Get-CSTCSyncConfigurationList",
               "Get-CSTCResourceTagList",
               "Add-CSTCResourceTag",
               "Remove-CSTCResourceTag",
               "Update-CSTCHost",
               "Update-CSTCRepositoryLink",
               "Update-CSTCSyncBlocker",
               "Update-CSTCSyncConfiguration")
}

_awsArgumentCompleterRegistration $CSTC_SelectCompleters $CSTC_SelectMap
# Argument completions for service AWS CodeStar Notifications


$CSTN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CodeStarNotifications.DetailType
        {
            ($_ -eq "New-CSTNNotificationRule/DetailType") -Or
            ($_ -eq "Update-CSTNNotificationRule/DetailType")
        }
        {
            $v = "BASIC","FULL"
            break
        }

        # Amazon.CodeStarNotifications.NotificationRuleStatus
        {
            ($_ -eq "New-CSTNNotificationRule/Status") -Or
            ($_ -eq "Update-CSTNNotificationRule/Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CSTN_map = @{
    "DetailType"=@("New-CSTNNotificationRule","Update-CSTNNotificationRule")
    "Status"=@("New-CSTNNotificationRule","Update-CSTNNotificationRule")
}

_awsArgumentCompleterRegistration $CSTN_Completers $CSTN_map

$CSTN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CSTN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CSTN_SelectMap = @{
    "Select"=@("New-CSTNNotificationRule",
               "Remove-CSTNNotificationRule",
               "Remove-CSTNTarget",
               "Get-CSTNNotificationRule",
               "Get-CSTNEventTypeList",
               "Get-CSTNNotificationRuleList",
               "Get-CSTNResourceTag",
               "Get-CSTNTargetList",
               "Add-CSTNSubscription",
               "Add-CSTNResourceTag",
               "Remove-CSTNSubscription",
               "Remove-CSTNResourceTag",
               "Update-CSTNNotificationRule")
}

_awsArgumentCompleterRegistration $CSTN_SelectCompleters $CSTN_SelectMap
# Argument completions for service Amazon Cognito Identity


$CGI_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CGI.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGI_SelectMap = @{
    "Select"=@("New-CGIIdentityPool",
               "Remove-CGIIdentity",
               "Remove-CGIIdentityPool",
               "Get-CGIIdentity",
               "Get-CGIIdentityPool",
               "Get-CGICredentialsForIdentity",
               "Get-CGIId",
               "Get-CGIIdentityPoolRole",
               "Get-CGIOpenIdToken",
               "Get-CGIOpenIdTokenForDeveloperIdentity",
               "Get-CGIPrincipalTagAttributeMap",
               "Get-CGIIdentityList",
               "Get-CGIIdentityPoolList",
               "Get-CGIResourceTag",
               "Find-CGIDeveloperIdentity",
               "Merge-CGIDeveloperIdentity",
               "Set-CGIIdentityPoolRole",
               "Set-CGIPrincipalTagAttributeMap",
               "Add-CGIResourceTag",
               "Dismount-CGIDeveloperIdentity",
               "Dismount-CGIIdentity",
               "Remove-CGIResourceTag",
               "Update-CGIIdentityPool")
}

_awsArgumentCompleterRegistration $CGI_SelectCompleters $CGI_SelectMap
# Argument completions for service Amazon Cognito Identity Provider


$CGIP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CognitoIdentityProvider.AccountTakeoverEventActionType
        {
            ($_ -eq "Set-CGIPRiskConfiguration/HighAction_EventAction") -Or
            ($_ -eq "Set-CGIPRiskConfiguration/LowAction_EventAction") -Or
            ($_ -eq "Set-CGIPRiskConfiguration/MediumAction_EventAction")
        }
        {
            $v = "BLOCK","MFA_IF_CONFIGURED","MFA_REQUIRED","NO_ACTION"
            break
        }

        # Amazon.CognitoIdentityProvider.AdvancedSecurityEnabledModeType
        {
            ($_ -eq "New-CGIPUserPool/AdvancedSecurityAdditionalFlows_CustomAuthMode") -Or
            ($_ -eq "Update-CGIPUserPool/AdvancedSecurityAdditionalFlows_CustomAuthMode")
        }
        {
            $v = "AUDIT","ENFORCED"
            break
        }

        # Amazon.CognitoIdentityProvider.AdvancedSecurityModeType
        {
            ($_ -eq "New-CGIPUserPool/UserPoolAddOns_AdvancedSecurityMode") -Or
            ($_ -eq "Update-CGIPUserPool/UserPoolAddOns_AdvancedSecurityMode")
        }
        {
            $v = "AUDIT","ENFORCED","OFF"
            break
        }

        # Amazon.CognitoIdentityProvider.AuthFlowType
        {
            ($_ -eq "Start-CGIPAuth/AuthFlow") -Or
            ($_ -eq "Start-CGIPAuthAdmin/AuthFlow")
        }
        {
            $v = "ADMIN_NO_SRP_AUTH","ADMIN_USER_PASSWORD_AUTH","CUSTOM_AUTH","REFRESH_TOKEN","REFRESH_TOKEN_AUTH","USER_PASSWORD_AUTH","USER_SRP_AUTH"
            break
        }

        # Amazon.CognitoIdentityProvider.ChallengeNameType
        {
            ($_ -eq "Send-CGIPAuthChallengeResponse/ChallengeName") -Or
            ($_ -eq "Send-CGIPAuthChallengeResponseAdmin/ChallengeName")
        }
        {
            $v = "ADMIN_NO_SRP_AUTH","CUSTOM_CHALLENGE","DEVICE_PASSWORD_VERIFIER","DEVICE_SRP_AUTH","EMAIL_OTP","MFA_SETUP","NEW_PASSWORD_REQUIRED","PASSWORD_VERIFIER","SELECT_MFA_TYPE","SMS_MFA","SOFTWARE_TOKEN_MFA"
            break
        }

        # Amazon.CognitoIdentityProvider.CompromisedCredentialsEventActionType
        "Set-CGIPRiskConfiguration/Actions_EventAction"
        {
            $v = "BLOCK","NO_ACTION"
            break
        }

        # Amazon.CognitoIdentityProvider.CustomEmailSenderLambdaVersionType
        {
            ($_ -eq "New-CGIPUserPool/CustomEmailSender_LambdaVersion") -Or
            ($_ -eq "Update-CGIPUserPool/CustomEmailSender_LambdaVersion")
        }
        {
            $v = "V1_0"
            break
        }

        # Amazon.CognitoIdentityProvider.CustomSMSSenderLambdaVersionType
        {
            ($_ -eq "New-CGIPUserPool/CustomSMSSender_LambdaVersion") -Or
            ($_ -eq "Update-CGIPUserPool/CustomSMSSender_LambdaVersion")
        }
        {
            $v = "V1_0"
            break
        }

        # Amazon.CognitoIdentityProvider.DefaultEmailOptionType
        {
            ($_ -eq "New-CGIPUserPool/VerificationMessageTemplate_DefaultEmailOption") -Or
            ($_ -eq "Update-CGIPUserPool/VerificationMessageTemplate_DefaultEmailOption")
        }
        {
            $v = "CONFIRM_WITH_CODE","CONFIRM_WITH_LINK"
            break
        }

        # Amazon.CognitoIdentityProvider.DeletionProtectionType
        {
            ($_ -eq "New-CGIPUserPool/DeletionProtection") -Or
            ($_ -eq "Update-CGIPUserPool/DeletionProtection")
        }
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.CognitoIdentityProvider.DeviceRememberedStatusType
        {
            ($_ -eq "Edit-CGIPDeviceStatus/DeviceRememberedStatus") -Or
            ($_ -eq "Edit-CGIPDeviceStatusAdmin/DeviceRememberedStatus")
        }
        {
            $v = "not_remembered","remembered"
            break
        }

        # Amazon.CognitoIdentityProvider.EmailSendingAccountType
        {
            ($_ -eq "New-CGIPUserPool/EmailConfiguration_EmailSendingAccount") -Or
            ($_ -eq "Update-CGIPUserPool/EmailConfiguration_EmailSendingAccount")
        }
        {
            $v = "COGNITO_DEFAULT","DEVELOPER"
            break
        }

        # Amazon.CognitoIdentityProvider.FeedbackValueType
        {
            ($_ -eq "Update-CGIPAuthEventFeedback/FeedbackValue") -Or
            ($_ -eq "Update-CGIPAuthEventFeedbackAdmin/FeedbackValue")
        }
        {
            $v = "Invalid","Valid"
            break
        }

        # Amazon.CognitoIdentityProvider.IdentityProviderTypeType
        "New-CGIPIdentityProvider/ProviderType"
        {
            $v = "Facebook","Google","LoginWithAmazon","OIDC","SAML","SignInWithApple"
            break
        }

        # Amazon.CognitoIdentityProvider.MessageActionType
        "New-CGIPUserAdmin/MessageAction"
        {
            $v = "RESEND","SUPPRESS"
            break
        }

        # Amazon.CognitoIdentityProvider.PreTokenGenerationLambdaVersionType
        {
            ($_ -eq "New-CGIPUserPool/PreTokenGenerationConfig_LambdaVersion") -Or
            ($_ -eq "Update-CGIPUserPool/PreTokenGenerationConfig_LambdaVersion")
        }
        {
            $v = "V1_0","V2_0"
            break
        }

        # Amazon.CognitoIdentityProvider.PreventUserExistenceErrorTypes
        {
            ($_ -eq "New-CGIPUserPoolClient/PreventUserExistenceError") -Or
            ($_ -eq "Update-CGIPUserPoolClient/PreventUserExistenceError")
        }
        {
            $v = "ENABLED","LEGACY"
            break
        }

        # Amazon.CognitoIdentityProvider.TimeUnitsType
        {
            ($_ -eq "New-CGIPUserPoolClient/TokenValidityUnits_AccessToken") -Or
            ($_ -eq "Update-CGIPUserPoolClient/TokenValidityUnits_AccessToken") -Or
            ($_ -eq "New-CGIPUserPoolClient/TokenValidityUnits_IdToken") -Or
            ($_ -eq "Update-CGIPUserPoolClient/TokenValidityUnits_IdToken") -Or
            ($_ -eq "New-CGIPUserPoolClient/TokenValidityUnits_RefreshToken") -Or
            ($_ -eq "Update-CGIPUserPoolClient/TokenValidityUnits_RefreshToken")
        }
        {
            $v = "days","hours","minutes","seconds"
            break
        }

        # Amazon.CognitoIdentityProvider.UserPoolMfaType
        {
            ($_ -eq "New-CGIPUserPool/MfaConfiguration") -Or
            ($_ -eq "Set-CGIPUserPoolMfaConfig/MfaConfiguration") -Or
            ($_ -eq "Update-CGIPUserPool/MfaConfiguration")
        }
        {
            $v = "OFF","ON","OPTIONAL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGIP_map = @{
    "Actions_EventAction"=@("Set-CGIPRiskConfiguration")
    "AdvancedSecurityAdditionalFlows_CustomAuthMode"=@("New-CGIPUserPool","Update-CGIPUserPool")
    "AuthFlow"=@("Start-CGIPAuth","Start-CGIPAuthAdmin")
    "ChallengeName"=@("Send-CGIPAuthChallengeResponse","Send-CGIPAuthChallengeResponseAdmin")
    "CustomEmailSender_LambdaVersion"=@("New-CGIPUserPool","Update-CGIPUserPool")
    "CustomSMSSender_LambdaVersion"=@("New-CGIPUserPool","Update-CGIPUserPool")
    "DeletionProtection"=@("New-CGIPUserPool","Update-CGIPUserPool")
    "DeviceRememberedStatus"=@("Edit-CGIPDeviceStatus","Edit-CGIPDeviceStatusAdmin")
    "EmailConfiguration_EmailSendingAccount"=@("New-CGIPUserPool","Update-CGIPUserPool")
    "FeedbackValue"=@("Update-CGIPAuthEventFeedback","Update-CGIPAuthEventFeedbackAdmin")
    "HighAction_EventAction"=@("Set-CGIPRiskConfiguration")
    "LowAction_EventAction"=@("Set-CGIPRiskConfiguration")
    "MediumAction_EventAction"=@("Set-CGIPRiskConfiguration")
    "MessageAction"=@("New-CGIPUserAdmin")
    "MfaConfiguration"=@("New-CGIPUserPool","Set-CGIPUserPoolMfaConfig","Update-CGIPUserPool")
    "PreTokenGenerationConfig_LambdaVersion"=@("New-CGIPUserPool","Update-CGIPUserPool")
    "PreventUserExistenceError"=@("New-CGIPUserPoolClient","Update-CGIPUserPoolClient")
    "ProviderType"=@("New-CGIPIdentityProvider")
    "TokenValidityUnits_AccessToken"=@("New-CGIPUserPoolClient","Update-CGIPUserPoolClient")
    "TokenValidityUnits_IdToken"=@("New-CGIPUserPoolClient","Update-CGIPUserPoolClient")
    "TokenValidityUnits_RefreshToken"=@("New-CGIPUserPoolClient","Update-CGIPUserPoolClient")
    "UserPoolAddOns_AdvancedSecurityMode"=@("New-CGIPUserPool","Update-CGIPUserPool")
    "VerificationMessageTemplate_DefaultEmailOption"=@("New-CGIPUserPool","Update-CGIPUserPool")
}

_awsArgumentCompleterRegistration $CGIP_Completers $CGIP_map

$CGIP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CGIP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGIP_SelectMap = @{
    "Select"=@("Add-CGIPCustomAttribute",
               "Add-CGIPUserToGroupAdmin",
               "Confirm-CGIPUserRegistrationAdmin",
               "New-CGIPUserAdmin",
               "Remove-CGIPUserAdmin",
               "Remove-CGIPUserAttributeAdmin",
               "Disable-CGIPProviderForUserAdmin",
               "Disable-CGIPUserAdmin",
               "Enable-CGIPUserAdmin",
               "Stop-CGIPDeviceTrackingAdmin",
               "Get-CGIPDeviceAdmin",
               "Get-CGIPUserAdmin",
               "Start-CGIPAuthAdmin",
               "Connect-CGIPProviderForUserAdmin",
               "Get-CGIPDeviceListAdmin",
               "Get-CGIPGroupsForUserAdmin",
               "Get-CGIPUserAuthEventListAdmin",
               "Remove-CGIPUserFromGroupAdmin",
               "Reset-CGIPUserPasswordAdmin",
               "Send-CGIPAuthChallengeResponseAdmin",
               "Set-CGIPUserMFAPreferenceAdmin",
               "Set-CGIPUserPasswordAdmin",
               "Set-CGIPUserSettingAdmin",
               "Update-CGIPAuthEventFeedbackAdmin",
               "Edit-CGIPDeviceStatusAdmin",
               "Update-CGIPUserAttributeAdmin",
               "Disconnect-CGIPUserGlobalAdmin",
               "Add-CGIPSoftwareToken",
               "Update-CGIPPassword",
               "Approve-CGIPDevice",
               "Confirm-CGIPForgotPassword",
               "Confirm-CGIPUserRegistration",
               "New-CGIPGroup",
               "New-CGIPIdentityProvider",
               "New-CGIPResourceServer",
               "New-CGIPUserImportJob",
               "New-CGIPUserPool",
               "New-CGIPUserPoolClient",
               "New-CGIPUserPoolDomain",
               "Remove-CGIPGroup",
               "Remove-CGIPIdentityProvider",
               "Remove-CGIPResourceServer",
               "Remove-CGIPUser",
               "Remove-CGIPUserAttribute",
               "Remove-CGIPUserPool",
               "Remove-CGIPUserPoolClient",
               "Remove-CGIPUserPoolDomain",
               "Get-CGIPIdentityProvider",
               "Get-CGIPResourceServer",
               "Get-CGIPRiskConfiguration",
               "Get-CGIPUserImportJob",
               "Get-CGIPUserPool",
               "Get-CGIPUserPoolClient",
               "Get-CGIPUserPoolDomain",
               "Stop-CGIPDeviceTracking",
               "Reset-CGIPForgottenPassword",
               "Get-CGIPCSVHeader",
               "Get-CGIPDevice",
               "Get-CGIPGroup",
               "Get-CGIPIdentityProviderByIdentifier",
               "Get-CGIPLogDeliveryConfiguration",
               "Get-CGIPSigningCertificate",
               "Get-CGIPUICustomization",
               "Get-CGIPUser",
               "Get-CGIPUserAttributeVerificationCode",
               "Get-CGIPUserPoolMfaConfig",
               "Disconnect-CGIPDeviceGlobal",
               "Start-CGIPAuth",
               "Get-CGIPDeviceList",
               "Get-CGIPGroupList",
               "Get-CGIPIdentityProviderList",
               "Get-CGIPResourceServerList",
               "Get-CGIPResourceTag",
               "Get-CGIPUserImportJobList",
               "Get-CGIPUserPoolClientList",
               "Get-CGIPUserPoolList",
               "Get-CGIPUserList",
               "Get-CGIPUsersInGroup",
               "Send-CGIPConfirmationCode",
               "Send-CGIPAuthChallengeResponse",
               "Revoke-CGIPToken",
               "Set-CGIPLogDeliveryConfiguration",
               "Set-CGIPRiskConfiguration",
               "Set-CGIPUICustomization",
               "Set-CGIPUserMFAPreference",
               "Set-CGIPUserPoolMfaConfig",
               "Set-CGIPUserSetting",
               "Register-CGIPUserInPool",
               "Start-CGIPUserImportJob",
               "Stop-CGIPUserImportJob",
               "Add-CGIPResourceTag",
               "Remove-CGIPResourceTag",
               "Update-CGIPAuthEventFeedback",
               "Edit-CGIPDeviceStatus",
               "Update-CGIPGroup",
               "Update-CGIPIdentityProvider",
               "Update-CGIPResourceServer",
               "Update-CGIPUserAttribute",
               "Update-CGIPUserPool",
               "Update-CGIPUserPoolClient",
               "Update-CGIPUserPoolDomain",
               "Test-CGIPSoftwareToken",
               "Test-CGIPUserAttribute")
}

_awsArgumentCompleterRegistration $CGIP_SelectCompleters $CGIP_SelectMap
# Argument completions for service Amazon Cognito Sync


$CGIS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CognitoSync.Platform
        "Register-CGISDevice/Platform"
        {
            $v = "ADM","APNS","APNS_SANDBOX","GCM"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGIS_map = @{
    "Platform"=@("Register-CGISDevice")
}

_awsArgumentCompleterRegistration $CGIS_Completers $CGIS_map

$CGIS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CGIS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CGIS_SelectMap = @{
    "Select"=@("Publish-CGISBulkDataset",
               "Remove-CGISDataset",
               "Get-CGISDataset",
               "Get-CGISIdentityPoolUsage",
               "Get-CGISIdentityUsage",
               "Get-CGISBulkPublishDetail",
               "Get-CGISCognitoEvent",
               "Get-CGISIdentityPoolConfiguration",
               "Get-CGISDatasetList",
               "Get-CGISIdentityPoolUsageList",
               "Get-CGISRecordList",
               "Register-CGISDevice",
               "Set-CGISCognitoEventLambdaFunction",
               "Set-CGISIdentityPoolConfiguration",
               "Add-CGISDatasetSubscription",
               "Remove-CGISDatasetSubscription",
               "Update-CGISRecord")
}

_awsArgumentCompleterRegistration $CGIS_SelectCompleters $CGIS_SelectMap
# Argument completions for service Amazon Comprehend


$COMP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Comprehend.DatasetDataFormat
        "New-COMPDataset/InputDataConfig_DataFormat"
        {
            $v = "AUGMENTED_MANIFEST","COMPREHEND_CSV"
            break
        }

        # Amazon.Comprehend.DatasetStatus
        "Get-COMPDatasetList/Filter_Status"
        {
            $v = "COMPLETED","CREATING","FAILED"
            break
        }

        # Amazon.Comprehend.DatasetType
        {
            ($_ -eq "New-COMPDataset/DatasetType") -Or
            ($_ -eq "Get-COMPDatasetList/Filter_DatasetType")
        }
        {
            $v = "TEST","TRAIN"
            break
        }

        # Amazon.Comprehend.DocumentClassifierDataFormat
        "New-COMPDocumentClassifier/InputDataConfig_DataFormat"
        {
            $v = "AUGMENTED_MANIFEST","COMPREHEND_CSV"
            break
        }

        # Amazon.Comprehend.DocumentClassifierDocumentTypeFormat
        "New-COMPDocumentClassifier/InputDataConfig_DocumentType"
        {
            $v = "PLAIN_TEXT_DOCUMENT","SEMI_STRUCTURED_DOCUMENT"
            break
        }

        # Amazon.Comprehend.DocumentClassifierMode
        {
            ($_ -eq "New-COMPFlywheel/DocumentClassificationConfig_Mode") -Or
            ($_ -eq "New-COMPDocumentClassifier/Mode")
        }
        {
            $v = "MULTI_CLASS","MULTI_LABEL"
            break
        }

        # Amazon.Comprehend.DocumentReadAction
        {
            ($_ -eq "Find-COMPEntity/DocumentReaderConfig_DocumentReadAction") -Or
            ($_ -eq "Invoke-COMPDocumentClassification/DocumentReaderConfig_DocumentReadAction") -Or
            ($_ -eq "New-COMPDocumentClassifier/DocumentReaderConfig_DocumentReadAction")
        }
        {
            $v = "TEXTRACT_ANALYZE_DOCUMENT","TEXTRACT_DETECT_DOCUMENT_TEXT"
            break
        }

        # Amazon.Comprehend.DocumentReadMode
        {
            ($_ -eq "Find-COMPEntity/DocumentReaderConfig_DocumentReadMode") -Or
            ($_ -eq "Invoke-COMPDocumentClassification/DocumentReaderConfig_DocumentReadMode") -Or
            ($_ -eq "New-COMPDocumentClassifier/DocumentReaderConfig_DocumentReadMode")
        }
        {
            $v = "FORCE_DOCUMENT_READ_ACTION","SERVICE_DEFAULT"
            break
        }

        # Amazon.Comprehend.EndpointStatus
        "Get-COMPEndpointList/Filter_Status"
        {
            $v = "CREATING","DELETING","FAILED","IN_SERVICE","UPDATING"
            break
        }

        # Amazon.Comprehend.EntityRecognizerDataFormat
        "New-COMPEntityRecognizer/InputDataConfig_DataFormat"
        {
            $v = "AUGMENTED_MANIFEST","COMPREHEND_CSV"
            break
        }

        # Amazon.Comprehend.FlywheelStatus
        "Get-COMPFlywheelList/Filter_Status"
        {
            $v = "ACTIVE","CREATING","DELETING","FAILED","UPDATING"
            break
        }

        # Amazon.Comprehend.InputFormat
        {
            ($_ -eq "New-COMPDataset/Documents_InputFormat") -Or
            ($_ -eq "New-COMPEntityRecognizer/Documents_InputFormat")
        }
        {
            $v = "ONE_DOC_PER_FILE","ONE_DOC_PER_LINE"
            break
        }

        # Amazon.Comprehend.JobStatus
        {
            ($_ -eq "Get-COMPDocumentClassificationJobList/Filter_JobStatus") -Or
            ($_ -eq "Get-COMPEventsDetectionJobList/Filter_JobStatus") -Or
            ($_ -eq "Get-COMPTargetedSentimentDetectionJobList/Filter_JobStatus")
        }
        {
            $v = "COMPLETED","FAILED","IN_PROGRESS","STOPPED","STOP_REQUESTED","SUBMITTED"
            break
        }

        # Amazon.Comprehend.LanguageCode
        {
            ($_ -eq "Find-COMPEntity/LanguageCode") -Or
            ($_ -eq "Find-COMPEntityBatch/LanguageCode") -Or
            ($_ -eq "Find-COMPKeyPhrase/LanguageCode") -Or
            ($_ -eq "Find-COMPKeyPhrasesBatch/LanguageCode") -Or
            ($_ -eq "Find-COMPPiiEntity/LanguageCode") -Or
            ($_ -eq "Find-COMPPiiEntityType/LanguageCode") -Or
            ($_ -eq "Find-COMPSentiment/LanguageCode") -Or
            ($_ -eq "Find-COMPSentimentBatch/LanguageCode") -Or
            ($_ -eq "Find-COMPTargetedSentiment/LanguageCode") -Or
            ($_ -eq "Find-COMPTargetedSentimentBatch/LanguageCode") -Or
            ($_ -eq "Find-COMPToxicContent/LanguageCode") -Or
            ($_ -eq "New-COMPDocumentClassifier/LanguageCode") -Or
            ($_ -eq "New-COMPEntityRecognizer/LanguageCode") -Or
            ($_ -eq "Start-COMPEntitiesDetectionJob/LanguageCode") -Or
            ($_ -eq "Start-COMPEventsDetectionJob/LanguageCode") -Or
            ($_ -eq "Start-COMPKeyPhrasesDetectionJob/LanguageCode") -Or
            ($_ -eq "Start-COMPPiiEntitiesDetectionJob/LanguageCode") -Or
            ($_ -eq "Start-COMPSentimentDetectionJob/LanguageCode") -Or
            ($_ -eq "Start-COMPTargetedSentimentDetectionJob/LanguageCode") -Or
            ($_ -eq "New-COMPFlywheel/TaskConfig_LanguageCode")
        }
        {
            $v = "ar","de","en","es","fr","hi","it","ja","ko","pt","zh","zh-TW"
            break
        }

        # Amazon.Comprehend.ModelStatus
        {
            ($_ -eq "Get-COMPDocumentClassifierList/Filter_Status") -Or
            ($_ -eq "Get-COMPEntityRecognizerList/Filter_Status")
        }
        {
            $v = "DELETING","IN_ERROR","STOPPED","STOP_REQUESTED","SUBMITTED","TRAINED","TRAINED_WITH_WARNING","TRAINING"
            break
        }

        # Amazon.Comprehend.ModelType
        "New-COMPFlywheel/ModelType"
        {
            $v = "DOCUMENT_CLASSIFIER","ENTITY_RECOGNIZER"
            break
        }

        # Amazon.Comprehend.PiiEntitiesDetectionMaskMode
        "Start-COMPPiiEntitiesDetectionJob/RedactionConfig_MaskMode"
        {
            $v = "MASK","REPLACE_WITH_PII_ENTITY_TYPE"
            break
        }

        # Amazon.Comprehend.PiiEntitiesDetectionMode
        "Start-COMPPiiEntitiesDetectionJob/Mode"
        {
            $v = "ONLY_OFFSETS","ONLY_REDACTION"
            break
        }

        # Amazon.Comprehend.SyntaxLanguageCode
        {
            ($_ -eq "Find-COMPSyntax/LanguageCode") -Or
            ($_ -eq "Find-COMPSyntaxBatch/LanguageCode")
        }
        {
            $v = "de","en","es","fr","it","pt"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$COMP_map = @{
    "DatasetType"=@("New-COMPDataset")
    "DocumentClassificationConfig_Mode"=@("New-COMPFlywheel")
    "DocumentReaderConfig_DocumentReadAction"=@("Find-COMPEntity","Invoke-COMPDocumentClassification","New-COMPDocumentClassifier")
    "DocumentReaderConfig_DocumentReadMode"=@("Find-COMPEntity","Invoke-COMPDocumentClassification","New-COMPDocumentClassifier")
    "Documents_InputFormat"=@("New-COMPDataset","New-COMPEntityRecognizer")
    "Filter_DatasetType"=@("Get-COMPDatasetList")
    "Filter_JobStatus"=@("Get-COMPDocumentClassificationJobList","Get-COMPEventsDetectionJobList","Get-COMPTargetedSentimentDetectionJobList")
    "Filter_Status"=@("Get-COMPDatasetList","Get-COMPDocumentClassifierList","Get-COMPEndpointList","Get-COMPEntityRecognizerList","Get-COMPFlywheelList")
    "InputDataConfig_DataFormat"=@("New-COMPDataset","New-COMPDocumentClassifier","New-COMPEntityRecognizer")
    "InputDataConfig_DocumentType"=@("New-COMPDocumentClassifier")
    "LanguageCode"=@("Find-COMPEntity","Find-COMPEntityBatch","Find-COMPKeyPhrase","Find-COMPKeyPhrasesBatch","Find-COMPPiiEntity","Find-COMPPiiEntityType","Find-COMPSentiment","Find-COMPSentimentBatch","Find-COMPSyntax","Find-COMPSyntaxBatch","Find-COMPTargetedSentiment","Find-COMPTargetedSentimentBatch","Find-COMPToxicContent","New-COMPDocumentClassifier","New-COMPEntityRecognizer","Start-COMPEntitiesDetectionJob","Start-COMPEventsDetectionJob","Start-COMPKeyPhrasesDetectionJob","Start-COMPPiiEntitiesDetectionJob","Start-COMPSentimentDetectionJob","Start-COMPTargetedSentimentDetectionJob")
    "Mode"=@("New-COMPDocumentClassifier","Start-COMPPiiEntitiesDetectionJob")
    "ModelType"=@("New-COMPFlywheel")
    "RedactionConfig_MaskMode"=@("Start-COMPPiiEntitiesDetectionJob")
    "TaskConfig_LanguageCode"=@("New-COMPFlywheel")
}

_awsArgumentCompleterRegistration $COMP_Completers $COMP_map

$COMP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.COMP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$COMP_SelectMap = @{
    "Select"=@("Find-COMPDominantLanguageBatch",
               "Find-COMPEntityBatch",
               "Find-COMPKeyPhrasesBatch",
               "Find-COMPSentimentBatch",
               "Find-COMPSyntaxBatch",
               "Find-COMPTargetedSentimentBatch",
               "Invoke-COMPDocumentClassification",
               "Find-COMPPiiEntityType",
               "New-COMPDataset",
               "New-COMPDocumentClassifier",
               "New-COMPEndpoint",
               "New-COMPEntityRecognizer",
               "New-COMPFlywheel",
               "Remove-COMPDocumentClassifier",
               "Remove-COMPEndpoint",
               "Remove-COMPEntityRecognizer",
               "Remove-COMPFlywheel",
               "Remove-COMPResourcePolicy",
               "Get-COMPDataset",
               "Get-COMPDocumentClassificationJob",
               "Get-COMPDocumentClassifier",
               "Get-COMPDominantLanguageDetectionJob",
               "Get-COMPEndpoint",
               "Get-COMPEntitiesDetectionJob",
               "Get-COMPEntityRecognizer",
               "Get-COMPEventsDetectionJob",
               "Get-COMPFlywheel",
               "Get-COMPFlywheelIteration",
               "Get-COMPKeyPhrasesDetectionJob",
               "Get-COMPPiiEntitiesDetectionJob",
               "Get-COMPResourcePolicy",
               "Get-COMPSentimentDetectionJob",
               "Get-COMPTargetedSentimentDetectionJob",
               "Get-COMPTopicsDetectionJob",
               "Find-COMPDominantLanguage",
               "Find-COMPEntity",
               "Find-COMPKeyPhrase",
               "Find-COMPPiiEntity",
               "Find-COMPSentiment",
               "Find-COMPSyntax",
               "Find-COMPTargetedSentiment",
               "Find-COMPToxicContent",
               "Import-COMPModel",
               "Get-COMPDatasetList",
               "Get-COMPDocumentClassificationJobList",
               "Get-COMPDocumentClassifierList",
               "Get-COMPDocumentClassifierSummaryList",
               "Get-COMPDominantLanguageDetectionJobList",
               "Get-COMPEndpointList",
               "Get-COMPEntitiesDetectionJobList",
               "Get-COMPEntityRecognizerList",
               "Get-COMPEntityRecognizerSummaryList",
               "Get-COMPEventsDetectionJobList",
               "Get-COMPFlywheelIterationHistoryList",
               "Get-COMPFlywheelList",
               "Get-COMPKeyPhrasesDetectionJobList",
               "Get-COMPPiiEntitiesDetectionJobList",
               "Get-COMPSentimentDetectionJobList",
               "Get-COMPResourceTag",
               "Get-COMPTargetedSentimentDetectionJobList",
               "Get-COMPTopicsDetectionJobList",
               "Write-COMPResourcePolicy",
               "Start-COMPDocumentClassificationJob",
               "Start-COMPDominantLanguageDetectionJob",
               "Start-COMPEntitiesDetectionJob",
               "Start-COMPEventsDetectionJob",
               "Start-COMPFlywheelIteration",
               "Start-COMPKeyPhrasesDetectionJob",
               "Start-COMPPiiEntitiesDetectionJob",
               "Start-COMPSentimentDetectionJob",
               "Start-COMPTargetedSentimentDetectionJob",
               "Start-COMPTopicsDetectionJob",
               "Stop-COMPDominantLanguageDetectionJob",
               "Stop-COMPEntitiesDetectionJob",
               "Stop-COMPEventsDetectionJob",
               "Stop-COMPKeyPhrasesDetectionJob",
               "Stop-COMPPiiEntitiesDetectionJob",
               "Stop-COMPSentimentDetectionJob",
               "Stop-COMPTargetedSentimentDetectionJob",
               "Stop-COMPTrainingDocumentClassifier",
               "Stop-COMPTrainingEntityRecognizer",
               "Add-COMPResourceTag",
               "Remove-COMPResourceTag",
               "Update-COMPEndpoint",
               "Update-COMPFlywheel")
}

_awsArgumentCompleterRegistration $COMP_SelectCompleters $COMP_SelectMap
# Argument completions for service AWS Comprehend Medical


$CMPM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ComprehendMedical.JobStatus
        {
            ($_ -eq "Get-CMPMEntitiesDetectionV2JobList/Filter_JobStatus") -Or
            ($_ -eq "Get-CMPMICD10CMInferenceJobList/Filter_JobStatus") -Or
            ($_ -eq "Get-CMPMPersonalHealthInformationDetectionJobList/Filter_JobStatus") -Or
            ($_ -eq "Get-CMPMRxNormInferenceJobList/Filter_JobStatus") -Or
            ($_ -eq "Get-CMPMSNOMEDCTInferenceJobList/Filter_JobStatus")
        }
        {
            $v = "COMPLETED","FAILED","IN_PROGRESS","PARTIAL_SUCCESS","STOPPED","STOP_REQUESTED","SUBMITTED"
            break
        }

        # Amazon.ComprehendMedical.LanguageCode
        {
            ($_ -eq "Start-CMPMEntitiesDetectionV2Job/LanguageCode") -Or
            ($_ -eq "Start-CMPMICD10CMInferenceJob/LanguageCode") -Or
            ($_ -eq "Start-CMPMPersonalHealthInformationDetectionJob/LanguageCode") -Or
            ($_ -eq "Start-CMPMRxNormInferenceJob/LanguageCode") -Or
            ($_ -eq "Start-CMPMSNOMEDCTInferenceJob/LanguageCode")
        }
        {
            $v = "en"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CMPM_map = @{
    "Filter_JobStatus"=@("Get-CMPMEntitiesDetectionV2JobList","Get-CMPMICD10CMInferenceJobList","Get-CMPMPersonalHealthInformationDetectionJobList","Get-CMPMRxNormInferenceJobList","Get-CMPMSNOMEDCTInferenceJobList")
    "LanguageCode"=@("Start-CMPMEntitiesDetectionV2Job","Start-CMPMICD10CMInferenceJob","Start-CMPMPersonalHealthInformationDetectionJob","Start-CMPMRxNormInferenceJob","Start-CMPMSNOMEDCTInferenceJob")
}

_awsArgumentCompleterRegistration $CMPM_Completers $CMPM_map

$CMPM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CMPM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CMPM_SelectMap = @{
    "Select"=@("Get-CMPMEntitiesDetectionV2Job",
               "Get-CMPMICD10CMInferenceJob",
               "Get-CMPMPersonalHealthInformationDetectionJob",
               "Get-CMPMRxNormInferenceJob",
               "Get-CMPMSNOMEDCTInferenceJob",
               "Find-CMPMMedicalEntity",
               "Find-CMPMMedicalEntityV2",
               "Find-CMPMPersonalHealthInformation",
               "Find-CMPMICD10CM",
               "Find-CMPMRxNorm",
               "Find-CMPMSNOMEDCT",
               "Get-CMPMEntitiesDetectionV2JobList",
               "Get-CMPMICD10CMInferenceJobList",
               "Get-CMPMPersonalHealthInformationDetectionJobList",
               "Get-CMPMRxNormInferenceJobList",
               "Get-CMPMSNOMEDCTInferenceJobList",
               "Start-CMPMEntitiesDetectionV2Job",
               "Start-CMPMICD10CMInferenceJob",
               "Start-CMPMPersonalHealthInformationDetectionJob",
               "Start-CMPMRxNormInferenceJob",
               "Start-CMPMSNOMEDCTInferenceJob",
               "Stop-CMPMEntitiesDetectionV2Job",
               "Stop-CMPMICD10CMInferenceJob",
               "Stop-CMPMPersonalHealthInformationDetectionJob",
               "Stop-CMPMRxNormInferenceJob",
               "Stop-CMPMSNOMEDCTInferenceJob")
}

_awsArgumentCompleterRegistration $CMPM_SelectCompleters $CMPM_SelectMap
# Argument completions for service AWS Compute Optimizer


$CO_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ComputeOptimizer.EnhancedInfrastructureMetrics
        "Write-CORecommendationPreference/EnhancedInfrastructureMetric"
        {
            $v = "Active","Inactive"
            break
        }

        # Amazon.ComputeOptimizer.ExternalMetricsSource
        "Write-CORecommendationPreference/ExternalMetricsPreference_Source"
        {
            $v = "Datadog","Dynatrace","Instana","NewRelic"
            break
        }

        # Amazon.ComputeOptimizer.FileFormat
        {
            ($_ -eq "Export-COAutoScalingGroupRecommendation/FileFormat") -Or
            ($_ -eq "Export-COEBSVolumeRecommendation/FileFormat") -Or
            ($_ -eq "Export-COEC2InstanceRecommendation/FileFormat") -Or
            ($_ -eq "Export-COECSServiceRecommendation/FileFormat") -Or
            ($_ -eq "Export-COLambdaFunctionRecommendation/FileFormat") -Or
            ($_ -eq "Export-COLicenseRecommendation/FileFormat") -Or
            ($_ -eq "Export-CORDSDatabaseRecommendation/FileFormat")
        }
        {
            $v = "Csv"
            break
        }

        # Amazon.ComputeOptimizer.InferredWorkloadTypesPreference
        "Write-CORecommendationPreference/InferredWorkloadType"
        {
            $v = "Active","Inactive"
            break
        }

        # Amazon.ComputeOptimizer.LookBackPeriodPreference
        "Write-CORecommendationPreference/LookBackPeriod"
        {
            $v = "DAYS_14","DAYS_32","DAYS_93"
            break
        }

        # Amazon.ComputeOptimizer.MetricStatistic
        {
            ($_ -eq "Get-COEC2RecommendationProjectedMetric/Stat") -Or
            ($_ -eq "Get-COECSServiceRecommendationProjectedMetric/Stat") -Or
            ($_ -eq "Get-CORDSDatabaseRecommendationProjectedMetric/Stat")
        }
        {
            $v = "Average","Maximum"
            break
        }

        # Amazon.ComputeOptimizer.ResourceType
        {
            ($_ -eq "Get-CORecommendationPreference/ResourceType") -Or
            ($_ -eq "Remove-CORecommendationPreference/ResourceType") -Or
            ($_ -eq "Write-CORecommendationPreference/ResourceType")
        }
        {
            $v = "AutoScalingGroup","EbsVolume","Ec2Instance","EcsService","LambdaFunction","License","NotApplicable","RdsDBInstance"
            break
        }

        # Amazon.ComputeOptimizer.SavingsEstimationMode
        "Write-CORecommendationPreference/SavingsEstimationMode"
        {
            $v = "AfterDiscounts","BeforeDiscounts"
            break
        }

        # Amazon.ComputeOptimizer.ScopeName
        {
            ($_ -eq "Get-CORecommendationPreference/Scope_Name") -Or
            ($_ -eq "Remove-CORecommendationPreference/Scope_Name") -Or
            ($_ -eq "Write-CORecommendationPreference/Scope_Name")
        }
        {
            $v = "AccountId","Organization","ResourceArn"
            break
        }

        # Amazon.ComputeOptimizer.Status
        "Update-COEnrollmentStatus/Status"
        {
            $v = "Active","Failed","Inactive","Pending"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CO_map = @{
    "EnhancedInfrastructureMetric"=@("Write-CORecommendationPreference")
    "ExternalMetricsPreference_Source"=@("Write-CORecommendationPreference")
    "FileFormat"=@("Export-COAutoScalingGroupRecommendation","Export-COEBSVolumeRecommendation","Export-COEC2InstanceRecommendation","Export-COECSServiceRecommendation","Export-COLambdaFunctionRecommendation","Export-COLicenseRecommendation","Export-CORDSDatabaseRecommendation")
    "InferredWorkloadType"=@("Write-CORecommendationPreference")
    "LookBackPeriod"=@("Write-CORecommendationPreference")
    "ResourceType"=@("Get-CORecommendationPreference","Remove-CORecommendationPreference","Write-CORecommendationPreference")
    "SavingsEstimationMode"=@("Write-CORecommendationPreference")
    "Scope_Name"=@("Get-CORecommendationPreference","Remove-CORecommendationPreference","Write-CORecommendationPreference")
    "Stat"=@("Get-COEC2RecommendationProjectedMetric","Get-COECSServiceRecommendationProjectedMetric","Get-CORDSDatabaseRecommendationProjectedMetric")
    "Status"=@("Update-COEnrollmentStatus")
}

_awsArgumentCompleterRegistration $CO_Completers $CO_map

$CO_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CO.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CO_SelectMap = @{
    "Select"=@("Remove-CORecommendationPreference",
               "Get-CORecommendationExportJob",
               "Export-COAutoScalingGroupRecommendation",
               "Export-COEBSVolumeRecommendation",
               "Export-COEC2InstanceRecommendation",
               "Export-COECSServiceRecommendation",
               "Export-COLambdaFunctionRecommendation",
               "Export-COLicenseRecommendation",
               "Export-CORDSDatabaseRecommendation",
               "Get-COAutoScalingGroupRecommendation",
               "Get-COEBSVolumeRecommendation",
               "Get-COEC2InstanceRecommendation",
               "Get-COEC2RecommendationProjectedMetric",
               "Get-COECSServiceRecommendationProjectedMetric",
               "Get-COECSServiceRecommendation",
               "Get-COEffectiveRecommendationPreference",
               "Get-COEnrollmentStatus",
               "Get-COEnrollmentStatusesForOrganization",
               "Get-COLambdaFunctionRecommendation",
               "Get-COLicenseRecommendation",
               "Get-CORDSDatabaseRecommendationProjectedMetric",
               "Get-CORDSDatabaseRecommendation",
               "Get-CORecommendationPreference",
               "Get-CORecommendationSummary",
               "Write-CORecommendationPreference",
               "Update-COEnrollmentStatus")
}

_awsArgumentCompleterRegistration $CO_SelectCompleters $CO_SelectMap
# Argument completions for service AWS Config


$CFG_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ConfigService.AggregateConformancePackComplianceSummaryGroupKey
        "Get-CFGAggregateConformancePackComplianceSummary/GroupByKey"
        {
            $v = "ACCOUNT_ID","AWS_REGION"
            break
        }

        # Amazon.ConfigService.ChronologicalOrder
        "Get-CFGResourceConfigHistory/ChronologicalOrder"
        {
            $v = "Forward","Reverse"
            break
        }

        # Amazon.ConfigService.ComplianceType
        {
            ($_ -eq "Get-CFGAggregateComplianceDetailsByConfigRule/ComplianceType") -Or
            ($_ -eq "Write-CFGExternalEvaluation/ExternalEvaluation_ComplianceType") -Or
            ($_ -eq "Get-CFGAggregateComplianceByConfigRuleList/Filters_ComplianceType")
        }
        {
            $v = "COMPLIANT","INSUFFICIENT_DATA","NON_COMPLIANT","NOT_APPLICABLE"
            break
        }

        # Amazon.ConfigService.ConfigRuleComplianceSummaryGroupKey
        "Get-CFGAggregateConfigRuleComplianceSummary/GroupByKey"
        {
            $v = "ACCOUNT_ID","AWS_REGION"
            break
        }

        # Amazon.ConfigService.ConfigRuleState
        "Write-CFGConfigRule/ConfigRule_ConfigRuleState"
        {
            $v = "ACTIVE","DELETING","DELETING_RESULTS","EVALUATING"
            break
        }

        # Amazon.ConfigService.ConformancePackComplianceType
        {
            ($_ -eq "Get-CFGAggregateComplianceByConformancePack/Filters_ComplianceType") -Or
            ($_ -eq "Get-CFGConformancePackCompliance/Filters_ComplianceType") -Or
            ($_ -eq "Get-CFGConformancePackComplianceDetail/Filters_ComplianceType")
        }
        {
            $v = "COMPLIANT","INSUFFICIENT_DATA","NON_COMPLIANT"
            break
        }

        # Amazon.ConfigService.EvaluationMode
        {
            ($_ -eq "Start-CFGResourceEvaluation/EvaluationMode") -Or
            ($_ -eq "Get-CFGConfigRule/Filters_EvaluationMode") -Or
            ($_ -eq "Get-CFGResourceEvaluationList/Filters_EvaluationMode")
        }
        {
            $v = "DETECTIVE","PROACTIVE"
            break
        }

        # Amazon.ConfigService.MaximumExecutionFrequency
        {
            ($_ -eq "Write-CFGConfigRule/ConfigRule_MaximumExecutionFrequency") -Or
            ($_ -eq "Write-CFGDeliveryChannel/ConfigSnapshotDeliveryProperties_DeliveryFrequency") -Or
            ($_ -eq "Write-CFGOrganizationConfigRule/OrganizationCustomPolicyRuleMetadata_MaximumExecutionFrequency") -Or
            ($_ -eq "Write-CFGOrganizationConfigRule/OrganizationCustomRuleMetadata_MaximumExecutionFrequency") -Or
            ($_ -eq "Write-CFGOrganizationConfigRule/OrganizationManagedRuleMetadata_MaximumExecutionFrequency")
        }
        {
            $v = "One_Hour","Six_Hours","Three_Hours","Twelve_Hours","TwentyFour_Hours"
            break
        }

        # Amazon.ConfigService.MemberAccountRuleStatus
        "Get-CFGOrganizationConfigRuleDetailedStatus/Filters_MemberAccountRuleStatus"
        {
            $v = "CREATE_FAILED","CREATE_IN_PROGRESS","CREATE_SUCCESSFUL","DELETE_FAILED","DELETE_IN_PROGRESS","DELETE_SUCCESSFUL","UPDATE_FAILED","UPDATE_IN_PROGRESS","UPDATE_SUCCESSFUL"
            break
        }

        # Amazon.ConfigService.OrganizationResourceDetailedStatus
        "Get-CFGOrganizationConformancePackDetailedStatus/Filters_Status"
        {
            $v = "CREATE_FAILED","CREATE_IN_PROGRESS","CREATE_SUCCESSFUL","DELETE_FAILED","DELETE_IN_PROGRESS","DELETE_SUCCESSFUL","UPDATE_FAILED","UPDATE_IN_PROGRESS","UPDATE_SUCCESSFUL"
            break
        }

        # Amazon.ConfigService.Owner
        "Write-CFGConfigRule/Source_Owner"
        {
            $v = "AWS","CUSTOM_LAMBDA","CUSTOM_POLICY"
            break
        }

        # Amazon.ConfigService.RecordingFrequency
        "Write-CFGConfigurationRecorder/RecordingMode_RecordingFrequency"
        {
            $v = "CONTINUOUS","DAILY"
            break
        }

        # Amazon.ConfigService.RecordingStrategyType
        "Write-CFGConfigurationRecorder/RecordingStrategy_UseOnly"
        {
            $v = "ALL_SUPPORTED_RESOURCE_TYPES","EXCLUSION_BY_RESOURCE_TYPES","INCLUSION_BY_RESOURCE_TYPES"
            break
        }

        # Amazon.ConfigService.ResourceConfigurationSchemaType
        "Start-CFGResourceEvaluation/ResourceDetails_ResourceConfigurationSchemaType"
        {
            $v = "CFN_RESOURCE_SCHEMA"
            break
        }

        # Amazon.ConfigService.ResourceCountGroupKey
        "Get-CFGAggregateDiscoveredResourceCount/GroupByKey"
        {
            $v = "ACCOUNT_ID","AWS_REGION","RESOURCE_TYPE"
            break
        }

        # Amazon.ConfigService.ResourceType
        {
            ($_ -eq "Get-CFGAggregateDiscoveredResourceCount/Filters_ResourceType") -Or
            ($_ -eq "Get-CFGAggregateResourceConfig/ResourceIdentifier_ResourceType") -Or
            ($_ -eq "Get-CFGAggregateDiscoveredResourceList/ResourceType") -Or
            ($_ -eq "Get-CFGDiscoveredResource/ResourceType") -Or
            ($_ -eq "Get-CFGResourceConfigHistory/ResourceType")
        }
        {
            $v = "AWS::AccessAnalyzer::Analyzer","AWS::ACM::Certificate","AWS::ACMPCA::CertificateAuthority","AWS::ACMPCA::CertificateAuthorityActivation","AWS::AmazonMQ::Broker","AWS::Amplify::App","AWS::Amplify::Branch","AWS::ApiGateway::RestApi","AWS::ApiGateway::Stage","AWS::ApiGatewayV2::Api","AWS::ApiGatewayV2::Stage","AWS::AppConfig::Application","AWS::AppConfig::ConfigurationProfile","AWS::AppConfig::DeploymentStrategy","AWS::AppConfig::Environment","AWS::AppConfig::HostedConfigurationVersion","AWS::AppFlow::Flow","AWS::AppIntegrations::EventIntegration","AWS::AppMesh::GatewayRoute","AWS::AppMesh::Mesh","AWS::AppMesh::Route","AWS::AppMesh::VirtualGateway","AWS::AppMesh::VirtualNode","AWS::AppMesh::VirtualRouter","AWS::AppMesh::VirtualService","AWS::AppRunner::Service","AWS::AppRunner::VpcConnector","AWS::AppStream::Application","AWS::AppStream::DirectoryConfig","AWS::AppStream::Fleet","AWS::AppStream::Stack","AWS::AppSync::GraphQLApi","AWS::APS::RuleGroupsNamespace","AWS::Athena::DataCatalog","AWS::Athena::PreparedStatement","AWS::Athena::WorkGroup","AWS::AuditManager::Assessment","AWS::AutoScaling::AutoScalingGroup","AWS::AutoScaling::LaunchConfiguration","AWS::AutoScaling::ScalingPolicy","AWS::AutoScaling::ScheduledAction","AWS::AutoScaling::WarmPool","AWS::Backup::BackupPlan","AWS::Backup::BackupSelection","AWS::Backup::BackupVault","AWS::Backup::RecoveryPoint","AWS::Backup::ReportPlan","AWS::Batch::ComputeEnvironment","AWS::Batch::JobQueue","AWS::Batch::SchedulingPolicy","AWS::Budgets::BudgetsAction","AWS::Cassandra::Keyspace","AWS::Cloud9::EnvironmentEC2","AWS::CloudFormation::Stack","AWS::CloudFront::Distribution","AWS::CloudFront::StreamingDistribution","AWS::CloudTrail::Trail","AWS::CloudWatch::Alarm","AWS::CloudWatch::MetricStream","AWS::CodeArtifact::Repository","AWS::CodeBuild::Project","AWS::CodeBuild::ReportGroup","AWS::CodeDeploy::Application","AWS::CodeDeploy::DeploymentConfig","AWS::CodeDeploy::DeploymentGroup","AWS::CodeGuruProfiler::ProfilingGroup","AWS::CodeGuruReviewer::RepositoryAssociation","AWS::CodePipeline::Pipeline","AWS::Cognito::UserPool","AWS::Cognito::UserPoolClient","AWS::Cognito::UserPoolGroup","AWS::Config::ConformancePackCompliance","AWS::Config::ResourceCompliance","AWS::Connect::Instance","AWS::Connect::PhoneNumber","AWS::Connect::QuickConnect","AWS::CustomerProfiles::Domain","AWS::CustomerProfiles::ObjectType","AWS::DataSync::LocationEFS","AWS::DataSync::LocationFSxLustre","AWS::DataSync::LocationFSxWindows","AWS::DataSync::LocationHDFS","AWS::DataSync::LocationNFS","AWS::DataSync::LocationObjectStorage","AWS::DataSync::LocationS3","AWS::DataSync::LocationSMB","AWS::DataSync::Task","AWS::Detective::Graph","AWS::DeviceFarm::InstanceProfile","AWS::DeviceFarm::Project","AWS::DeviceFarm::TestGridProject","AWS::DMS::Certificate","AWS::DMS::Endpoint","AWS::DMS::EventSubscription","AWS::DMS::ReplicationSubnetGroup","AWS::DynamoDB::Table","AWS::EC2::CapacityReservation","AWS::EC2::CarrierGateway","AWS::EC2::ClientVpnEndpoint","AWS::EC2::CustomerGateway","AWS::EC2::DHCPOptions","AWS::EC2::EC2Fleet","AWS::EC2::EgressOnlyInternetGateway","AWS::EC2::EIP","AWS::EC2::FlowLog","AWS::EC2::Host","AWS::EC2::Instance","AWS::EC2::InternetGateway","AWS::EC2::IPAM","AWS::EC2::IPAMPool","AWS::EC2::IPAMScope","AWS::EC2::LaunchTemplate","AWS::EC2::NatGateway","AWS::EC2::NetworkAcl","AWS::EC2::NetworkInsightsAccessScope","AWS::EC2::NetworkInsightsAccessScopeAnalysis","AWS::EC2::NetworkInsightsAnalysis","AWS::EC2::NetworkInsightsPath","AWS::EC2::NetworkInterface","AWS::EC2::PrefixList","AWS::EC2::RegisteredHAInstance","AWS::EC2::RouteTable","AWS::EC2::SecurityGroup","AWS::EC2::SpotFleet","AWS::EC2::Subnet","AWS::EC2::SubnetRouteTableAssociation","AWS::EC2::TrafficMirrorFilter","AWS::EC2::TrafficMirrorSession","AWS::EC2::TrafficMirrorTarget","AWS::EC2::TransitGateway","AWS::EC2::TransitGatewayAttachment","AWS::EC2::TransitGatewayConnect","AWS::EC2::TransitGatewayMulticastDomain","AWS::EC2::TransitGatewayRouteTable","AWS::EC2::Volume","AWS::EC2::VPC","AWS::EC2::VPCEndpoint","AWS::EC2::VPCEndpointService","AWS::EC2::VPCPeeringConnection","AWS::EC2::VPNConnection","AWS::EC2::VPNGateway","AWS::ECR::PublicRepository","AWS::ECR::PullThroughCacheRule","AWS::ECR::RegistryPolicy","AWS::ECR::Repository","AWS::ECS::CapacityProvider","AWS::ECS::Cluster","AWS::ECS::Service","AWS::ECS::TaskDefinition","AWS::ECS::TaskSet","AWS::EFS::AccessPoint","AWS::EFS::FileSystem","AWS::EKS::Addon","AWS::EKS::Cluster","AWS::EKS::FargateProfile","AWS::EKS::IdentityProviderConfig","AWS::ElasticBeanstalk::Application","AWS::ElasticBeanstalk::ApplicationVersion","AWS::ElasticBeanstalk::Environment","AWS::ElasticLoadBalancing::LoadBalancer","AWS::ElasticLoadBalancingV2::Listener","AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::Elasticsearch::Domain","AWS::EMR::SecurityConfiguration","AWS::Events::ApiDestination","AWS::Events::Archive","AWS::Events::Connection","AWS::Events::Endpoint","AWS::Events::EventBus","AWS::Events::Rule","AWS::EventSchemas::Discoverer","AWS::EventSchemas::Registry","AWS::EventSchemas::RegistryPolicy","AWS::EventSchemas::Schema","AWS::Evidently::Launch","AWS::Evidently::Project","AWS::FIS::ExperimentTemplate","AWS::Forecast::Dataset","AWS::Forecast::DatasetGroup","AWS::FraudDetector::EntityType","AWS::FraudDetector::Label","AWS::FraudDetector::Outcome","AWS::FraudDetector::Variable","AWS::GlobalAccelerator::Accelerator","AWS::GlobalAccelerator::EndpointGroup","AWS::GlobalAccelerator::Listener","AWS::Glue::Classifier","AWS::Glue::Job","AWS::Glue::MLTransform","AWS::Grafana::Workspace","AWS::GreengrassV2::ComponentVersion","AWS::GroundStation::Config","AWS::GroundStation::DataflowEndpointGroup","AWS::GroundStation::MissionProfile","AWS::GuardDuty::Detector","AWS::GuardDuty::Filter","AWS::GuardDuty::IPSet","AWS::GuardDuty::ThreatIntelSet","AWS::HealthLake::FHIRDatastore","AWS::IAM::Group","AWS::IAM::InstanceProfile","AWS::IAM::Policy","AWS::IAM::Role","AWS::IAM::SAMLProvider","AWS::IAM::ServerCertificate","AWS::IAM::User","AWS::ImageBuilder::ContainerRecipe","AWS::ImageBuilder::DistributionConfiguration","AWS::ImageBuilder::ImagePipeline","AWS::ImageBuilder::ImageRecipe","AWS::ImageBuilder::InfrastructureConfiguration","AWS::InspectorV2::Filter","AWS::IoT::AccountAuditConfiguration","AWS::IoT::Authorizer","AWS::IoT::CACertificate","AWS::IoT::CustomMetric","AWS::IoT::Dimension","AWS::IoT::FleetMetric","AWS::IoT::JobTemplate","AWS::IoT::MitigationAction","AWS::IoT::Policy","AWS::IoT::ProvisioningTemplate","AWS::IoT::RoleAlias","AWS::IoT::ScheduledAudit","AWS::IoT::SecurityProfile","AWS::IoTAnalytics::Channel","AWS::IoTAnalytics::Dataset","AWS::IoTAnalytics::Datastore","AWS::IoTAnalytics::Pipeline","AWS::IoTEvents::AlarmModel","AWS::IoTEvents::DetectorModel","AWS::IoTEvents::Input","AWS::IoTSiteWise::AssetModel","AWS::IoTSiteWise::Dashboard","AWS::IoTSiteWise::Gateway","AWS::IoTSiteWise::Portal","AWS::IoTSiteWise::Project","AWS::IoTTwinMaker::ComponentType","AWS::IoTTwinMaker::Entity","AWS::IoTTwinMaker::Scene","AWS::IoTTwinMaker::SyncJob","AWS::IoTTwinMaker::Workspace","AWS::IoTWireless::FuotaTask","AWS::IoTWireless::MulticastGroup","AWS::IoTWireless::ServiceProfile","AWS::IVS::Channel","AWS::IVS::PlaybackKeyPair","AWS::IVS::RecordingConfiguration","AWS::KafkaConnect::Connector","AWS::Kendra::Index","AWS::Kinesis::Stream","AWS::Kinesis::StreamConsumer","AWS::KinesisAnalyticsV2::Application","AWS::KinesisFirehose::DeliveryStream","AWS::KinesisVideo::SignalingChannel","AWS::KinesisVideo::Stream","AWS::KMS::Alias","AWS::KMS::Key","AWS::Lambda::CodeSigningConfig","AWS::Lambda::Function","AWS::Lex::Bot","AWS::Lex::BotAlias","AWS::Lightsail::Bucket","AWS::Lightsail::Certificate","AWS::Lightsail::Disk","AWS::Lightsail::StaticIp","AWS::Logs::Destination","AWS::LookoutMetrics::Alert","AWS::LookoutVision::Project","AWS::M2::Environment","AWS::MediaConnect::FlowEntitlement","AWS::MediaConnect::FlowSource","AWS::MediaConnect::FlowVpcInterface","AWS::MediaPackage::PackagingConfiguration","AWS::MediaPackage::PackagingGroup","AWS::MediaTailor::PlaybackConfiguration","AWS::MSK::BatchScramSecret","AWS::MSK::Cluster","AWS::MSK::Configuration","AWS::NetworkFirewall::Firewall","AWS::NetworkFirewall::FirewallPolicy","AWS::NetworkFirewall::RuleGroup","AWS::NetworkManager::ConnectPeer","AWS::NetworkManager::CustomerGatewayAssociation","AWS::NetworkManager::Device","AWS::NetworkManager::GlobalNetwork","AWS::NetworkManager::Link","AWS::NetworkManager::LinkAssociation","AWS::NetworkManager::Site","AWS::NetworkManager::TransitGatewayRegistration","AWS::OpenSearch::Domain","AWS::Panorama::Package","AWS::Personalize::Dataset","AWS::Personalize::DatasetGroup","AWS::Personalize::Schema","AWS::Personalize::Solution","AWS::Pinpoint::App","AWS::Pinpoint::ApplicationSettings","AWS::Pinpoint::Campaign","AWS::Pinpoint::EmailChannel","AWS::Pinpoint::EmailTemplate","AWS::Pinpoint::EventStream","AWS::Pinpoint::InAppTemplate","AWS::Pinpoint::Segment","AWS::QLDB::Ledger","AWS::QuickSight::DataSource","AWS::QuickSight::Template","AWS::QuickSight::Theme","AWS::RDS::DBCluster","AWS::RDS::DBClusterSnapshot","AWS::RDS::DBInstance","AWS::RDS::DBSecurityGroup","AWS::RDS::DBSnapshot","AWS::RDS::DBSubnetGroup","AWS::RDS::EventSubscription","AWS::RDS::GlobalCluster","AWS::RDS::OptionGroup","AWS::Redshift::Cluster","AWS::Redshift::ClusterParameterGroup","AWS::Redshift::ClusterSecurityGroup","AWS::Redshift::ClusterSnapshot","AWS::Redshift::ClusterSubnetGroup","AWS::Redshift::EndpointAccess","AWS::Redshift::EventSubscription","AWS::Redshift::ScheduledAction","AWS::ResilienceHub::App","AWS::ResilienceHub::ResiliencyPolicy","AWS::ResourceExplorer2::Index","AWS::RoboMaker::RobotApplication","AWS::RoboMaker::RobotApplicationVersion","AWS::RoboMaker::SimulationApplication","AWS::Route53::HostedZone","AWS::Route53RecoveryControl::Cluster","AWS::Route53RecoveryControl::ControlPanel","AWS::Route53RecoveryControl::RoutingControl","AWS::Route53RecoveryControl::SafetyRule","AWS::Route53RecoveryReadiness::Cell","AWS::Route53RecoveryReadiness::ReadinessCheck","AWS::Route53RecoveryReadiness::RecoveryGroup","AWS::Route53RecoveryReadiness::ResourceSet","AWS::Route53Resolver::FirewallDomainList","AWS::Route53Resolver::FirewallRuleGroup","AWS::Route53Resolver::FirewallRuleGroupAssociation","AWS::Route53Resolver::ResolverEndpoint","AWS::Route53Resolver::ResolverQueryLoggingConfig","AWS::Route53Resolver::ResolverQueryLoggingConfigAssociation","AWS::Route53Resolver::ResolverRule","AWS::Route53Resolver::ResolverRuleAssociation","AWS::RUM::AppMonitor","AWS::S3::AccessPoint","AWS::S3::AccountPublicAccessBlock","AWS::S3::Bucket","AWS::S3::MultiRegionAccessPoint","AWS::S3::StorageLens","AWS::SageMaker::AppImageConfig","AWS::SageMaker::CodeRepository","AWS::SageMaker::Domain","AWS::SageMaker::FeatureGroup","AWS::SageMaker::Image","AWS::SageMaker::Model","AWS::SageMaker::NotebookInstanceLifecycleConfig","AWS::SageMaker::Workteam","AWS::SecretsManager::Secret","AWS::ServiceCatalog::CloudFormationProduct","AWS::ServiceCatalog::CloudFormationProvisionedProduct","AWS::ServiceCatalog::Portfolio","AWS::ServiceDiscovery::HttpNamespace","AWS::ServiceDiscovery::Instance","AWS::ServiceDiscovery::PublicDnsNamespace","AWS::ServiceDiscovery::Service","AWS::SES::ConfigurationSet","AWS::SES::ContactList","AWS::SES::ReceiptFilter","AWS::SES::ReceiptRuleSet","AWS::SES::Template","AWS::Shield::Protection","AWS::ShieldRegional::Protection","AWS::Signer::SigningProfile","AWS::SNS::Topic","AWS::SQS::Queue","AWS::SSM::AssociationCompliance","AWS::SSM::Document","AWS::SSM::FileData","AWS::SSM::ManagedInstanceInventory","AWS::SSM::PatchCompliance","AWS::StepFunctions::Activity","AWS::StepFunctions::StateMachine","AWS::Transfer::Agreement","AWS::Transfer::Certificate","AWS::Transfer::Connector","AWS::Transfer::Workflow","AWS::WAF::RateBasedRule","AWS::WAF::Rule","AWS::WAF::RuleGroup","AWS::WAF::WebACL","AWS::WAFRegional::RateBasedRule","AWS::WAFRegional::Rule","AWS::WAFRegional::RuleGroup","AWS::WAFRegional::WebACL","AWS::WAFv2::IPSet","AWS::WAFv2::ManagedRuleSet","AWS::WAFv2::RegexPatternSet","AWS::WAFv2::RuleGroup","AWS::WAFv2::WebACL","AWS::WorkSpaces::ConnectionAlias","AWS::WorkSpaces::Workspace","AWS::XRay::EncryptionConfig"
            break
        }

        # Amazon.ConfigService.SortBy
        "Get-CFGConformancePackComplianceScoreList/SortBy"
        {
            $v = "SCORE"
            break
        }

        # Amazon.ConfigService.SortOrder
        "Get-CFGConformancePackComplianceScoreList/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CFG_map = @{
    "ChronologicalOrder"=@("Get-CFGResourceConfigHistory")
    "ComplianceType"=@("Get-CFGAggregateComplianceDetailsByConfigRule")
    "ConfigRule_ConfigRuleState"=@("Write-CFGConfigRule")
    "ConfigRule_MaximumExecutionFrequency"=@("Write-CFGConfigRule")
    "ConfigSnapshotDeliveryProperties_DeliveryFrequency"=@("Write-CFGDeliveryChannel")
    "EvaluationMode"=@("Start-CFGResourceEvaluation")
    "ExternalEvaluation_ComplianceType"=@("Write-CFGExternalEvaluation")
    "Filters_ComplianceType"=@("Get-CFGAggregateComplianceByConfigRuleList","Get-CFGAggregateComplianceByConformancePack","Get-CFGConformancePackCompliance","Get-CFGConformancePackComplianceDetail")
    "Filters_EvaluationMode"=@("Get-CFGConfigRule","Get-CFGResourceEvaluationList")
    "Filters_MemberAccountRuleStatus"=@("Get-CFGOrganizationConfigRuleDetailedStatus")
    "Filters_ResourceType"=@("Get-CFGAggregateDiscoveredResourceCount")
    "Filters_Status"=@("Get-CFGOrganizationConformancePackDetailedStatus")
    "GroupByKey"=@("Get-CFGAggregateConfigRuleComplianceSummary","Get-CFGAggregateConformancePackComplianceSummary","Get-CFGAggregateDiscoveredResourceCount")
    "OrganizationCustomPolicyRuleMetadata_MaximumExecutionFrequency"=@("Write-CFGOrganizationConfigRule")
    "OrganizationCustomRuleMetadata_MaximumExecutionFrequency"=@("Write-CFGOrganizationConfigRule")
    "OrganizationManagedRuleMetadata_MaximumExecutionFrequency"=@("Write-CFGOrganizationConfigRule")
    "RecordingMode_RecordingFrequency"=@("Write-CFGConfigurationRecorder")
    "RecordingStrategy_UseOnly"=@("Write-CFGConfigurationRecorder")
    "ResourceDetails_ResourceConfigurationSchemaType"=@("Start-CFGResourceEvaluation")
    "ResourceIdentifier_ResourceType"=@("Get-CFGAggregateResourceConfig")
    "ResourceType"=@("Get-CFGAggregateDiscoveredResourceList","Get-CFGDiscoveredResource","Get-CFGResourceConfigHistory")
    "SortBy"=@("Get-CFGConformancePackComplianceScoreList")
    "SortOrder"=@("Get-CFGConformancePackComplianceScoreList")
    "Source_Owner"=@("Write-CFGConfigRule")
}

_awsArgumentCompleterRegistration $CFG_Completers $CFG_map

$CFG_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CFG.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CFG_SelectMap = @{
    "Select"=@("Get-CFGAggregateResourceConfigBatch",
               "Get-CFGGetResourceConfigBatch",
               "Remove-CFGAggregationAuthorization",
               "Remove-CFGConfigRule",
               "Remove-CFGConfigurationAggregator",
               "Remove-CFGConfigurationRecorder",
               "Remove-CFGConformancePack",
               "Remove-CFGDeliveryChannel",
               "Remove-CFGEvaluationResult",
               "Remove-CFGOrganizationConfigRule",
               "Remove-CFGOrganizationConformancePack",
               "Remove-CFGPendingAggregationRequest",
               "Remove-CFGRemediationConfiguration",
               "Remove-CFGRemediationException",
               "Remove-CFGResourceConfig",
               "Remove-CFGRetentionConfiguration",
               "Remove-CFGStoredQuery",
               "Submit-CFGConfigSnapshotDelivery",
               "Get-CFGAggregateComplianceByConfigRuleList",
               "Get-CFGAggregateComplianceByConformancePack",
               "Get-CFGAggregationAuthorizationList",
               "Get-CFGComplianceByConfigRule",
               "Get-CFGComplianceByResource",
               "Get-CFGConfigRuleEvaluationStatus",
               "Get-CFGConfigRule",
               "Get-CFGConfigurationAggregatorList",
               "Get-CFGConfigurationAggregatorSourcesStatus",
               "Get-CFGConfigurationRecorder",
               "Get-CFGConfigurationRecorderStatus",
               "Get-CFGConformancePackCompliance",
               "Get-CFGConformancePack",
               "Get-CFGConformancePackStatus",
               "Get-CFGDeliveryChannel",
               "Get-CFGDeliveryChannelStatus",
               "Get-CFGOrganizationConfigRule",
               "Get-CFGOrganizationConfigRuleStatus",
               "Get-CFGOrganizationConformancePack",
               "Get-CFGOrganizationConformancePackStatus",
               "Get-CFGPendingAggregationRequestList",
               "Get-CFGRemediationConfiguration",
               "Get-CFGRemediationException",
               "Get-CFGRemediationExecutionStatus",
               "Get-CFGRetentionConfiguration",
               "Get-CFGAggregateComplianceDetailsByConfigRule",
               "Get-CFGAggregateConfigRuleComplianceSummary",
               "Get-CFGAggregateConformancePackComplianceSummary",
               "Get-CFGAggregateDiscoveredResourceCount",
               "Get-CFGAggregateResourceConfig",
               "Get-CFGComplianceDetailsByConfigRule",
               "Get-CFGComplianceDetailsByResource",
               "Get-CFGComplianceSummaryByConfigRule",
               "Get-CFGComplianceSummaryByResourceType",
               "Get-CFGConformancePackComplianceDetail",
               "Get-CFGConformancePackComplianceSummary",
               "Get-CFGCustomRulePolicy",
               "Get-CFGDiscoveredResourceCount",
               "Get-CFGOrganizationConfigRuleDetailedStatus",
               "Get-CFGOrganizationConformancePackDetailedStatus",
               "Get-CFGOrganizationCustomRulePolicy",
               "Get-CFGResourceConfigHistory",
               "Get-CFGResourceEvaluationSummary",
               "Get-CFGStoredQuery",
               "Get-CFGAggregateDiscoveredResourceList",
               "Get-CFGConformancePackComplianceScoreList",
               "Get-CFGDiscoveredResource",
               "Get-CFGResourceEvaluationList",
               "Get-CFGStoredQueryList",
               "Get-CFGResourceTag",
               "Write-CFGAggregationAuthorization",
               "Write-CFGConfigRule",
               "Write-CFGConfigurationAggregator",
               "Write-CFGConfigurationRecorder",
               "Write-CFGConformancePack",
               "Write-CFGDeliveryChannel",
               "Write-CFGEvaluation",
               "Write-CFGExternalEvaluation",
               "Write-CFGOrganizationConfigRule",
               "Write-CFGOrganizationConformancePack",
               "Write-CFGRemediationConfiguration",
               "Write-CFGRemediationException",
               "Write-CFGResourceConfig",
               "Write-CFGRetentionConfiguration",
               "Write-CFGStoredQuery",
               "Select-CFGAggregateResourceConfig",
               "Select-CFGResourceConfig",
               "Start-CFGConfigRulesEvaluation",
               "Start-CFGConfigurationRecorder",
               "Start-CFGRemediationExecution",
               "Start-CFGResourceEvaluation",
               "Stop-CFGConfigurationRecorder",
               "Add-CFGResourceTag",
               "Remove-CFGResourceTag")
}

_awsArgumentCompleterRegistration $CFG_SelectCompleters $CFG_SelectMap
# Argument completions for service Amazon Connect Service


$CONN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Connect.AgentAvailabilityTimer
        {
            ($_ -eq "New-CONNRoutingProfile/AgentAvailabilityTimer") -Or
            ($_ -eq "Update-CONNRoutingProfileAgentAvailabilityTimer/AgentAvailabilityTimer")
        }
        {
            $v = "TIME_SINCE_LAST_ACTIVITY","TIME_SINCE_LAST_INBOUND"
            break
        }

        # Amazon.Connect.AgentStatusState
        {
            ($_ -eq "New-CONNAgentStatus/State") -Or
            ($_ -eq "Update-CONNAgentStatus/State")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Connect.ChatEventType
        "Send-CONNChatIntegrationEvent/Event_Type"
        {
            $v = "DISCONNECT","EVENT","MESSAGE"
            break
        }

        # Amazon.Connect.ContactFlowModuleState
        {
            ($_ -eq "Get-CONNContactFlowModuleList/ContactFlowModuleState") -Or
            ($_ -eq "Update-CONNContactFlowModuleMetadata/State")
        }
        {
            $v = "ACTIVE","ARCHIVED"
            break
        }

        # Amazon.Connect.ContactFlowState
        {
            ($_ -eq "Update-CONNContactFlowMetadata/ContactFlowState") -Or
            ($_ -eq "Search-CONNContactFlow/SearchCriteria_StateCondition")
        }
        {
            $v = "ACTIVE","ARCHIVED"
            break
        }

        # Amazon.Connect.ContactFlowStatus
        {
            ($_ -eq "Search-CONNContactFlow/SearchCriteria_StatusCondition") -Or
            ($_ -eq "New-CONNContactFlow/Status")
        }
        {
            $v = "PUBLISHED","SAVED"
            break
        }

        # Amazon.Connect.ContactFlowType
        {
            ($_ -eq "Search-CONNContactFlow/SearchCriteria_TypeCondition") -Or
            ($_ -eq "New-CONNContactFlow/Type")
        }
        {
            $v = "AGENT_HOLD","AGENT_TRANSFER","AGENT_WHISPER","CONTACT_FLOW","CUSTOMER_HOLD","CUSTOMER_QUEUE","CUSTOMER_WHISPER","OUTBOUND_WHISPER","QUEUE_TRANSFER"
            break
        }

        # Amazon.Connect.DirectoryType
        "New-CONNInstance/IdentityManagementType"
        {
            $v = "CONNECT_MANAGED","EXISTING_DIRECTORY","SAML"
            break
        }

        # Amazon.Connect.EncryptionType
        {
            ($_ -eq "Add-CONNInstanceStorageConfig/StorageConfigKinesisVideoStreamConfigEncryptionConfigEncryptionType") -Or
            ($_ -eq "Update-CONNInstanceStorageConfig/StorageConfigKinesisVideoStreamConfigEncryptionConfigEncryptionType") -Or
            ($_ -eq "Add-CONNInstanceStorageConfig/StorageConfigS3ConfigEncryptionConfigEncryptionType") -Or
            ($_ -eq "Update-CONNInstanceStorageConfig/StorageConfigS3ConfigEncryptionConfigEncryptionType")
        }
        {
            $v = "KMS"
            break
        }

        # Amazon.Connect.EndpointType
        {
            ($_ -eq "Start-CONNOutboundChatContact/DestinationEndpoint_Type") -Or
            ($_ -eq "Start-CONNOutboundChatContact/SourceEndpoint_Type")
        }
        {
            $v = "CONNECT_PHONENUMBER_ARN","CONTACT_FLOW","TELEPHONE_NUMBER","VOIP"
            break
        }

        # Amazon.Connect.EvaluationFormScoringMode
        {
            ($_ -eq "New-CONNEvaluationForm/ScoringStrategy_Mode") -Or
            ($_ -eq "Update-CONNEvaluationForm/ScoringStrategy_Mode")
        }
        {
            $v = "QUESTION_ONLY","SECTION_ONLY"
            break
        }

        # Amazon.Connect.EvaluationFormScoringStatus
        {
            ($_ -eq "New-CONNEvaluationForm/ScoringStrategy_Status") -Or
            ($_ -eq "Update-CONNEvaluationForm/ScoringStrategy_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Connect.EventSourceName
        {
            ($_ -eq "Get-CONNRuleList/EventSourceName") -Or
            ($_ -eq "New-CONNRule/TriggerEventSource_EventSourceName")
        }
        {
            $v = "OnCaseCreate","OnCaseUpdate","OnContactEvaluationSubmit","OnMetricDataUpdate","OnPostCallAnalysisAvailable","OnPostChatAnalysisAvailable","OnRealTimeCallAnalysisAvailable","OnRealTimeChatAnalysisAvailable","OnSalesforceCaseCreate","OnZendeskTicketCreate","OnZendeskTicketStatusUpdate"
            break
        }

        # Amazon.Connect.FileUseCaseType
        "Start-CONNAttachedFileUpload/FileUseCaseType"
        {
            $v = "ATTACHMENT"
            break
        }

        # Amazon.Connect.FlowAssociationResourceType
        {
            ($_ -eq "Add-CONNFlow/ResourceType") -Or
            ($_ -eq "Get-CONNFlowAssociation/ResourceType") -Or
            ($_ -eq "Remove-CONNFlow/ResourceType")
        }
        {
            $v = "SMS_PHONE_NUMBER"
            break
        }

        # Amazon.Connect.HierarchyGroupMatchType
        {
            ($_ -eq "Search-CONNUser/HierarchyGroupCondition_HierarchyGroupMatchType") -Or
            ($_ -eq "Search-CONNUser/SearchFilter_UserAttributeFilter_AndCondition_HierarchyGroupCondition_HierarchyGroupMatchType") -Or
            ($_ -eq "Search-CONNUser/SearchFilter_UserAttributeFilter_HierarchyGroupCondition_HierarchyGroupMatchType")
        }
        {
            $v = "EXACT","WITH_CHILD_GROUPS"
            break
        }

        # Amazon.Connect.InstanceAttributeType
        {
            ($_ -eq "Get-CONNInstanceAttribute/AttributeType") -Or
            ($_ -eq "Update-CONNInstanceAttribute/AttributeType")
        }
        {
            $v = "AUTO_RESOLVE_BEST_VOICES","CONTACTFLOW_LOGS","CONTACT_LENS","EARLY_MEDIA","ENHANCED_CHAT_MONITORING","ENHANCED_CONTACT_MONITORING","HIGH_VOLUME_OUTBOUND","INBOUND_CALLS","MULTI_PARTY_CONFERENCE","OUTBOUND_CALLS","USE_CUSTOM_TTS_VOICES"
            break
        }

        # Amazon.Connect.InstanceStorageResourceType
        {
            ($_ -eq "Add-CONNInstanceStorageConfig/ResourceType") -Or
            ($_ -eq "Get-CONNInstanceStorageConfig/ResourceType") -Or
            ($_ -eq "Get-CONNInstanceStorageConfigList/ResourceType") -Or
            ($_ -eq "Remove-CONNInstanceStorageConfig/ResourceType") -Or
            ($_ -eq "Update-CONNInstanceStorageConfig/ResourceType")
        }
        {
            $v = "AGENT_EVENTS","ATTACHMENTS","CALL_RECORDINGS","CHAT_TRANSCRIPTS","CONTACT_EVALUATIONS","CONTACT_TRACE_RECORDS","MEDIA_STREAMS","REAL_TIME_CONTACT_ANALYSIS_CHAT_SEGMENTS","REAL_TIME_CONTACT_ANALYSIS_SEGMENTS","REAL_TIME_CONTACT_ANALYSIS_VOICE_SEGMENTS","SCHEDULED_REPORTS","SCREEN_RECORDINGS"
            break
        }

        # Amazon.Connect.IntegrationType
        {
            ($_ -eq "Get-CONNIntegrationAssociationList/IntegrationType") -Or
            ($_ -eq "New-CONNIntegrationAssociation/IntegrationType")
        }
        {
            $v = "APPLICATION","CASES_DOMAIN","EVENT","FILE_SCANNER","PINPOINT_APP","VOICE_ID","WISDOM_ASSISTANT","WISDOM_KNOWLEDGE_BASE","WISDOM_QUICK_RESPONSES"
            break
        }

        # Amazon.Connect.IntervalPeriod
        "Get-CONNMetricDataV2/Interval_IntervalPeriod"
        {
            $v = "DAY","FIFTEEN_MIN","HOUR","THIRTY_MIN","TOTAL","WEEK"
            break
        }

        # Amazon.Connect.LexVersion
        "Get-CONNBotList/LexVersion"
        {
            $v = "V1","V2"
            break
        }

        # Amazon.Connect.ListFlowAssociationResourceType
        {
            ($_ -eq "Get-CONNFlowAssociationBatch/ResourceType") -Or
            ($_ -eq "Get-CONNFlowAssociationList/ResourceType")
        }
        {
            $v = "VOICE_PHONE_NUMBER"
            break
        }

        # Amazon.Connect.ParticipantRole
        "New-CONNParticipant/ParticipantDetails_ParticipantRole"
        {
            $v = "AGENT","CUSTOMER","CUSTOM_BOT","SUPERVISOR","SYSTEM"
            break
        }

        # Amazon.Connect.PhoneNumberCountryCode
        "Search-CONNAvailablePhoneNumber/PhoneNumberCountryCode"
        {
            $v = "AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BR","BS","BT","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GG","GH","GI","GL","GM","GN","GQ","GR","GT","GU","GW","GY","HK","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"
            break
        }

        # Amazon.Connect.PhoneNumberType
        "Search-CONNAvailablePhoneNumber/PhoneNumberType"
        {
            $v = "DID","SHARED","SHORT_CODE","THIRD_PARTY_DID","THIRD_PARTY_TF","TOLL_FREE","UIFN"
            break
        }

        # Amazon.Connect.QueueStatus
        "Update-CONNQueueStatus/Status"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Connect.QuickConnectType
        {
            ($_ -eq "New-CONNQuickConnect/QuickConnectConfig_QuickConnectType") -Or
            ($_ -eq "Update-CONNQuickConnectConfig/QuickConnectConfig_QuickConnectType")
        }
        {
            $v = "PHONE_NUMBER","QUEUE","USER"
            break
        }

        # Amazon.Connect.RealTimeContactAnalysisOutputType
        "Get-CONNRealtimeContactAnalysisSegmentsV2List/OutputType"
        {
            $v = "Raw","Redacted"
            break
        }

        # Amazon.Connect.RehydrationType
        {
            ($_ -eq "Start-CONNChatContact/PersistentChat_RehydrationType") -Or
            ($_ -eq "New-CONNPersistentContactAssociation/RehydrationType")
        }
        {
            $v = "ENTIRE_PAST_SESSION","FROM_SEGMENT"
            break
        }

        # Amazon.Connect.RulePublishStatus
        {
            ($_ -eq "Get-CONNRuleList/PublishStatus") -Or
            ($_ -eq "New-CONNRule/PublishStatus") -Or
            ($_ -eq "Update-CONNRule/PublishStatus")
        }
        {
            $v = "DRAFT","PUBLISHED"
            break
        }

        # Amazon.Connect.ScreenShareCapability
        {
            ($_ -eq "Start-CONNWebRTCContact/Agent_ScreenShare") -Or
            ($_ -eq "Start-CONNWebRTCContact/Customer_ScreenShare")
        }
        {
            $v = "SEND"
            break
        }

        # Amazon.Connect.SearchableQueueType
        "Search-CONNQueue/SearchCriteria_QueueTypeCondition"
        {
            $v = "STANDARD"
            break
        }

        # Amazon.Connect.SearchContactsMatchType
        {
            ($_ -eq "Search-CONNContact/SearchableContactAttributes_MatchType") -Or
            ($_ -eq "Search-CONNContact/Transcript_MatchType")
        }
        {
            $v = "MATCH_ALL","MATCH_ANY"
            break
        }

        # Amazon.Connect.SearchContactsTimeRangeType
        "Search-CONNContact/TimeRange_Type"
        {
            $v = "CONNECTED_TO_AGENT_TIMESTAMP","DISCONNECT_TIMESTAMP","INITIATION_TIMESTAMP","SCHEDULED_TIMESTAMP"
            break
        }

        # Amazon.Connect.SortableFieldName
        "Search-CONNContact/Sort_FieldName"
        {
            $v = "CHANNEL","CONNECTED_TO_AGENT_TIMESTAMP","DISCONNECT_TIMESTAMP","INITIATION_METHOD","INITIATION_TIMESTAMP","SCHEDULED_TIMESTAMP"
            break
        }

        # Amazon.Connect.SortOrder
        "Search-CONNContact/Sort_Order"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.Connect.SourceType
        "New-CONNIntegrationAssociation/SourceType"
        {
            $v = "CASES","SALESFORCE","ZENDESK"
            break
        }

        # Amazon.Connect.StorageType
        {
            ($_ -eq "Add-CONNInstanceStorageConfig/StorageConfig_StorageType") -Or
            ($_ -eq "Update-CONNInstanceStorageConfig/StorageConfig_StorageType")
        }
        {
            $v = "KINESIS_FIREHOSE","KINESIS_STREAM","KINESIS_VIDEO_STREAM","S3"
            break
        }

        # Amazon.Connect.StringComparisonType
        {
            ($_ -eq "Search-CONNAgentStatus/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNContactFlow/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNContactFlowModule/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNHoursOfOperation/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNPredefinedAttribute/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNPrompt/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNQueue/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNQuickConnect/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNRoutingProfile/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNSecurityProfile/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNUser/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNUserHierarchyGroup/StringCondition_ComparisonType") -Or
            ($_ -eq "Search-CONNResourceTag/TagSearchCondition_TagKeyComparisonType") -Or
            ($_ -eq "Search-CONNResourceTag/TagSearchCondition_TagValueComparisonType")
        }
        {
            $v = "CONTAINS","EXACT","STARTS_WITH"
            break
        }

        # Amazon.Connect.TargetListType
        "Search-CONNUser/ListCondition_TargetListType"
        {
            $v = "PROFICIENCIES"
            break
        }

        # Amazon.Connect.TaskTemplateStatus
        {
            ($_ -eq "Get-CONNTaskTemplateList/Status") -Or
            ($_ -eq "New-CONNTaskTemplate/Status") -Or
            ($_ -eq "Update-CONNTaskTemplate/Status")
        }
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.Connect.TrafficType
        "Start-CONNOutboundVoiceContact/TrafficType"
        {
            $v = "CAMPAIGN","GENERAL"
            break
        }

        # Amazon.Connect.UseCaseType
        "New-CONNUseCase/UseCaseType"
        {
            $v = "CONNECT_CAMPAIGNS","RULES_EVALUATION"
            break
        }

        # Amazon.Connect.VideoCapability
        {
            ($_ -eq "Start-CONNWebRTCContact/Agent_Video") -Or
            ($_ -eq "Start-CONNWebRTCContact/Customer_Video")
        }
        {
            $v = "SEND"
            break
        }

        # Amazon.Connect.ViewStatus
        {
            ($_ -eq "New-CONNView/Status") -Or
            ($_ -eq "Update-CONNViewContent/Status")
        }
        {
            $v = "PUBLISHED","SAVED"
            break
        }

        # Amazon.Connect.ViewType
        "Get-CONNViewList/Type"
        {
            $v = "AWS_MANAGED","CUSTOMER_MANAGED"
            break
        }

        # Amazon.Connect.VocabularyLanguageCode
        {
            ($_ -eq "Add-CONNDefaultVocabulary/LanguageCode") -Or
            ($_ -eq "Get-CONNDefaultVocabularyList/LanguageCode") -Or
            ($_ -eq "New-CONNVocabulary/LanguageCode") -Or
            ($_ -eq "Search-CONNVocabulary/LanguageCode")
        }
        {
            $v = "ar-AE","ca-ES","da-DK","de-CH","de-DE","en-AB","en-AU","en-GB","en-IE","en-IN","en-NZ","en-US","en-WL","en-ZA","es-ES","es-US","fi-FI","fr-CA","fr-FR","hi-IN","id-ID","it-IT","ja-JP","ko-KR","ms-MY","nl-NL","no-NO","pl-PL","pt-BR","pt-PT","sv-SE","tl-PH","zh-CN"
            break
        }

        # Amazon.Connect.VocabularyState
        "Search-CONNVocabulary/State"
        {
            $v = "ACTIVE","CREATION_FAILED","CREATION_IN_PROGRESS","DELETE_IN_PROGRESS"
            break
        }

        # Amazon.Connect.VoiceRecordingTrack
        "Start-CONNContactRecording/VoiceRecordingConfiguration_VoiceRecordingTrack"
        {
            $v = "ALL","FROM_AGENT","TO_AGENT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CONN_map = @{
    "Agent_ScreenShare"=@("Start-CONNWebRTCContact")
    "Agent_Video"=@("Start-CONNWebRTCContact")
    "AgentAvailabilityTimer"=@("New-CONNRoutingProfile","Update-CONNRoutingProfileAgentAvailabilityTimer")
    "AttributeType"=@("Get-CONNInstanceAttribute","Update-CONNInstanceAttribute")
    "ContactFlowModuleState"=@("Get-CONNContactFlowModuleList")
    "ContactFlowState"=@("Update-CONNContactFlowMetadata")
    "Customer_ScreenShare"=@("Start-CONNWebRTCContact")
    "Customer_Video"=@("Start-CONNWebRTCContact")
    "DestinationEndpoint_Type"=@("Start-CONNOutboundChatContact")
    "Event_Type"=@("Send-CONNChatIntegrationEvent")
    "EventSourceName"=@("Get-CONNRuleList")
    "FileUseCaseType"=@("Start-CONNAttachedFileUpload")
    "HierarchyGroupCondition_HierarchyGroupMatchType"=@("Search-CONNUser")
    "IdentityManagementType"=@("New-CONNInstance")
    "IntegrationType"=@("Get-CONNIntegrationAssociationList","New-CONNIntegrationAssociation")
    "Interval_IntervalPeriod"=@("Get-CONNMetricDataV2")
    "LanguageCode"=@("Add-CONNDefaultVocabulary","Get-CONNDefaultVocabularyList","New-CONNVocabulary","Search-CONNVocabulary")
    "LexVersion"=@("Get-CONNBotList")
    "ListCondition_TargetListType"=@("Search-CONNUser")
    "OutputType"=@("Get-CONNRealtimeContactAnalysisSegmentsV2List")
    "ParticipantDetails_ParticipantRole"=@("New-CONNParticipant")
    "PersistentChat_RehydrationType"=@("Start-CONNChatContact")
    "PhoneNumberCountryCode"=@("Search-CONNAvailablePhoneNumber")
    "PhoneNumberType"=@("Search-CONNAvailablePhoneNumber")
    "PublishStatus"=@("Get-CONNRuleList","New-CONNRule","Update-CONNRule")
    "QuickConnectConfig_QuickConnectType"=@("New-CONNQuickConnect","Update-CONNQuickConnectConfig")
    "RehydrationType"=@("New-CONNPersistentContactAssociation")
    "ResourceType"=@("Add-CONNFlow","Add-CONNInstanceStorageConfig","Get-CONNFlowAssociation","Get-CONNFlowAssociationBatch","Get-CONNFlowAssociationList","Get-CONNInstanceStorageConfig","Get-CONNInstanceStorageConfigList","Remove-CONNFlow","Remove-CONNInstanceStorageConfig","Update-CONNInstanceStorageConfig")
    "ScoringStrategy_Mode"=@("New-CONNEvaluationForm","Update-CONNEvaluationForm")
    "ScoringStrategy_Status"=@("New-CONNEvaluationForm","Update-CONNEvaluationForm")
    "SearchableContactAttributes_MatchType"=@("Search-CONNContact")
    "SearchCriteria_QueueTypeCondition"=@("Search-CONNQueue")
    "SearchCriteria_StateCondition"=@("Search-CONNContactFlow")
    "SearchCriteria_StatusCondition"=@("Search-CONNContactFlow")
    "SearchCriteria_TypeCondition"=@("Search-CONNContactFlow")
    "SearchFilter_UserAttributeFilter_AndCondition_HierarchyGroupCondition_HierarchyGroupMatchType"=@("Search-CONNUser")
    "SearchFilter_UserAttributeFilter_HierarchyGroupCondition_HierarchyGroupMatchType"=@("Search-CONNUser")
    "Sort_FieldName"=@("Search-CONNContact")
    "Sort_Order"=@("Search-CONNContact")
    "SourceEndpoint_Type"=@("Start-CONNOutboundChatContact")
    "SourceType"=@("New-CONNIntegrationAssociation")
    "State"=@("New-CONNAgentStatus","Search-CONNVocabulary","Update-CONNAgentStatus","Update-CONNContactFlowModuleMetadata")
    "Status"=@("Get-CONNTaskTemplateList","New-CONNContactFlow","New-CONNTaskTemplate","New-CONNView","Update-CONNQueueStatus","Update-CONNTaskTemplate","Update-CONNViewContent")
    "StorageConfig_StorageType"=@("Add-CONNInstanceStorageConfig","Update-CONNInstanceStorageConfig")
    "StorageConfigKinesisVideoStreamConfigEncryptionConfigEncryptionType"=@("Add-CONNInstanceStorageConfig","Update-CONNInstanceStorageConfig")
    "StorageConfigS3ConfigEncryptionConfigEncryptionType"=@("Add-CONNInstanceStorageConfig","Update-CONNInstanceStorageConfig")
    "StringCondition_ComparisonType"=@("Search-CONNAgentStatus","Search-CONNContactFlow","Search-CONNContactFlowModule","Search-CONNHoursOfOperation","Search-CONNPredefinedAttribute","Search-CONNPrompt","Search-CONNQueue","Search-CONNQuickConnect","Search-CONNRoutingProfile","Search-CONNSecurityProfile","Search-CONNUser","Search-CONNUserHierarchyGroup")
    "TagSearchCondition_TagKeyComparisonType"=@("Search-CONNResourceTag")
    "TagSearchCondition_TagValueComparisonType"=@("Search-CONNResourceTag")
    "TimeRange_Type"=@("Search-CONNContact")
    "TrafficType"=@("Start-CONNOutboundVoiceContact")
    "Transcript_MatchType"=@("Search-CONNContact")
    "TriggerEventSource_EventSourceName"=@("New-CONNRule")
    "Type"=@("Get-CONNViewList","New-CONNContactFlow")
    "UseCaseType"=@("New-CONNUseCase")
    "VoiceRecordingConfiguration_VoiceRecordingTrack"=@("Start-CONNContactRecording")
}

_awsArgumentCompleterRegistration $CONN_Completers $CONN_map

$CONN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CONN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CONN_SelectMap = @{
    "Select"=@("Enable-CONNEvaluationForm",
               "Register-CONNAnalyticsDataSet",
               "Add-CONNApprovedOrigin",
               "Add-CONNBot",
               "Add-CONNDefaultVocabulary",
               "Add-CONNFlow",
               "Add-CONNInstanceStorageConfig",
               "Add-CONNLambdaFunction",
               "Add-CONNLexBot",
               "Add-CONNPhoneNumberContactFlow",
               "Add-CONNQueueQuickConnect",
               "Join-CONNRoutingProfileQueue",
               "Add-CONNSecurityKey",
               "Add-CONNTrafficDistributionGroupUser",
               "Add-CONNUserProficiency",
               "Register-CONNBatchAnalyticsDataSet",
               "Unregister-CONNBatchAnalyticsDataSet",
               "Get-CONNBatchAttachedFileMetadata",
               "Get-CONNFlowAssociationBatch",
               "Set-CONNBatchPutContact",
               "Request-CONNPhoneNumber",
               "Complete-CONNAttachedFileUpload",
               "New-CONNAgentStatus",
               "New-CONNContactFlow",
               "New-CONNContactFlowModule",
               "New-CONNEvaluationForm",
               "New-CONNHoursOfOperation",
               "New-CONNInstance",
               "New-CONNIntegrationAssociation",
               "New-CONNParticipant",
               "New-CONNPersistentContactAssociation",
               "New-CONNPredefinedAttribute",
               "New-CONNPrompt",
               "New-CONNQueue",
               "New-CONNQuickConnect",
               "New-CONNRoutingProfile",
               "New-CONNRule",
               "New-CONNSecurityProfile",
               "New-CONNTaskTemplate",
               "New-CONNTrafficDistributionGroup",
               "New-CONNUseCase",
               "New-CONNUser",
               "New-CONNUserHierarchyGroup",
               "New-CONNView",
               "New-CONNViewVersion",
               "New-CONNVocabulary",
               "Disable-CONNEvaluationForm",
               "Remove-CONNAttachedFile",
               "Remove-CONNContactEvaluation",
               "Remove-CONNContactFlow",
               "Remove-CONNContactFlowModule",
               "Remove-CONNEvaluationForm",
               "Remove-CONNHoursOfOperation",
               "Remove-CONNInstance",
               "Remove-CONNIntegrationAssociation",
               "Remove-CONNPredefinedAttribute",
               "Remove-CONNPrompt",
               "Remove-CONNQueue",
               "Remove-CONNQuickConnect",
               "Remove-CONNRoutingProfile",
               "Remove-CONNRule",
               "Remove-CONNSecurityProfile",
               "Remove-CONNTaskTemplate",
               "Remove-CONNTrafficDistributionGroup",
               "Remove-CONNUseCase",
               "Remove-CONNUser",
               "Remove-CONNUserHierarchyGroup",
               "Remove-CONNView",
               "Remove-CONNViewVersion",
               "Remove-CONNVocabulary",
               "Get-CONNAgentStatus",
               "Get-CONNAuthenticationProfile",
               "Get-CONNContact",
               "Get-CONNContactEvaluation",
               "Get-CONNContactFlow",
               "Get-CONNContactFlowModule",
               "Get-CONNEvaluationForm",
               "Get-CONNHoursOfOperation",
               "Get-CONNInstance",
               "Get-CONNInstanceAttribute",
               "Get-CONNInstanceStorageConfig",
               "Get-CONNPhoneNumber",
               "Get-CONNPredefinedAttribute",
               "Get-CONNPrompt",
               "Get-CONNQueue",
               "Get-CONNQuickConnect",
               "Get-CONNRoutingProfile",
               "Get-CONNRule",
               "Get-CONNSecurityProfile",
               "Get-CONNTrafficDistributionGroup",
               "Get-CONNUser",
               "Get-CONNUserHierarchyGroup",
               "Get-CONNUserHierarchyStructure",
               "Get-CONNView",
               "Get-CONNVocabulary",
               "Unregister-CONNAnalyticsDataSet",
               "Remove-CONNApprovedOrigin",
               "Remove-CONNBot",
               "Remove-CONNFlow",
               "Remove-CONNInstanceStorageConfig",
               "Remove-CONNLambdaFunction",
               "Remove-CONNLexBot",
               "Remove-CONNPhoneNumberContactFlow",
               "Remove-CONNQueueQuickConnect",
               "Disconnect-CONNRoutingProfileQueue",
               "Remove-CONNSecurityKey",
               "Remove-CONNTrafficDistributionGroupUser",
               "Remove-CONNUserProficiency",
               "Write-CONNUserContact",
               "Get-CONNAttachedFile",
               "Get-CONNContactAttribute",
               "Get-CONNCurrentMetricData",
               "Get-CONNCurrentUserData",
               "Get-CONNFederationToken",
               "Get-CONNFlowAssociation",
               "Get-CONNMetricData",
               "Get-CONNMetricDataV2",
               "Get-CONNPromptFile",
               "Get-CONNTaskTemplate",
               "Get-CONNTrafficDistribution",
               "Import-CONNPhoneNumber",
               "Get-CONNAgentStatusList",
               "Get-CONNAnalyticsDataAssociationList",
               "Get-CONNApprovedOriginList",
               "Get-CONNAuthenticationProfileList",
               "Get-CONNBotList",
               "Get-CONNContactEvaluationList",
               "Get-CONNContactFlowModuleList",
               "Get-CONNContactFlowList",
               "Get-CONNContactReferenceList",
               "Get-CONNDefaultVocabularyList",
               "Get-CONNEvaluationFormList",
               "Get-CONNEvaluationFormVersionList",
               "Get-CONNFlowAssociationList",
               "Get-CONNHoursOfOperationList",
               "Get-CONNInstanceAttributeList",
               "Get-CONNInstanceList",
               "Get-CONNInstanceStorageConfigList",
               "Get-CONNIntegrationAssociationList",
               "Get-CONNLambdaFunctionList",
               "Get-CONNLexBotList",
               "Get-CONNPhoneNumberList",
               "Get-CONNPhoneNumbersV2List",
               "Get-CONNPredefinedAttributeList",
               "Get-CONNPromptList",
               "Get-CONNQueueQuickConnectList",
               "Get-CONNQueueList",
               "Get-CONNQuickConnectList",
               "Get-CONNRealtimeContactAnalysisSegmentsV2List",
               "Get-CONNRoutingProfileQueueList",
               "Get-CONNRoutingProfileList",
               "Get-CONNRuleList",
               "Get-CONNSecurityKeyList",
               "Get-CONNSecurityProfileApplicationList",
               "Get-CONNSecurityProfilePermissionList",
               "Get-CONNSecurityProfileList",
               "Get-CONNResourceTag",
               "Get-CONNTaskTemplateList",
               "Get-CONNTrafficDistributionGroupList",
               "Get-CONNTrafficDistributionGroupUserList",
               "Get-CONNUseCaseList",
               "Get-CONNUserHierarchyGroupList",
               "Get-CONNUserProficiencyList",
               "Get-CONNUserList",
               "Get-CONNViewList",
               "Get-CONNViewVersionList",
               "Start-CONNContactMonitoring",
               "Invoke-CONNPauseContact",
               "Write-CONNUserStatus",
               "Remove-CONNPhoneNumber",
               "Copy-CONNInstance",
               "Invoke-CONNResumeContact",
               "Resume-CONNContactRecording",
               "Search-CONNAgentStatus",
               "Search-CONNAvailablePhoneNumber",
               "Search-CONNContactFlowModule",
               "Search-CONNContactFlow",
               "Search-CONNContact",
               "Search-CONNHoursOfOperation",
               "Search-CONNPredefinedAttribute",
               "Search-CONNPrompt",
               "Search-CONNQueue",
               "Search-CONNQuickConnect",
               "Search-CONNResourceTag",
               "Search-CONNRoutingProfile",
               "Search-CONNSecurityProfile",
               "Search-CONNUserHierarchyGroup",
               "Search-CONNUser",
               "Search-CONNVocabulary",
               "Send-CONNChatIntegrationEvent",
               "Start-CONNAttachedFileUpload",
               "Start-CONNChatContact",
               "Start-CONNContactEvaluation",
               "Start-CONNContactRecording",
               "Start-CONNContactStreaming",
               "Start-CONNOutboundChatContact",
               "Start-CONNOutboundVoiceContact",
               "Start-CONNScreenSharing",
               "Start-CONNTaskContact",
               "Start-CONNWebRTCContact",
               "Stop-CONNContact",
               "Stop-CONNContactRecording",
               "Stop-CONNContactStreaming",
               "Submit-CONNContactEvaluation",
               "Suspend-CONNContactRecording",
               "Add-CONNContactTag",
               "Add-CONNResourceTag",
               "Move-CONNContact",
               "Remove-CONNContactTag",
               "Remove-CONNResourceTag",
               "Update-CONNAgentStatus",
               "Update-CONNAuthenticationProfile",
               "Update-CONNContact",
               "Update-CONNContactAttribute",
               "Update-CONNContactEvaluation",
               "Update-CONNContactFlowContent",
               "Update-CONNContactFlowMetadata",
               "Update-CONNContactFlowModuleContent",
               "Update-CONNContactFlowModuleMetadata",
               "Update-CONNContactFlowName",
               "Update-CONNContactRoutingData",
               "Update-CONNContactSchedule",
               "Update-CONNEvaluationForm",
               "Update-CONNHoursOfOperation",
               "Update-CONNInstanceAttribute",
               "Update-CONNInstanceStorageConfig",
               "Update-CONNParticipantRoleConfig",
               "Update-CONNPhoneNumber",
               "Update-CONNPhoneNumberMetadata",
               "Update-CONNPredefinedAttribute",
               "Update-CONNPrompt",
               "Update-CONNQueueHoursOfOperation",
               "Update-CONNQueueMaxContact",
               "Update-CONNQueueName",
               "Update-CONNQueueOutboundCallerConfig",
               "Update-CONNQueueStatus",
               "Update-CONNQuickConnectConfig",
               "Update-CONNQuickConnectName",
               "Update-CONNRoutingProfileAgentAvailabilityTimer",
               "Update-CONNRoutingProfileConcurrency",
               "Update-CONNRoutingProfileDefaultOutboundQueue",
               "Update-CONNRoutingProfileName",
               "Update-CONNRoutingProfileQueue",
               "Update-CONNRule",
               "Update-CONNSecurityProfile",
               "Update-CONNTaskTemplate",
               "Update-CONNTrafficDistribution",
               "Update-CONNUserHierarchy",
               "Update-CONNUserHierarchyGroupName",
               "Update-CONNUserHierarchyStructure",
               "Update-CONNUserIdentityInfo",
               "Update-CONNUserPhoneConfig",
               "Update-CONNUserProficiency",
               "Update-CONNUserRoutingProfile",
               "Update-CONNUserSecurityProfile",
               "Update-CONNViewContent",
               "Update-CONNViewMetadata")
}

_awsArgumentCompleterRegistration $CONN_SelectCompleters $CONN_SelectMap
# Argument completions for service Amazon Connect Campaign Service


$CCS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ConnectCampaignService.EncryptionType
        "Start-CCSInstanceOnboardingJob/EncryptionConfig_EncryptionType"
        {
            $v = "KMS"
            break
        }

        # Amazon.ConnectCampaignService.InstanceIdFilterOperator
        "Get-CCSCampaignList/InstanceIdFilter_Operator"
        {
            $v = "Eq"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CCS_map = @{
    "EncryptionConfig_EncryptionType"=@("Start-CCSInstanceOnboardingJob")
    "InstanceIdFilter_Operator"=@("Get-CCSCampaignList")
}

_awsArgumentCompleterRegistration $CCS_Completers $CCS_map

$CCS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CCS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CCS_SelectMap = @{
    "Select"=@("New-CCSCampaign",
               "Remove-CCSCampaign",
               "Remove-CCSConnectInstanceConfig",
               "Remove-CCSInstanceOnboardingJob",
               "Get-CCSCampaign",
               "Get-CCSCampaignState",
               "Get-CCSCampaignStateBatch",
               "Get-CCSConnectInstanceConfig",
               "Get-CCSInstanceOnboardingJobStatus",
               "Get-CCSCampaignList",
               "Get-CCSResourceTag",
               "Suspend-CCSCampaign",
               "Write-CCSDialRequestBatch",
               "Resume-CCSCampaign",
               "Start-CCSCampaign",
               "Start-CCSInstanceOnboardingJob",
               "Stop-CCSCampaign",
               "Add-CCSResourceTag",
               "Remove-CCSResourceTag",
               "Update-CCSCampaignDialerConfig",
               "Update-CCSCampaignName",
               "Update-CCSCampaignOutboundCallConfig")
}

_awsArgumentCompleterRegistration $CCS_SelectCompleters $CCS_SelectMap
# Argument completions for service Amazon Connect Cases


$CCAS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ConnectCases.CommentBodyTextType
        "New-CCASRelatedItem/Comment_ContentType"
        {
            $v = "Text/Plain"
            break
        }

        # Amazon.ConnectCases.FieldType
        "New-CCASField/Type"
        {
            $v = "Boolean","DateTime","Number","SingleSelect","Text","Url","User"
            break
        }

        # Amazon.ConnectCases.RelatedItemType
        "New-CCASRelatedItem/Type"
        {
            $v = "Comment","Contact","File"
            break
        }

        # Amazon.ConnectCases.TemplateStatus
        {
            ($_ -eq "New-CCASTemplate/Status") -Or
            ($_ -eq "Update-CCASTemplate/Status")
        }
        {
            $v = "Active","Inactive"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CCAS_map = @{
    "Comment_ContentType"=@("New-CCASRelatedItem")
    "Status"=@("New-CCASTemplate","Update-CCASTemplate")
    "Type"=@("New-CCASField","New-CCASRelatedItem")
}

_awsArgumentCompleterRegistration $CCAS_Completers $CCAS_map

$CCAS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CCAS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CCAS_SelectMap = @{
    "Select"=@("Group-CCASGetField",
               "Group-CCASPutFieldOption",
               "New-CCASCase",
               "New-CCASDomain",
               "New-CCASField",
               "New-CCASLayout",
               "New-CCASRelatedItem",
               "New-CCASTemplate",
               "Remove-CCASDomain",
               "Remove-CCASField",
               "Remove-CCASLayout",
               "Remove-CCASTemplate",
               "Get-CCASCase",
               "Get-CCASCaseAuditEvent",
               "Get-CCASCaseEventConfiguration",
               "Get-CCASDomain",
               "Get-CCASLayout",
               "Get-CCASTemplate",
               "Get-CCASCasesForContactList",
               "Get-CCASDomainList",
               "Get-CCASFieldOptionList",
               "Get-CCASFieldList",
               "Get-CCASLayoutList",
               "Get-CCASResourceTag",
               "Get-CCASTemplateList",
               "Write-CCASCaseEventConfiguration",
               "Search-CCASCase",
               "Search-CCASRelatedItem",
               "Add-CCASResourceTag",
               "Remove-CCASResourceTag",
               "Update-CCASCase",
               "Update-CCASField",
               "Update-CCASLayout",
               "Update-CCASTemplate")
}

_awsArgumentCompleterRegistration $CCAS_SelectCompleters $CCAS_SelectMap
# Argument completions for service Amazon Connect Contact Lens


$CCL_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CCL.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CCL_SelectMap = @{
    "Select"=@("Get-CCLRealtimeContactAnalysisSegmentList")
}

_awsArgumentCompleterRegistration $CCL_SelectCompleters $CCL_SelectMap
# Argument completions for service Amazon Connect Participant Service


$CONNP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ConnectParticipant.ScanDirection
        "Get-CONNPTranscript/ScanDirection"
        {
            $v = "BACKWARD","FORWARD"
            break
        }

        # Amazon.ConnectParticipant.SortKey
        "Get-CONNPTranscript/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CONNP_map = @{
    "ScanDirection"=@("Get-CONNPTranscript")
    "SortOrder"=@("Get-CONNPTranscript")
}

_awsArgumentCompleterRegistration $CONNP_Completers $CONNP_map

$CONNP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CONNP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CONNP_SelectMap = @{
    "Select"=@("Complete-CONNPAttachmentUpload",
               "New-CONNPParticipantConnection",
               "Get-CONNPView",
               "Disconnect-CONNPParticipant",
               "Get-CONNPAttachment",
               "Get-CONNPTranscript",
               "Send-CONNPEvent",
               "Send-CONNPMessage",
               "Start-CONNPAttachmentUpload")
}

_awsArgumentCompleterRegistration $CONNP_SelectCompleters $CONNP_SelectMap
# Argument completions for service AWS Control Catalog


$CLCAT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CLCAT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CLCAT_SelectMap = @{
    "Select"=@("Get-CLCATControl",
               "Get-CLCATCommonControlList",
               "Get-CLCATControlList",
               "Get-CLCATDomainList",
               "Get-CLCATObjectiveList")
}

_awsArgumentCompleterRegistration $CLCAT_SelectCompleters $CLCAT_SelectMap
# Argument completions for service AWS Control Tower


$ACT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ACT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ACT_SelectMap = @{
    "Select"=@("New-ACTLandingZone",
               "Remove-ACTLandingZone",
               "Disable-ACTBaseline",
               "Disable-ACTControl",
               "Enable-ACTBaseline",
               "Enable-ACTControl",
               "Get-ACTBaseline",
               "Get-ACTBaselineOperation",
               "Get-ACTControlOperation",
               "Get-ACTEnabledBaseline",
               "Get-ACTEnabledControl",
               "Get-ACTLandingZone",
               "Get-ACTLandingZoneOperation",
               "Get-ACTBaselineList",
               "Get-ACTControlOperationList",
               "Get-ACTEnabledBaselineList",
               "Get-ACTEnabledControlList",
               "Get-ACTLandingZoneOperationList",
               "Get-ACTLandingZoneList",
               "Get-ACTResourceTag",
               "Reset-ACTEnabledBaseline",
               "Reset-ACTLandingZone",
               "Add-ACTResourceTag",
               "Remove-ACTResourceTag",
               "Update-ACTEnabledBaseline",
               "Update-ACTEnabledControl",
               "Update-ACTLandingZone")
}

_awsArgumentCompleterRegistration $ACT_SelectCompleters $ACT_SelectMap
# Argument completions for service Cost Optimization Hub


$COH_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CostOptimizationHub.EnrollmentStatus
        "Update-COHEnrollmentStatus/Status"
        {
            $v = "Active","Inactive"
            break
        }

        # Amazon.CostOptimizationHub.MemberAccountDiscountVisibility
        "Update-COHPreference/MemberAccountDiscountVisibility"
        {
            $v = "All","None"
            break
        }

        # Amazon.CostOptimizationHub.Order
        "Get-COHRecommendationList/OrderBy_Order"
        {
            $v = "Asc","Desc"
            break
        }

        # Amazon.CostOptimizationHub.SavingsEstimationMode
        "Update-COHPreference/SavingsEstimationMode"
        {
            $v = "AfterDiscounts","BeforeDiscounts"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$COH_map = @{
    "MemberAccountDiscountVisibility"=@("Update-COHPreference")
    "OrderBy_Order"=@("Get-COHRecommendationList")
    "SavingsEstimationMode"=@("Update-COHPreference")
    "Status"=@("Update-COHEnrollmentStatus")
}

_awsArgumentCompleterRegistration $COH_Completers $COH_map

$COH_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.COH.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$COH_SelectMap = @{
    "Select"=@("Get-COHPreference",
               "Get-COHRecommendation",
               "Get-COHEnrollmentStatusList",
               "Get-COHRecommendationList",
               "Get-COHRecommendationSummaryList",
               "Update-COHEnrollmentStatus",
               "Update-COHPreference")
}

_awsArgumentCompleterRegistration $COH_SelectCompleters $COH_SelectMap
# Argument completions for service AWS Cost and Usage Report


$CUR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CostAndUsageReport.AWSRegion
        {
            ($_ -eq "Edit-CURReportDefinition/ReportDefinition_S3Region") -Or
            ($_ -eq "Write-CURReportDefinition/ReportDefinition_S3Region")
        }
        {
            $v = "af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-south-2","ap-southeast-1","ap-southeast-2","ap-southeast-3","ca-central-1","cn-north-1","cn-northwest-1","eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3","me-central-1","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"
            break
        }

        # Amazon.CostAndUsageReport.CompressionFormat
        {
            ($_ -eq "Edit-CURReportDefinition/ReportDefinition_Compression") -Or
            ($_ -eq "Write-CURReportDefinition/ReportDefinition_Compression")
        }
        {
            $v = "GZIP","Parquet","ZIP"
            break
        }

        # Amazon.CostAndUsageReport.LastStatus
        {
            ($_ -eq "Edit-CURReportDefinition/ReportStatus_LastStatus") -Or
            ($_ -eq "Write-CURReportDefinition/ReportStatus_LastStatus")
        }
        {
            $v = "ERROR_NO_BUCKET","ERROR_PERMISSIONS","SUCCESS"
            break
        }

        # Amazon.CostAndUsageReport.ReportFormat
        {
            ($_ -eq "Edit-CURReportDefinition/ReportDefinition_Format") -Or
            ($_ -eq "Write-CURReportDefinition/ReportDefinition_Format")
        }
        {
            $v = "Parquet","textORcsv"
            break
        }

        # Amazon.CostAndUsageReport.ReportVersioning
        {
            ($_ -eq "Edit-CURReportDefinition/ReportDefinition_ReportVersioning") -Or
            ($_ -eq "Write-CURReportDefinition/ReportDefinition_ReportVersioning")
        }
        {
            $v = "CREATE_NEW_REPORT","OVERWRITE_REPORT"
            break
        }

        # Amazon.CostAndUsageReport.TimeUnit
        {
            ($_ -eq "Edit-CURReportDefinition/ReportDefinition_TimeUnit") -Or
            ($_ -eq "Write-CURReportDefinition/ReportDefinition_TimeUnit")
        }
        {
            $v = "DAILY","HOURLY","MONTHLY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CUR_map = @{
    "ReportDefinition_Compression"=@("Edit-CURReportDefinition","Write-CURReportDefinition")
    "ReportDefinition_Format"=@("Edit-CURReportDefinition","Write-CURReportDefinition")
    "ReportDefinition_ReportVersioning"=@("Edit-CURReportDefinition","Write-CURReportDefinition")
    "ReportDefinition_S3Region"=@("Edit-CURReportDefinition","Write-CURReportDefinition")
    "ReportDefinition_TimeUnit"=@("Edit-CURReportDefinition","Write-CURReportDefinition")
    "ReportStatus_LastStatus"=@("Edit-CURReportDefinition","Write-CURReportDefinition")
}

_awsArgumentCompleterRegistration $CUR_Completers $CUR_map

$CUR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CUR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CUR_SelectMap = @{
    "Select"=@("Remove-CURReportDefinition",
               "Get-CURReportDefinition",
               "Get-CURResourceTag",
               "Edit-CURReportDefinition",
               "Write-CURReportDefinition",
               "Add-CURResourceTag",
               "Remove-CURResourceTag")
}

_awsArgumentCompleterRegistration $CUR_SelectCompleters $CUR_SelectMap
# Argument completions for service Amazon Connect Customer Profiles


$CPF_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CustomerProfiles.AttributeMatchingModel
        {
            ($_ -eq "New-CPFDomain/AttributeTypesSelector_AttributeMatchingModel") -Or
            ($_ -eq "Update-CPFDomain/AttributeTypesSelector_AttributeMatchingModel")
        }
        {
            $v = "MANY_TO_MANY","ONE_TO_ONE"
            break
        }

        # Amazon.CustomerProfiles.ConflictResolvingModel
        {
            ($_ -eq "Get-CPFAutoMergingPreview/ConflictResolution_ConflictResolvingModel") -Or
            ($_ -eq "New-CPFDomain/ConflictResolution_ConflictResolvingModel") -Or
            ($_ -eq "Update-CPFDomain/ConflictResolution_ConflictResolvingModel") -Or
            ($_ -eq "New-CPFDomain/RuleBasedMatching_ConflictResolution_ConflictResolvingModel") -Or
            ($_ -eq "Update-CPFDomain/RuleBasedMatching_ConflictResolution_ConflictResolvingModel")
        }
        {
            $v = "RECENCY","SOURCE"
            break
        }

        # Amazon.CustomerProfiles.DataPullMode
        {
            ($_ -eq "New-CPFIntegrationWorkflow/Scheduled_DataPullMode") -Or
            ($_ -eq "Write-CPFIntegration/Scheduled_DataPullMode")
        }
        {
            $v = "Complete","Incremental"
            break
        }

        # Amazon.CustomerProfiles.Gender
        {
            ($_ -eq "New-CPFProfile/Gender") -Or
            ($_ -eq "Update-CPFProfile/Gender")
        }
        {
            $v = "FEMALE","MALE","UNSPECIFIED"
            break
        }

        # Amazon.CustomerProfiles.JobScheduleDayOfTheWeek
        {
            ($_ -eq "New-CPFDomain/JobSchedule_DayOfTheWeek") -Or
            ($_ -eq "Update-CPFDomain/JobSchedule_DayOfTheWeek")
        }
        {
            $v = "FRIDAY","MONDAY","SATURDAY","SUNDAY","THURSDAY","TUESDAY","WEDNESDAY"
            break
        }

        # Amazon.CustomerProfiles.LogicalOperator
        "Search-CPFProfile/LogicalOperator"
        {
            $v = "AND","OR"
            break
        }

        # Amazon.CustomerProfiles.MatchType
        "Get-CPFSimilarProfile/MatchType"
        {
            $v = "ML_BASED_MATCHING","RULE_BASED_MATCHING"
            break
        }

        # Amazon.CustomerProfiles.Operator
        {
            ($_ -eq "New-CPFCalculatedAttributeDefinition/Threshold_Operator") -Or
            ($_ -eq "Update-CPFCalculatedAttributeDefinition/Threshold_Operator")
        }
        {
            $v = "EQUAL_TO","GREATER_THAN","LESS_THAN","NOT_EQUAL_TO"
            break
        }

        # Amazon.CustomerProfiles.PartyType
        {
            ($_ -eq "New-CPFProfile/PartyType") -Or
            ($_ -eq "Update-CPFProfile/PartyType")
        }
        {
            $v = "BUSINESS","INDIVIDUAL","OTHER"
            break
        }

        # Amazon.CustomerProfiles.SourceConnectorType
        {
            ($_ -eq "New-CPFIntegrationWorkflow/SourceFlowConfig_ConnectorType") -Or
            ($_ -eq "Write-CPFIntegration/SourceFlowConfig_ConnectorType")
        }
        {
            $v = "Marketo","S3","Salesforce","Servicenow","Zendesk"
            break
        }

        # Amazon.CustomerProfiles.Statistic
        "New-CPFCalculatedAttributeDefinition/Statistic"
        {
            $v = "AVERAGE","COUNT","FIRST_OCCURRENCE","LAST_OCCURRENCE","MAXIMUM","MAX_OCCURRENCE","MINIMUM","SUM"
            break
        }

        # Amazon.CustomerProfiles.Status
        "Get-CPFWorkflowList/Status"
        {
            $v = "CANCELLED","COMPLETE","FAILED","IN_PROGRESS","NOT_STARTED","RETRY","SPLIT"
            break
        }

        # Amazon.CustomerProfiles.TriggerType
        {
            ($_ -eq "New-CPFIntegrationWorkflow/TriggerConfig_TriggerType") -Or
            ($_ -eq "Write-CPFIntegration/TriggerConfig_TriggerType")
        }
        {
            $v = "Event","OnDemand","Scheduled"
            break
        }

        # Amazon.CustomerProfiles.Unit
        {
            ($_ -eq "New-CPFCalculatedAttributeDefinition/Range_Unit") -Or
            ($_ -eq "Update-CPFCalculatedAttributeDefinition/Range_Unit")
        }
        {
            $v = "DAYS"
            break
        }

        # Amazon.CustomerProfiles.WorkflowType
        {
            ($_ -eq "Get-CPFWorkflowList/WorkflowType") -Or
            ($_ -eq "New-CPFIntegrationWorkflow/WorkflowType")
        }
        {
            $v = "APPFLOW_INTEGRATION"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CPF_map = @{
    "AttributeTypesSelector_AttributeMatchingModel"=@("New-CPFDomain","Update-CPFDomain")
    "ConflictResolution_ConflictResolvingModel"=@("Get-CPFAutoMergingPreview","New-CPFDomain","Update-CPFDomain")
    "Gender"=@("New-CPFProfile","Update-CPFProfile")
    "JobSchedule_DayOfTheWeek"=@("New-CPFDomain","Update-CPFDomain")
    "LogicalOperator"=@("Search-CPFProfile")
    "MatchType"=@("Get-CPFSimilarProfile")
    "PartyType"=@("New-CPFProfile","Update-CPFProfile")
    "Range_Unit"=@("New-CPFCalculatedAttributeDefinition","Update-CPFCalculatedAttributeDefinition")
    "RuleBasedMatching_ConflictResolution_ConflictResolvingModel"=@("New-CPFDomain","Update-CPFDomain")
    "Scheduled_DataPullMode"=@("New-CPFIntegrationWorkflow","Write-CPFIntegration")
    "SourceFlowConfig_ConnectorType"=@("New-CPFIntegrationWorkflow","Write-CPFIntegration")
    "Statistic"=@("New-CPFCalculatedAttributeDefinition")
    "Status"=@("Get-CPFWorkflowList")
    "Threshold_Operator"=@("New-CPFCalculatedAttributeDefinition","Update-CPFCalculatedAttributeDefinition")
    "TriggerConfig_TriggerType"=@("New-CPFIntegrationWorkflow","Write-CPFIntegration")
    "WorkflowType"=@("Get-CPFWorkflowList","New-CPFIntegrationWorkflow")
}

_awsArgumentCompleterRegistration $CPF_Completers $CPF_map

$CPF_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CPF.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CPF_SelectMap = @{
    "Select"=@("Add-CPFProfileKey",
               "New-CPFCalculatedAttributeDefinition",
               "New-CPFDomain",
               "New-CPFEventStream",
               "New-CPFIntegrationWorkflow",
               "New-CPFProfile",
               "Remove-CPFCalculatedAttributeDefinition",
               "Remove-CPFDomain",
               "Remove-CPFEventStream",
               "Remove-CPFIntegration",
               "Remove-CPFProfile",
               "Remove-CPFProfileKey",
               "Remove-CPFProfileObject",
               "Remove-CPFProfileObjectType",
               "Remove-CPFWorkflow",
               "Find-CPFProfileObjectType",
               "Get-CPFAutoMergingPreview",
               "Get-CPFCalculatedAttributeDefinition",
               "Get-CPFCalculatedAttributeForProfile",
               "Get-CPFDomain",
               "Get-CPFEventStream",
               "Get-CPFIdentityResolutionJob",
               "Get-CPFIntegration",
               "Get-CPFMatch",
               "Get-CPFProfileObjectType",
               "Get-CPFProfileObjectTypeTemplate",
               "Get-CPFSimilarProfile",
               "Get-CPFWorkflow",
               "Get-CPFWorkflowStep",
               "Get-CPFAccountIntegrationList",
               "Get-CPFCalculatedAttributeDefinitionList",
               "Get-CPFCalculatedAttributesForProfileList",
               "Get-CPFDomainList",
               "Get-CPFEventStreamList",
               "Get-CPFIdentityResolutionJobList",
               "Get-CPFIntegrationList",
               "Get-CPFProfileObjectList",
               "Get-CPFProfileObjectTypeList",
               "Get-CPFProfileObjectTypeTemplateList",
               "Get-CPFRuleBasedMatchList",
               "Get-CPFResourceTag",
               "Get-CPFWorkflowList",
               "Merge-CPFProfile",
               "Write-CPFIntegration",
               "Write-CPFProfileObject",
               "Write-CPFProfileObjectType",
               "Search-CPFProfile",
               "Add-CPFResourceTag",
               "Remove-CPFResourceTag",
               "Update-CPFCalculatedAttributeDefinition",
               "Update-CPFDomain",
               "Update-CPFProfile")
}

_awsArgumentCompleterRegistration $CPF_SelectCompleters $CPF_SelectMap
# Argument completions for service AWS Glue DataBrew


$GDB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.GlueDataBrew.AnalyticsMode
        "Send-GDBProjectSessionAction/ViewFrame_Analytic"
        {
            $v = "DISABLE","ENABLE"
            break
        }

        # Amazon.GlueDataBrew.EncryptionMode
        {
            ($_ -eq "New-GDBProfileJob/EncryptionMode") -Or
            ($_ -eq "New-GDBRecipeJob/EncryptionMode") -Or
            ($_ -eq "Update-GDBProfileJob/EncryptionMode") -Or
            ($_ -eq "Update-GDBRecipeJob/EncryptionMode")
        }
        {
            $v = "SSE-KMS","SSE-S3"
            break
        }

        # Amazon.GlueDataBrew.InputFormat
        {
            ($_ -eq "New-GDBDataset/Format") -Or
            ($_ -eq "Update-GDBDataset/Format")
        }
        {
            $v = "CSV","EXCEL","JSON","ORC","PARQUET"
            break
        }

        # Amazon.GlueDataBrew.LogSubscription
        {
            ($_ -eq "New-GDBProfileJob/LogSubscription") -Or
            ($_ -eq "New-GDBRecipeJob/LogSubscription") -Or
            ($_ -eq "Update-GDBProfileJob/LogSubscription") -Or
            ($_ -eq "Update-GDBRecipeJob/LogSubscription")
        }
        {
            $v = "DISABLE","ENABLE"
            break
        }

        # Amazon.GlueDataBrew.Order
        {
            ($_ -eq "New-GDBDataset/FilesLimit_Order") -Or
            ($_ -eq "Update-GDBDataset/FilesLimit_Order")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.GlueDataBrew.OrderedBy
        {
            ($_ -eq "New-GDBDataset/FilesLimit_OrderedBy") -Or
            ($_ -eq "Update-GDBDataset/FilesLimit_OrderedBy")
        }
        {
            $v = "LAST_MODIFIED_DATE"
            break
        }

        # Amazon.GlueDataBrew.SampleMode
        {
            ($_ -eq "New-GDBProfileJob/JobSample_Mode") -Or
            ($_ -eq "Update-GDBProfileJob/JobSample_Mode")
        }
        {
            $v = "CUSTOM_ROWS","FULL_DATASET"
            break
        }

        # Amazon.GlueDataBrew.SampleType
        {
            ($_ -eq "New-GDBProject/Sample_Type") -Or
            ($_ -eq "Update-GDBProject/Sample_Type")
        }
        {
            $v = "FIRST_N","LAST_N","RANDOM"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GDB_map = @{
    "EncryptionMode"=@("New-GDBProfileJob","New-GDBRecipeJob","Update-GDBProfileJob","Update-GDBRecipeJob")
    "FilesLimit_Order"=@("New-GDBDataset","Update-GDBDataset")
    "FilesLimit_OrderedBy"=@("New-GDBDataset","Update-GDBDataset")
    "Format"=@("New-GDBDataset","Update-GDBDataset")
    "JobSample_Mode"=@("New-GDBProfileJob","Update-GDBProfileJob")
    "LogSubscription"=@("New-GDBProfileJob","New-GDBRecipeJob","Update-GDBProfileJob","Update-GDBRecipeJob")
    "Sample_Type"=@("New-GDBProject","Update-GDBProject")
    "ViewFrame_Analytic"=@("Send-GDBProjectSessionAction")
}

_awsArgumentCompleterRegistration $GDB_Completers $GDB_map

$GDB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GDB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GDB_SelectMap = @{
    "Select"=@("Remove-GDBRecipeVersionBatch",
               "New-GDBDataset",
               "New-GDBProfileJob",
               "New-GDBProject",
               "New-GDBRecipe",
               "New-GDBRecipeJob",
               "New-GDBRuleset",
               "New-GDBSchedule",
               "Remove-GDBDataset",
               "Remove-GDBJob",
               "Remove-GDBProject",
               "Remove-GDBRecipeVersion",
               "Remove-GDBRuleset",
               "Remove-GDBSchedule",
               "Get-GDBDataset",
               "Get-GDBJob",
               "Get-GDBJobRun",
               "Get-GDBProject",
               "Get-GDBRecipe",
               "Get-GDBRuleset",
               "Get-GDBSchedule",
               "Get-GDBDatasetList",
               "Get-GDBJobRunList",
               "Get-GDBJobList",
               "Get-GDBProjectList",
               "Get-GDBRecipeList",
               "Get-GDBRecipeVersionList",
               "Get-GDBRulesetList",
               "Get-GDBScheduleList",
               "Get-GDBResourceTag",
               "Publish-GDBRecipe",
               "Send-GDBProjectSessionAction",
               "Start-GDBJobRun",
               "Start-GDBProjectSession",
               "Stop-GDBJobRun",
               "Add-GDBResourceTag",
               "Remove-GDBResourceTag",
               "Update-GDBDataset",
               "Update-GDBProfileJob",
               "Update-GDBProject",
               "Update-GDBRecipe",
               "Update-GDBRecipeJob",
               "Update-GDBRuleset",
               "Update-GDBSchedule")
}

_awsArgumentCompleterRegistration $GDB_SelectCompleters $GDB_SelectMap
# Argument completions for service AWS Data Exchange


$DTEX_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DataExchange.AssetType
        "New-DTEXDataSet/AssetType"
        {
            $v = "API_GATEWAY_API","LAKE_FORMATION_DATA_PERMISSION","REDSHIFT_DATA_SHARE","S3_DATA_ACCESS","S3_SNAPSHOT"
            break
        }

        # Amazon.DataExchange.GrantDistributionScope
        "New-DTEXDataGrant/GrantDistributionScope"
        {
            $v = "AWS_ORGANIZATION","NONE"
            break
        }

        # Amazon.DataExchange.NotificationType
        "Send-DTEXDataSetNotification/Type"
        {
            $v = "DATA_DELAY","DATA_UPDATE","DEPRECATION","SCHEMA_CHANGE"
            break
        }

        # Amazon.DataExchange.ProtocolType
        "New-DTEXJob/ImportAssetFromApiGatewayApi_ProtocolType"
        {
            $v = "REST"
            break
        }

        # Amazon.DataExchange.ServerSideEncryptionTypes
        {
            ($_ -eq "New-DTEXJob/Details_ExportRevisionsToS3_Encryption_Type") -Or
            ($_ -eq "New-DTEXEventAction/Encryption_Type") -Or
            ($_ -eq "New-DTEXJob/Encryption_Type") -Or
            ($_ -eq "Update-DTEXEventAction/Encryption_Type")
        }
        {
            $v = "AES256","aws:kms"
            break
        }

        # Amazon.DataExchange.Type
        "New-DTEXJob/Type"
        {
            $v = "CREATE_S3_DATA_ACCESS_FROM_S3_BUCKET","EXPORT_ASSETS_TO_S3","EXPORT_ASSET_TO_SIGNED_URL","EXPORT_REVISIONS_TO_S3","IMPORT_ASSETS_FROM_LAKE_FORMATION_TAG_POLICY","IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES","IMPORT_ASSETS_FROM_S3","IMPORT_ASSET_FROM_API_GATEWAY_API","IMPORT_ASSET_FROM_SIGNED_URL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DTEX_map = @{
    "AssetType"=@("New-DTEXDataSet")
    "Details_ExportRevisionsToS3_Encryption_Type"=@("New-DTEXJob")
    "Encryption_Type"=@("New-DTEXEventAction","New-DTEXJob","Update-DTEXEventAction")
    "GrantDistributionScope"=@("New-DTEXDataGrant")
    "ImportAssetFromApiGatewayApi_ProtocolType"=@("New-DTEXJob")
    "Type"=@("New-DTEXJob","Send-DTEXDataSetNotification")
}

_awsArgumentCompleterRegistration $DTEX_Completers $DTEX_map

$DTEX_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DTEX.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DTEX_SelectMap = @{
    "Select"=@("Receive-DTEXDataGrant",
               "Stop-DTEXJob",
               "New-DTEXDataGrant",
               "New-DTEXDataSet",
               "New-DTEXEventAction",
               "New-DTEXJob",
               "New-DTEXRevision",
               "Remove-DTEXAsset",
               "Remove-DTEXDataGrant",
               "Remove-DTEXDataSet",
               "Remove-DTEXEventAction",
               "Remove-DTEXRevision",
               "Get-DTEXAsset",
               "Get-DTEXDataGrant",
               "Get-DTEXDataSet",
               "Get-DTEXEventAction",
               "Get-DTEXJob",
               "Get-DTEXReceivedDataGrant",
               "Get-DTEXRevision",
               "Get-DTEXDataGrantList",
               "Get-DTEXDataSetRevisionList",
               "Get-DTEXDataSetList",
               "Get-DTEXEventActionList",
               "Get-DTEXJobList",
               "Get-DTEXReceivedDataGrantList",
               "Get-DTEXRevisionAssetList",
               "Get-DTEXResourceTag",
               "Revoke-DTEXRevision",
               "Send-DTEXApiAsset",
               "Send-DTEXDataSetNotification",
               "Start-DTEXJob",
               "Add-DTEXResourceTag",
               "Remove-DTEXResourceTag",
               "Update-DTEXAsset",
               "Update-DTEXDataSet",
               "Update-DTEXEventAction",
               "Update-DTEXRevision")
}

_awsArgumentCompleterRegistration $DTEX_SelectCompleters $DTEX_SelectMap
# Argument completions for service AWS Data Pipeline


$DP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DataPipeline.TaskStatus
        "Set-DPTaskStatus/TaskStatus"
        {
            $v = "FAILED","FALSE","FINISHED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DP_map = @{
    "TaskStatus"=@("Set-DPTaskStatus")
}

_awsArgumentCompleterRegistration $DP_Completers $DP_map

$DP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DP_SelectMap = @{
    "Select"=@("Enable-DPPipeline",
               "Add-DPResourceTag",
               "New-DPPipeline",
               "Disable-DPPipeline",
               "Remove-DPPipeline",
               "Get-DPObject",
               "Get-DPPipelineDescription",
               "Invoke-DPExpression",
               "Get-DPPipelineDefinition",
               "Get-DPPipeline",
               "Get-DPTask",
               "Write-DPPipelineDefinition",
               "Find-DPObject",
               "Remove-DPResourceTag",
               "Update-DPTaskProgress",
               "Update-DPTaskRunnerHeartbeat",
               "Set-DPStatus",
               "Set-DPTaskStatus",
               "Test-DPPipelineDefinition")
}

_awsArgumentCompleterRegistration $DP_SelectCompleters $DP_SelectMap
# Argument completions for service AWS DataSync


$DSYN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DataSync.AzureAccessTier
        {
            ($_ -eq "New-DSYNLocationAzureBlob/AccessTier") -Or
            ($_ -eq "Update-DSYNLocationAzureBlob/AccessTier")
        }
        {
            $v = "ARCHIVE","COOL","HOT"
            break
        }

        # Amazon.DataSync.AzureBlobAuthenticationType
        {
            ($_ -eq "New-DSYNLocationAzureBlob/AuthenticationType") -Or
            ($_ -eq "Update-DSYNLocationAzureBlob/AuthenticationType")
        }
        {
            $v = "SAS"
            break
        }

        # Amazon.DataSync.AzureBlobType
        {
            ($_ -eq "New-DSYNLocationAzureBlob/BlobType") -Or
            ($_ -eq "Update-DSYNLocationAzureBlob/BlobType")
        }
        {
            $v = "BLOCK"
            break
        }

        # Amazon.DataSync.DiscoveryResourceType
        {
            ($_ -eq "Get-DSYNStorageSystemResource/ResourceType") -Or
            ($_ -eq "Get-DSYNStorageSystemResourceMetric/ResourceType") -Or
            ($_ -eq "New-DSYNRecommendation/ResourceType")
        }
        {
            $v = "CLUSTER","SVM","VOLUME"
            break
        }

        # Amazon.DataSync.DiscoverySystemType
        "Add-DSYNStorageSystem/SystemType"
        {
            $v = "NetAppONTAP"
            break
        }

        # Amazon.DataSync.EfsInTransitEncryption
        "New-DSYNLocationEfs/InTransitEncryption"
        {
            $v = "NONE","TLS1_2"
            break
        }

        # Amazon.DataSync.HdfsAuthenticationType
        {
            ($_ -eq "New-DSYNLocationHdf/AuthenticationType") -Or
            ($_ -eq "Update-DSYNLocationHdf/AuthenticationType")
        }
        {
            $v = "KERBEROS","SIMPLE"
            break
        }

        # Amazon.DataSync.HdfsDataTransferProtection
        {
            ($_ -eq "New-DSYNLocationHdf/QopConfiguration_DataTransferProtection") -Or
            ($_ -eq "Update-DSYNLocationHdf/QopConfiguration_DataTransferProtection")
        }
        {
            $v = "AUTHENTICATION","DISABLED","INTEGRITY","PRIVACY"
            break
        }

        # Amazon.DataSync.HdfsRpcProtection
        {
            ($_ -eq "New-DSYNLocationHdf/QopConfiguration_RpcProtection") -Or
            ($_ -eq "Update-DSYNLocationHdf/QopConfiguration_RpcProtection")
        }
        {
            $v = "AUTHENTICATION","DISABLED","INTEGRITY","PRIVACY"
            break
        }

        # Amazon.DataSync.ManifestAction
        {
            ($_ -eq "New-DSYNTask/ManifestConfig_Action") -Or
            ($_ -eq "Start-DSYNTaskExecution/ManifestConfig_Action") -Or
            ($_ -eq "Update-DSYNTask/ManifestConfig_Action")
        }
        {
            $v = "TRANSFER"
            break
        }

        # Amazon.DataSync.ManifestFormat
        {
            ($_ -eq "New-DSYNTask/ManifestConfig_Format") -Or
            ($_ -eq "Start-DSYNTaskExecution/ManifestConfig_Format") -Or
            ($_ -eq "Update-DSYNTask/ManifestConfig_Format")
        }
        {
            $v = "CSV"
            break
        }

        # Amazon.DataSync.NfsVersion
        {
            ($_ -eq "New-DSYNLocationFsxOpenZf/MountOptions_Version") -Or
            ($_ -eq "New-DSYNLocationNfs/MountOptions_Version") -Or
            ($_ -eq "Update-DSYNLocationNfs/MountOptions_Version") -Or
            ($_ -eq "New-DSYNLocationFsxOntap/Protocol_NFS_MountOptions_Version")
        }
        {
            $v = "AUTOMATIC","NFS3","NFS4_0","NFS4_1"
            break
        }

        # Amazon.DataSync.ObjectStorageServerProtocol
        {
            ($_ -eq "New-DSYNLocationObjectStorage/ServerProtocol") -Or
            ($_ -eq "Update-DSYNLocationObjectStorage/ServerProtocol")
        }
        {
            $v = "HTTP","HTTPS"
            break
        }

        # Amazon.DataSync.ObjectVersionIds
        {
            ($_ -eq "New-DSYNTask/TaskReportConfig_ObjectVersionId") -Or
            ($_ -eq "Start-DSYNTaskExecution/TaskReportConfig_ObjectVersionId") -Or
            ($_ -eq "Update-DSYNTask/TaskReportConfig_ObjectVersionId")
        }
        {
            $v = "INCLUDE","NONE"
            break
        }

        # Amazon.DataSync.ReportLevel
        {
            ($_ -eq "New-DSYNTask/Deleted_ReportLevel") -Or
            ($_ -eq "Start-DSYNTaskExecution/Deleted_ReportLevel") -Or
            ($_ -eq "Update-DSYNTask/Deleted_ReportLevel") -Or
            ($_ -eq "New-DSYNTask/Skipped_ReportLevel") -Or
            ($_ -eq "Start-DSYNTaskExecution/Skipped_ReportLevel") -Or
            ($_ -eq "Update-DSYNTask/Skipped_ReportLevel") -Or
            ($_ -eq "New-DSYNTask/TaskReportConfig_ReportLevel") -Or
            ($_ -eq "Start-DSYNTaskExecution/TaskReportConfig_ReportLevel") -Or
            ($_ -eq "Update-DSYNTask/TaskReportConfig_ReportLevel") -Or
            ($_ -eq "New-DSYNTask/Transferred_ReportLevel") -Or
            ($_ -eq "Start-DSYNTaskExecution/Transferred_ReportLevel") -Or
            ($_ -eq "Update-DSYNTask/Transferred_ReportLevel") -Or
            ($_ -eq "New-DSYNTask/Verified_ReportLevel") -Or
            ($_ -eq "Start-DSYNTaskExecution/Verified_ReportLevel") -Or
            ($_ -eq "Update-DSYNTask/Verified_ReportLevel")
        }
        {
            $v = "ERRORS_ONLY","SUCCESSES_AND_ERRORS"
            break
        }

        # Amazon.DataSync.ReportOutputType
        {
            ($_ -eq "New-DSYNTask/TaskReportConfig_OutputType") -Or
            ($_ -eq "Start-DSYNTaskExecution/TaskReportConfig_OutputType") -Or
            ($_ -eq "Update-DSYNTask/TaskReportConfig_OutputType")
        }
        {
            $v = "STANDARD","SUMMARY_ONLY"
            break
        }

        # Amazon.DataSync.S3StorageClass
        "New-DSYNLocationS3/S3StorageClass"
        {
            $v = "DEEP_ARCHIVE","GLACIER","GLACIER_INSTANT_RETRIEVAL","INTELLIGENT_TIERING","ONEZONE_IA","OUTPOSTS","STANDARD","STANDARD_IA"
            break
        }

        # Amazon.DataSync.ScheduleStatus
        {
            ($_ -eq "New-DSYNTask/Schedule_Status") -Or
            ($_ -eq "Update-DSYNTask/Schedule_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.DataSync.SmbVersion
        {
            ($_ -eq "New-DSYNLocationSmb/MountOptions_Version") -Or
            ($_ -eq "Update-DSYNLocationSmb/MountOptions_Version") -Or
            ($_ -eq "New-DSYNLocationFsxOntap/Protocol_SMB_MountOptions_Version") -Or
            ($_ -eq "New-DSYNLocationFsxOpenZf/Protocol_SMB_MountOptions_Version")
        }
        {
            $v = "AUTOMATIC","SMB1","SMB2","SMB2_0","SMB3"
            break
        }

        # Amazon.DataSync.TaskMode
        "New-DSYNTask/TaskMode"
        {
            $v = "BASIC","ENHANCED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DSYN_map = @{
    "AccessTier"=@("New-DSYNLocationAzureBlob","Update-DSYNLocationAzureBlob")
    "AuthenticationType"=@("New-DSYNLocationAzureBlob","New-DSYNLocationHdf","Update-DSYNLocationAzureBlob","Update-DSYNLocationHdf")
    "BlobType"=@("New-DSYNLocationAzureBlob","Update-DSYNLocationAzureBlob")
    "Deleted_ReportLevel"=@("New-DSYNTask","Start-DSYNTaskExecution","Update-DSYNTask")
    "InTransitEncryption"=@("New-DSYNLocationEfs")
    "ManifestConfig_Action"=@("New-DSYNTask","Start-DSYNTaskExecution","Update-DSYNTask")
    "ManifestConfig_Format"=@("New-DSYNTask","Start-DSYNTaskExecution","Update-DSYNTask")
    "MountOptions_Version"=@("New-DSYNLocationFsxOpenZf","New-DSYNLocationNfs","New-DSYNLocationSmb","Update-DSYNLocationNfs","Update-DSYNLocationSmb")
    "Protocol_NFS_MountOptions_Version"=@("New-DSYNLocationFsxOntap")
    "Protocol_SMB_MountOptions_Version"=@("New-DSYNLocationFsxOntap","New-DSYNLocationFsxOpenZf")
    "QopConfiguration_DataTransferProtection"=@("New-DSYNLocationHdf","Update-DSYNLocationHdf")
    "QopConfiguration_RpcProtection"=@("New-DSYNLocationHdf","Update-DSYNLocationHdf")
    "ResourceType"=@("Get-DSYNStorageSystemResource","Get-DSYNStorageSystemResourceMetric","New-DSYNRecommendation")
    "S3StorageClass"=@("New-DSYNLocationS3")
    "Schedule_Status"=@("New-DSYNTask","Update-DSYNTask")
    "ServerProtocol"=@("New-DSYNLocationObjectStorage","Update-DSYNLocationObjectStorage")
    "Skipped_ReportLevel"=@("New-DSYNTask","Start-DSYNTaskExecution","Update-DSYNTask")
    "SystemType"=@("Add-DSYNStorageSystem")
    "TaskMode"=@("New-DSYNTask")
    "TaskReportConfig_ObjectVersionId"=@("New-DSYNTask","Start-DSYNTaskExecution","Update-DSYNTask")
    "TaskReportConfig_OutputType"=@("New-DSYNTask","Start-DSYNTaskExecution","Update-DSYNTask")
    "TaskReportConfig_ReportLevel"=@("New-DSYNTask","Start-DSYNTaskExecution","Update-DSYNTask")
    "Transferred_ReportLevel"=@("New-DSYNTask","Start-DSYNTaskExecution","Update-DSYNTask")
    "Verified_ReportLevel"=@("New-DSYNTask","Start-DSYNTaskExecution","Update-DSYNTask")
}

_awsArgumentCompleterRegistration $DSYN_Completers $DSYN_map

$DSYN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DSYN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DSYN_SelectMap = @{
    "Select"=@("Add-DSYNStorageSystem",
               "Stop-DSYNTaskExecution",
               "New-DSYNAgent",
               "New-DSYNLocationAzureBlob",
               "New-DSYNLocationEfs",
               "New-DSYNLocationFsxLustre",
               "New-DSYNLocationFsxOntap",
               "New-DSYNLocationFsxOpenZf",
               "New-DSYNLocationFsxWindow",
               "New-DSYNLocationHdf",
               "New-DSYNLocationNfs",
               "New-DSYNLocationObjectStorage",
               "New-DSYNLocationS3",
               "New-DSYNLocationSmb",
               "New-DSYNTask",
               "Remove-DSYNAgent",
               "Remove-DSYNLocation",
               "Remove-DSYNTask",
               "Get-DSYNAgent",
               "Get-DSYNDiscoveryJob",
               "Get-DSYNLocationAzureBlob",
               "Get-DSYNLocationEfs",
               "Get-DSYNLocationFsxLustre",
               "Get-DSYNLocationFsxOntap",
               "Get-DSYNLocationFsxOpenZf",
               "Get-DSYNLocationFsxWindow",
               "Get-DSYNLocationHdf",
               "Get-DSYNLocationNfs",
               "Get-DSYNLocationObjectStorage",
               "Get-DSYNLocationS3",
               "Get-DSYNLocationSmb",
               "Get-DSYNStorageSystem",
               "Get-DSYNStorageSystemResourceMetric",
               "Get-DSYNStorageSystemResource",
               "Get-DSYNTask",
               "Get-DSYNTaskExecution",
               "New-DSYNRecommendation",
               "Get-DSYNAgentList",
               "Get-DSYNDiscoveryJobList",
               "Get-DSYNLocationList",
               "Get-DSYNStorageSystemList",
               "Get-DSYNResourceTagList",
               "Get-DSYNTaskExecutionList",
               "Get-DSYNTaskList",
               "Remove-DSYNStorageSystem",
               "Start-DSYNDiscoveryJob",
               "Start-DSYNTaskExecution",
               "Stop-DSYNDiscoveryJob",
               "Add-DSYNResourceTag",
               "Remove-DSYNResourceTag",
               "Update-DSYNAgent",
               "Update-DSYNDiscoveryJob",
               "Update-DSYNLocationAzureBlob",
               "Update-DSYNLocationHdf",
               "Update-DSYNLocationNfs",
               "Update-DSYNLocationObjectStorage",
               "Update-DSYNLocationSmb",
               "Update-DSYNStorageSystem",
               "Update-DSYNTask",
               "Update-DSYNTaskExecution")
}

_awsArgumentCompleterRegistration $DSYN_SelectCompleters $DSYN_SelectMap
# Argument completions for service Amazon DataZone


$DZ_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DataZone.AcceptRuleBehavior
        "Approve-DZPrediction/AcceptRule_Rule"
        {
            $v = "ALL","NONE"
            break
        }

        # Amazon.DataZone.AuthType
        {
            ($_ -eq "New-DZDomain/SingleSignOn_Type") -Or
            ($_ -eq "Update-DZDomain/SingleSignOn_Type")
        }
        {
            $v = "DISABLED","IAM_IDC"
            break
        }

        # Amazon.DataZone.ChangeAction
        "New-DZListingChangeSet/Action"
        {
            $v = "PUBLISH","UNPUBLISH"
            break
        }

        # Amazon.DataZone.DataAssetActivityStatus
        "Get-DZDataSourceRunActivityList/Status"
        {
            $v = "FAILED","PUBLISHING_FAILED","SKIPPED_ALREADY_IMPORTED","SKIPPED_ARCHIVED","SKIPPED_NO_ACCESS","SUCCEEDED_CREATED","SUCCEEDED_UPDATED","UNCHANGED"
            break
        }

        # Amazon.DataZone.DataSourceRunStatus
        "Get-DZDataSourceRunList/Status"
        {
            $v = "FAILED","PARTIALLY_SUCCEEDED","REQUESTED","RUNNING","SUCCESS"
            break
        }

        # Amazon.DataZone.DataSourceStatus
        "Get-DZDataSourceList/Status"
        {
            $v = "CREATING","DELETING","FAILED_CREATION","FAILED_DELETION","FAILED_UPDATE","READY","RUNNING","UPDATING"
            break
        }

        # Amazon.DataZone.DataZoneEntityType
        {
            ($_ -eq "Add-DZEntityOwner/EntityType") -Or
            ($_ -eq "Get-DZEntityOwnerList/EntityType") -Or
            ($_ -eq "Remove-DZEntityOwner/EntityType")
        }
        {
            $v = "DOMAIN_UNIT"
            break
        }

        # Amazon.DataZone.DomainStatus
        "Get-DZDomainList/Status"
        {
            $v = "AVAILABLE","CREATING","CREATION_FAILED","DELETED","DELETING","DELETION_FAILED"
            break
        }

        # Amazon.DataZone.DomainUnitDesignation
        {
            ($_ -eq "Add-DZPolicyGrant/DomainUnit_DomainUnitDesignation") -Or
            ($_ -eq "Remove-DZPolicyGrant/DomainUnit_DomainUnitDesignation")
        }
        {
            $v = "OWNER"
            break
        }

        # Amazon.DataZone.EdgeDirection
        "Get-DZLineageNodeHistoryList/Direction"
        {
            $v = "DOWNSTREAM","UPSTREAM"
            break
        }

        # Amazon.DataZone.EnableSetting
        {
            ($_ -eq "New-DZDataSource/EnableSetting") -Or
            ($_ -eq "Update-DZDataSource/EnableSetting")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.DataZone.EntityType
        "New-DZListingChangeSet/EntityType"
        {
            $v = "ASSET","DATA_PRODUCT"
            break
        }

        # Amazon.DataZone.EnvironmentStatus
        "Get-DZEnvironmentList/Status"
        {
            $v = "ACTIVE","CREATE_FAILED","CREATING","DELETED","DELETE_FAILED","DELETING","DISABLED","EXPIRED","INACCESSIBLE","SUSPENDED","UPDATE_FAILED","UPDATING","VALIDATION_FAILED"
            break
        }

        # Amazon.DataZone.FilterStatus
        "Get-DZAssetFilterList/Status"
        {
            $v = "INVALID","VALID"
            break
        }

        # Amazon.DataZone.FormTypeStatus
        "New-DZFormType/Status"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.DataZone.GlossaryStatus
        {
            ($_ -eq "New-DZGlossary/Status") -Or
            ($_ -eq "Update-DZGlossary/Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.DataZone.GlossaryTermStatus
        {
            ($_ -eq "New-DZGlossaryTerm/Status") -Or
            ($_ -eq "Update-DZGlossaryTerm/Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.DataZone.GroupProfileStatus
        "Update-DZGroupProfile/Status"
        {
            $v = "ASSIGNED","NOT_ASSIGNED"
            break
        }

        # Amazon.DataZone.GroupSearchType
        "Search-DZGroupProfile/GroupType"
        {
            $v = "DATAZONE_SSO_GROUP","SSO_GROUP"
            break
        }

        # Amazon.DataZone.InventorySearchScope
        "Search-DZResource/SearchScope"
        {
            $v = "ASSET","DATA_PRODUCT","GLOSSARY","GLOSSARY_TERM"
            break
        }

        # Amazon.DataZone.ManagedPolicyType
        {
            ($_ -eq "Add-DZPolicyGrant/PolicyType") -Or
            ($_ -eq "Get-DZPolicyGrantList/PolicyType") -Or
            ($_ -eq "Remove-DZPolicyGrant/PolicyType")
        }
        {
            $v = "ADD_TO_PROJECT_MEMBER_POOL","CREATE_ASSET_TYPE","CREATE_DOMAIN_UNIT","CREATE_ENVIRONMENT","CREATE_ENVIRONMENT_PROFILE","CREATE_FORM_TYPE","CREATE_GLOSSARY","CREATE_PROJECT","DELEGATE_CREATE_ENVIRONMENT_PROFILE","OVERRIDE_DOMAIN_UNIT_OWNERS","OVERRIDE_PROJECT_OWNERS"
            break
        }

        # Amazon.DataZone.MetadataGenerationRunStatus
        "Get-DZMetadataGenerationRunList/Status"
        {
            $v = "CANCELED","FAILED","IN_PROGRESS","SUBMITTED","SUCCEEDED"
            break
        }

        # Amazon.DataZone.MetadataGenerationRunType
        {
            ($_ -eq "Get-DZMetadataGenerationRunList/Type") -Or
            ($_ -eq "Start-DZMetadataGenerationRun/Type")
        }
        {
            $v = "BUSINESS_DESCRIPTIONS"
            break
        }

        # Amazon.DataZone.MetadataGenerationTargetType
        "Start-DZMetadataGenerationRun/Target_Type"
        {
            $v = "ASSET"
            break
        }

        # Amazon.DataZone.NotificationType
        "Get-DZNotificationList/Type"
        {
            $v = "EVENT","TASK"
            break
        }

        # Amazon.DataZone.ProjectDesignation
        {
            ($_ -eq "Add-DZPolicyGrant/Project_ProjectDesignation") -Or
            ($_ -eq "Remove-DZPolicyGrant/Project_ProjectDesignation")
        }
        {
            $v = "CONTRIBUTOR","OWNER","PROJECT_CATALOG_STEWARD"
            break
        }

        # Amazon.DataZone.RejectRuleBehavior
        "Deny-DZPrediction/RejectRule_Rule"
        {
            $v = "ALL","NONE"
            break
        }

        # Amazon.DataZone.SortFieldProject
        "Get-DZProjectMembershipList/SortBy"
        {
            $v = "NAME"
            break
        }

        # Amazon.DataZone.SortKey
        {
            ($_ -eq "Get-DZSubscriptionGrantList/SortBy") -Or
            ($_ -eq "Get-DZSubscriptionList/SortBy") -Or
            ($_ -eq "Get-DZSubscriptionRequestList/SortBy") -Or
            ($_ -eq "Get-DZSubscriptionTargetList/SortBy")
        }
        {
            $v = "CREATED_AT","UPDATED_AT"
            break
        }

        # Amazon.DataZone.SortOrder
        {
            ($_ -eq "Search-DZListing/Sort_Order") -Or
            ($_ -eq "Search-DZResource/Sort_Order") -Or
            ($_ -eq "Search-DZType/Sort_Order") -Or
            ($_ -eq "Get-DZLineageNodeHistoryList/SortOrder") -Or
            ($_ -eq "Get-DZProjectMembershipList/SortOrder") -Or
            ($_ -eq "Get-DZSubscriptionGrantList/SortOrder") -Or
            ($_ -eq "Get-DZSubscriptionList/SortOrder") -Or
            ($_ -eq "Get-DZSubscriptionRequestList/SortOrder") -Or
            ($_ -eq "Get-DZSubscriptionTargetList/SortOrder")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.DataZone.SubscriptionGrantStatus
        "Update-DZSubscriptionGrantStatus/Status"
        {
            $v = "GRANTED","GRANT_FAILED","GRANT_IN_PROGRESS","GRANT_PENDING","REVOKED","REVOKE_FAILED","REVOKE_IN_PROGRESS","REVOKE_PENDING"
            break
        }

        # Amazon.DataZone.SubscriptionRequestStatus
        "Get-DZSubscriptionRequestList/Status"
        {
            $v = "ACCEPTED","PENDING","REJECTED"
            break
        }

        # Amazon.DataZone.SubscriptionStatus
        "Get-DZSubscriptionList/Status"
        {
            $v = "APPROVED","CANCELLED","REVOKED"
            break
        }

        # Amazon.DataZone.TargetEntityType
        {
            ($_ -eq "Add-DZPolicyGrant/EntityType") -Or
            ($_ -eq "Get-DZPolicyGrantList/EntityType") -Or
            ($_ -eq "Remove-DZPolicyGrant/EntityType")
        }
        {
            $v = "DOMAIN_UNIT","ENVIRONMENT_BLUEPRINT_CONFIGURATION","ENVIRONMENT_PROFILE"
            break
        }

        # Amazon.DataZone.TaskStatus
        "Get-DZNotificationList/TaskStatus"
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.DataZone.TimeSeriesEntityType
        {
            ($_ -eq "Get-DZTimeSeriesDataPoint/EntityType") -Or
            ($_ -eq "Get-DZTimeSeriesDataPointList/EntityType") -Or
            ($_ -eq "New-DZTimeSeriesDataPoint/EntityType") -Or
            ($_ -eq "Remove-DZTimeSeriesDataPoint/EntityType")
        }
        {
            $v = "ASSET","LISTING"
            break
        }

        # Amazon.DataZone.Timezone
        {
            ($_ -eq "New-DZDataSource/Schedule_Timezone") -Or
            ($_ -eq "Update-DZDataSource/Schedule_Timezone")
        }
        {
            $v = "AFRICA_JOHANNESBURG","AMERICA_MONTREAL","AMERICA_SAO_PAULO","ASIA_BAHRAIN","ASIA_BANGKOK","ASIA_CALCUTTA","ASIA_DUBAI","ASIA_HONG_KONG","ASIA_JAKARTA","ASIA_KUALA_LUMPUR","ASIA_SEOUL","ASIA_SHANGHAI","ASIA_SINGAPORE","ASIA_TAIPEI","ASIA_TOKYO","AUSTRALIA_MELBOURNE","AUSTRALIA_SYDNEY","CANADA_CENTRAL","CET","CST6CDT","ETC_GMT","ETC_GMT0","ETC_GMT_ADD_0","ETC_GMT_ADD_1","ETC_GMT_ADD_10","ETC_GMT_ADD_11","ETC_GMT_ADD_12","ETC_GMT_ADD_2","ETC_GMT_ADD_3","ETC_GMT_ADD_4","ETC_GMT_ADD_5","ETC_GMT_ADD_6","ETC_GMT_ADD_7","ETC_GMT_ADD_8","ETC_GMT_ADD_9","ETC_GMT_NEG_0","ETC_GMT_NEG_1","ETC_GMT_NEG_10","ETC_GMT_NEG_11","ETC_GMT_NEG_12","ETC_GMT_NEG_13","ETC_GMT_NEG_14","ETC_GMT_NEG_2","ETC_GMT_NEG_3","ETC_GMT_NEG_4","ETC_GMT_NEG_5","ETC_GMT_NEG_6","ETC_GMT_NEG_7","ETC_GMT_NEG_8","ETC_GMT_NEG_9","EUROPE_DUBLIN","EUROPE_LONDON","EUROPE_PARIS","EUROPE_STOCKHOLM","EUROPE_ZURICH","ISRAEL","MEXICO_GENERAL","MST7MDT","PACIFIC_AUCKLAND","US_CENTRAL","US_EASTERN","US_MOUNTAIN","US_PACIFIC","UTC"
            break
        }

        # Amazon.DataZone.TypesSearchScope
        "Search-DZType/SearchScope"
        {
            $v = "ASSET_TYPE","FORM_TYPE","LINEAGE_NODE_TYPE"
            break
        }

        # Amazon.DataZone.UserAssignment
        {
            ($_ -eq "New-DZDomain/SingleSignOn_UserAssignment") -Or
            ($_ -eq "Update-DZDomain/SingleSignOn_UserAssignment")
        }
        {
            $v = "AUTOMATIC","MANUAL"
            break
        }

        # Amazon.DataZone.UserDesignation
        "New-DZProjectMembership/Designation"
        {
            $v = "PROJECT_CATALOG_CONSUMER","PROJECT_CATALOG_STEWARD","PROJECT_CATALOG_VIEWER","PROJECT_CONTRIBUTOR","PROJECT_OWNER"
            break
        }

        # Amazon.DataZone.UserProfileStatus
        "Update-DZUserProfile/Status"
        {
            $v = "ACTIVATED","ASSIGNED","DEACTIVATED","NOT_ASSIGNED"
            break
        }

        # Amazon.DataZone.UserProfileType
        {
            ($_ -eq "Get-DZUserProfile/Type") -Or
            ($_ -eq "Update-DZUserProfile/Type")
        }
        {
            $v = "IAM","SSO"
            break
        }

        # Amazon.DataZone.UserSearchType
        "Search-DZUserProfile/UserType"
        {
            $v = "DATAZONE_IAM_USER","DATAZONE_SSO_USER","DATAZONE_USER","SSO_USER"
            break
        }

        # Amazon.DataZone.UserType
        "New-DZUserProfile/UserType"
        {
            $v = "IAM_ROLE","IAM_USER","SSO_USER"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DZ_map = @{
    "AcceptRule_Rule"=@("Approve-DZPrediction")
    "Action"=@("New-DZListingChangeSet")
    "Designation"=@("New-DZProjectMembership")
    "Direction"=@("Get-DZLineageNodeHistoryList")
    "DomainUnit_DomainUnitDesignation"=@("Add-DZPolicyGrant","Remove-DZPolicyGrant")
    "EnableSetting"=@("New-DZDataSource","Update-DZDataSource")
    "EntityType"=@("Add-DZEntityOwner","Add-DZPolicyGrant","Get-DZEntityOwnerList","Get-DZPolicyGrantList","Get-DZTimeSeriesDataPoint","Get-DZTimeSeriesDataPointList","New-DZListingChangeSet","New-DZTimeSeriesDataPoint","Remove-DZEntityOwner","Remove-DZPolicyGrant","Remove-DZTimeSeriesDataPoint")
    "GroupType"=@("Search-DZGroupProfile")
    "PolicyType"=@("Add-DZPolicyGrant","Get-DZPolicyGrantList","Remove-DZPolicyGrant")
    "Project_ProjectDesignation"=@("Add-DZPolicyGrant","Remove-DZPolicyGrant")
    "RejectRule_Rule"=@("Deny-DZPrediction")
    "Schedule_Timezone"=@("New-DZDataSource","Update-DZDataSource")
    "SearchScope"=@("Search-DZResource","Search-DZType")
    "SingleSignOn_Type"=@("New-DZDomain","Update-DZDomain")
    "SingleSignOn_UserAssignment"=@("New-DZDomain","Update-DZDomain")
    "Sort_Order"=@("Search-DZListing","Search-DZResource","Search-DZType")
    "SortBy"=@("Get-DZProjectMembershipList","Get-DZSubscriptionGrantList","Get-DZSubscriptionList","Get-DZSubscriptionRequestList","Get-DZSubscriptionTargetList")
    "SortOrder"=@("Get-DZLineageNodeHistoryList","Get-DZProjectMembershipList","Get-DZSubscriptionGrantList","Get-DZSubscriptionList","Get-DZSubscriptionRequestList","Get-DZSubscriptionTargetList")
    "Status"=@("Get-DZAssetFilterList","Get-DZDataSourceList","Get-DZDataSourceRunActivityList","Get-DZDataSourceRunList","Get-DZDomainList","Get-DZEnvironmentList","Get-DZMetadataGenerationRunList","Get-DZSubscriptionList","Get-DZSubscriptionRequestList","New-DZFormType","New-DZGlossary","New-DZGlossaryTerm","Update-DZGlossary","Update-DZGlossaryTerm","Update-DZGroupProfile","Update-DZSubscriptionGrantStatus","Update-DZUserProfile")
    "Target_Type"=@("Start-DZMetadataGenerationRun")
    "TaskStatus"=@("Get-DZNotificationList")
    "Type"=@("Get-DZMetadataGenerationRunList","Get-DZNotificationList","Get-DZUserProfile","Start-DZMetadataGenerationRun","Update-DZUserProfile")
    "UserType"=@("New-DZUserProfile","Search-DZUserProfile")
}

_awsArgumentCompleterRegistration $DZ_Completers $DZ_map

$DZ_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DZ.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DZ_SelectMap = @{
    "Select"=@("Approve-DZPrediction",
               "Approve-DZSubscriptionRequest",
               "Add-DZEntityOwner",
               "Add-DZPolicyGrant",
               "Set-DZEnvironmentRole",
               "Stop-DZMetadataGenerationRun",
               "Stop-DZSubscription",
               "New-DZAsset",
               "New-DZAssetFilter",
               "New-DZAssetRevision",
               "New-DZAssetType",
               "New-DZDataProduct",
               "New-DZDataProductRevision",
               "New-DZDataSource",
               "New-DZDomain",
               "New-DZDomainUnit",
               "New-DZEnvironment",
               "New-DZEnvironmentAction",
               "New-DZEnvironmentProfile",
               "New-DZFormType",
               "New-DZGlossary",
               "New-DZGlossaryTerm",
               "New-DZGroupProfile",
               "New-DZListingChangeSet",
               "New-DZProject",
               "New-DZProjectMembership",
               "New-DZSubscriptionGrant",
               "New-DZSubscriptionRequest",
               "New-DZSubscriptionTarget",
               "New-DZUserProfile",
               "Remove-DZAsset",
               "Remove-DZAssetFilter",
               "Remove-DZAssetType",
               "Remove-DZDataProduct",
               "Remove-DZDataSource",
               "Remove-DZDomain",
               "Remove-DZDomainUnit",
               "Remove-DZEnvironment",
               "Remove-DZEnvironmentAction",
               "Remove-DZEnvironmentBlueprintConfiguration",
               "Remove-DZEnvironmentProfile",
               "Remove-DZFormType",
               "Remove-DZGlossary",
               "Remove-DZGlossaryTerm",
               "Remove-DZListing",
               "Remove-DZProject",
               "Remove-DZProjectMembership",
               "Remove-DZSubscriptionGrant",
               "Remove-DZSubscriptionRequest",
               "Remove-DZSubscriptionTarget",
               "Remove-DZTimeSeriesDataPoint",
               "Reset-DZEnvironmentRole",
               "Get-DZAsset",
               "Get-DZAssetFilter",
               "Get-DZAssetType",
               "Get-DZDataProduct",
               "Get-DZDataSource",
               "Get-DZDataSourceRun",
               "Get-DZDomain",
               "Get-DZDomainUnit",
               "Get-DZEnvironment",
               "Get-DZEnvironmentAction",
               "Get-DZEnvironmentBlueprint",
               "Get-DZEnvironmentBlueprintConfiguration",
               "Get-DZEnvironmentCredential",
               "Get-DZEnvironmentProfile",
               "Get-DZFormType",
               "Get-DZGlossary",
               "Get-DZGlossaryTerm",
               "Get-DZGroupProfile",
               "Get-DZIamPortalLoginUrl",
               "Get-DZLineageNode",
               "Get-DZListing",
               "Get-DZMetadataGenerationRun",
               "Get-DZProject",
               "Get-DZSubscription",
               "Get-DZSubscriptionGrant",
               "Get-DZSubscriptionRequestDetail",
               "Get-DZSubscriptionTarget",
               "Get-DZTimeSeriesDataPoint",
               "Get-DZUserProfile",
               "Get-DZAssetFilterList",
               "Get-DZAssetRevisionList",
               "Get-DZDataProductRevisionList",
               "Get-DZDataSourceRunActivityList",
               "Get-DZDataSourceRunList",
               "Get-DZDataSourceList",
               "Get-DZDomainList",
               "Get-DZDomainUnitsForParentList",
               "Get-DZEntityOwnerList",
               "Get-DZEnvironmentActionList",
               "Get-DZEnvironmentBlueprintConfigurationList",
               "Get-DZEnvironmentBlueprintList",
               "Get-DZEnvironmentProfileList",
               "Get-DZEnvironmentList",
               "Get-DZLineageNodeHistoryList",
               "Get-DZMetadataGenerationRunList",
               "Get-DZNotificationList",
               "Get-DZPolicyGrantList",
               "Get-DZProjectMembershipList",
               "Get-DZProjectList",
               "Get-DZSubscriptionGrantList",
               "Get-DZSubscriptionRequestList",
               "Get-DZSubscriptionList",
               "Get-DZSubscriptionTargetList",
               "Get-DZResourceTag",
               "Get-DZTimeSeriesDataPointList",
               "Submit-DZLineageEvent",
               "New-DZTimeSeriesDataPoint",
               "Write-DZEnvironmentBlueprintConfiguration",
               "Deny-DZPrediction",
               "Deny-DZSubscriptionRequest",
               "Remove-DZEntityOwner",
               "Remove-DZPolicyGrant",
               "Revoke-DZSubscription",
               "Search-DZResource",
               "Search-DZGroupProfile",
               "Search-DZListing",
               "Search-DZType",
               "Search-DZUserProfile",
               "Start-DZDataSourceRun",
               "Start-DZMetadataGenerationRun",
               "Add-DZResourceTag",
               "Remove-DZResourceTag",
               "Update-DZAssetFilter",
               "Update-DZDataSource",
               "Update-DZDomain",
               "Update-DZDomainUnit",
               "Update-DZEnvironment",
               "Update-DZEnvironmentAction",
               "Update-DZEnvironmentProfile",
               "Update-DZGlossary",
               "Update-DZGlossaryTerm",
               "Update-DZGroupProfile",
               "Update-DZProject",
               "Update-DZSubscriptionGrantStatus",
               "Update-DZSubscriptionRequest",
               "Update-DZSubscriptionTarget",
               "Update-DZUserProfile")
}

_awsArgumentCompleterRegistration $DZ_SelectCompleters $DZ_SelectMap
# Argument completions for service Amazon DynamoDB Accelerator (DAX)


$DAX_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DAX.ClusterEndpointEncryptionType
        "New-DAXCluster/ClusterEndpointEncryptionType"
        {
            $v = "NONE","TLS"
            break
        }

        # Amazon.DAX.SourceType
        "Get-DAXEvent/SourceType"
        {
            $v = "CLUSTER","PARAMETER_GROUP","SUBNET_GROUP"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DAX_map = @{
    "ClusterEndpointEncryptionType"=@("New-DAXCluster")
    "SourceType"=@("Get-DAXEvent")
}

_awsArgumentCompleterRegistration $DAX_Completers $DAX_map

$DAX_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DAX.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DAX_SelectMap = @{
    "Select"=@("New-DAXCluster",
               "New-DAXParameterGroup",
               "New-DAXSubnetGroup",
               "Set-DAXReplicationFactorDecrease",
               "Remove-DAXCluster",
               "Remove-DAXParameterGroup",
               "Remove-DAXSubnetGroup",
               "Get-DAXCluster",
               "Get-DAXDefaultParameter",
               "Get-DAXEvent",
               "Get-DAXParameterGroup",
               "Get-DAXParameter",
               "Get-DAXSubnetGroup",
               "Set-DAXReplicationFactorIncrease",
               "Get-DAXResourceTag",
               "Restart-DAXNode",
               "Add-DAXResourceTag",
               "Remove-DAXResourceTag",
               "Update-DAXCluster",
               "Update-DAXParameterGroup",
               "Update-DAXSubnetGroup")
}

_awsArgumentCompleterRegistration $DAX_SelectCompleters $DAX_SelectMap
# Argument completions for service AWSDeadlineCloud


$ADC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Deadline.AutoScalingMode
        {
            ($_ -eq "New-ADCFleet/CustomerManaged_Mode") -Or
            ($_ -eq "Update-ADCFleet/CustomerManaged_Mode")
        }
        {
            $v = "EVENT_BASED_AUTO_SCALING","NO_SCALING"
            break
        }

        # Amazon.Deadline.BudgetStatus
        {
            ($_ -eq "Get-ADCBudgetList/Status") -Or
            ($_ -eq "Update-ADCBudget/Status")
        }
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.Deadline.CpuArchitectureType
        {
            ($_ -eq "New-ADCFleet/InstanceCapabilities_CpuArchitectureType") -Or
            ($_ -eq "Update-ADCFleet/InstanceCapabilities_CpuArchitectureType") -Or
            ($_ -eq "New-ADCFleet/WorkerCapabilities_CpuArchitectureType") -Or
            ($_ -eq "Update-ADCFleet/WorkerCapabilities_CpuArchitectureType")
        }
        {
            $v = "arm64","x86_64"
            break
        }

        # Amazon.Deadline.CreateJobTargetTaskRunStatus
        "New-ADCJob/TargetTaskRunStatus"
        {
            $v = "READY","SUSPENDED"
            break
        }

        # Amazon.Deadline.CustomerManagedFleetOperatingSystemFamily
        {
            ($_ -eq "New-ADCFleet/WorkerCapabilities_OsFamily") -Or
            ($_ -eq "Update-ADCFleet/WorkerCapabilities_OsFamily")
        }
        {
            $v = "LINUX","MACOS","WINDOWS"
            break
        }

        # Amazon.Deadline.DefaultQueueBudgetAction
        {
            ($_ -eq "New-ADCQueue/DefaultBudgetAction") -Or
            ($_ -eq "Update-ADCQueue/DefaultBudgetAction")
        }
        {
            $v = "NONE","STOP_SCHEDULING_AND_CANCEL_TASKS","STOP_SCHEDULING_AND_COMPLETE_TASKS"
            break
        }

        # Amazon.Deadline.Ec2MarketType
        {
            ($_ -eq "New-ADCFleet/InstanceMarketOptions_Type") -Or
            ($_ -eq "Update-ADCFleet/InstanceMarketOptions_Type")
        }
        {
            $v = "on-demand","spot"
            break
        }

        # Amazon.Deadline.EnvironmentTemplateType
        {
            ($_ -eq "New-ADCQueueEnvironment/TemplateType") -Or
            ($_ -eq "Update-ADCQueueEnvironment/TemplateType")
        }
        {
            $v = "JSON","YAML"
            break
        }

        # Amazon.Deadline.FleetStatus
        "Get-ADCFleetList/Status"
        {
            $v = "ACTIVE","CREATE_FAILED","CREATE_IN_PROGRESS","UPDATE_FAILED","UPDATE_IN_PROGRESS"
            break
        }

        # Amazon.Deadline.JobAttachmentsFileSystem
        "New-ADCJob/Attachments_FileSystem"
        {
            $v = "COPIED","VIRTUAL"
            break
        }

        # Amazon.Deadline.JobTargetTaskRunStatus
        "Update-ADCJob/TargetTaskRunStatus"
        {
            $v = "CANCELED","FAILED","PENDING","READY","SUCCEEDED","SUSPENDED"
            break
        }

        # Amazon.Deadline.JobTemplateType
        "New-ADCJob/TemplateType"
        {
            $v = "JSON","YAML"
            break
        }

        # Amazon.Deadline.LogicalOperator
        {
            ($_ -eq "Search-ADCJob/FilterExpressions_Operator") -Or
            ($_ -eq "Search-ADCStep/FilterExpressions_Operator") -Or
            ($_ -eq "Search-ADCTask/FilterExpressions_Operator") -Or
            ($_ -eq "Search-ADCWorker/FilterExpressions_Operator")
        }
        {
            $v = "AND","OR"
            break
        }

        # Amazon.Deadline.MembershipLevel
        {
            ($_ -eq "Add-ADCMemberToFarm/MembershipLevel") -Or
            ($_ -eq "Add-ADCMemberToFleet/MembershipLevel") -Or
            ($_ -eq "Add-ADCMemberToJob/MembershipLevel") -Or
            ($_ -eq "Add-ADCMemberToQueue/MembershipLevel")
        }
        {
            $v = "CONTRIBUTOR","MANAGER","OWNER","VIEWER"
            break
        }

        # Amazon.Deadline.Period
        "Start-ADCSessionsStatisticsAggregation/Period"
        {
            $v = "DAILY","HOURLY","MONTHLY","WEEKLY"
            break
        }

        # Amazon.Deadline.PrincipalType
        {
            ($_ -eq "Add-ADCMemberToFarm/PrincipalType") -Or
            ($_ -eq "Add-ADCMemberToFleet/PrincipalType") -Or
            ($_ -eq "Add-ADCMemberToJob/PrincipalType") -Or
            ($_ -eq "Add-ADCMemberToQueue/PrincipalType")
        }
        {
            $v = "GROUP","USER"
            break
        }

        # Amazon.Deadline.QueueStatus
        "Get-ADCQueueList/Status"
        {
            $v = "IDLE","SCHEDULING","SCHEDULING_BLOCKED"
            break
        }

        # Amazon.Deadline.RunAs
        {
            ($_ -eq "New-ADCQueue/JobRunAsUser_RunAs") -Or
            ($_ -eq "Update-ADCQueue/JobRunAsUser_RunAs")
        }
        {
            $v = "QUEUE_CONFIGURED_USER","WORKER_AGENT_USER"
            break
        }

        # Amazon.Deadline.ServiceManagedFleetOperatingSystemFamily
        {
            ($_ -eq "New-ADCFleet/InstanceCapabilities_OsFamily") -Or
            ($_ -eq "Update-ADCFleet/InstanceCapabilities_OsFamily")
        }
        {
            $v = "LINUX","WINDOWS"
            break
        }

        # Amazon.Deadline.SessionLifecycleTargetStatus
        "Update-ADCSession/TargetLifecycleStatus"
        {
            $v = "ENDED"
            break
        }

        # Amazon.Deadline.StepTargetTaskRunStatus
        "Update-ADCStep/TargetTaskRunStatus"
        {
            $v = "CANCELED","FAILED","PENDING","READY","SUCCEEDED","SUSPENDED"
            break
        }

        # Amazon.Deadline.StorageProfileOperatingSystemFamily
        {
            ($_ -eq "New-ADCStorageProfile/OsFamily") -Or
            ($_ -eq "Update-ADCStorageProfile/OsFamily")
        }
        {
            $v = "LINUX","MACOS","WINDOWS"
            break
        }

        # Amazon.Deadline.TaskTargetRunStatus
        "Update-ADCTask/TargetRunStatus"
        {
            $v = "CANCELED","FAILED","PENDING","READY","SUCCEEDED","SUSPENDED"
            break
        }

        # Amazon.Deadline.UpdatedWorkerStatus
        "Update-ADCWorker/Status"
        {
            $v = "STARTED","STOPPED","STOPPING"
            break
        }

        # Amazon.Deadline.UpdateJobLifecycleStatus
        "Update-ADCJob/LifecycleStatus"
        {
            $v = "ARCHIVED"
            break
        }

        # Amazon.Deadline.UpdateQueueFleetAssociationStatus
        "Update-ADCQueueFleetAssociation/Status"
        {
            $v = "ACTIVE","STOP_SCHEDULING_AND_CANCEL_TASKS","STOP_SCHEDULING_AND_COMPLETE_TASKS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ADC_map = @{
    "Attachments_FileSystem"=@("New-ADCJob")
    "CustomerManaged_Mode"=@("New-ADCFleet","Update-ADCFleet")
    "DefaultBudgetAction"=@("New-ADCQueue","Update-ADCQueue")
    "FilterExpressions_Operator"=@("Search-ADCJob","Search-ADCStep","Search-ADCTask","Search-ADCWorker")
    "InstanceCapabilities_CpuArchitectureType"=@("New-ADCFleet","Update-ADCFleet")
    "InstanceCapabilities_OsFamily"=@("New-ADCFleet","Update-ADCFleet")
    "InstanceMarketOptions_Type"=@("New-ADCFleet","Update-ADCFleet")
    "JobRunAsUser_RunAs"=@("New-ADCQueue","Update-ADCQueue")
    "LifecycleStatus"=@("Update-ADCJob")
    "MembershipLevel"=@("Add-ADCMemberToFarm","Add-ADCMemberToFleet","Add-ADCMemberToJob","Add-ADCMemberToQueue")
    "OsFamily"=@("New-ADCStorageProfile","Update-ADCStorageProfile")
    "Period"=@("Start-ADCSessionsStatisticsAggregation")
    "PrincipalType"=@("Add-ADCMemberToFarm","Add-ADCMemberToFleet","Add-ADCMemberToJob","Add-ADCMemberToQueue")
    "Status"=@("Get-ADCBudgetList","Get-ADCFleetList","Get-ADCQueueList","Update-ADCBudget","Update-ADCQueueFleetAssociation","Update-ADCWorker")
    "TargetLifecycleStatus"=@("Update-ADCSession")
    "TargetRunStatus"=@("Update-ADCTask")
    "TargetTaskRunStatus"=@("New-ADCJob","Update-ADCJob","Update-ADCStep")
    "TemplateType"=@("New-ADCJob","New-ADCQueueEnvironment","Update-ADCQueueEnvironment")
    "WorkerCapabilities_CpuArchitectureType"=@("New-ADCFleet","Update-ADCFleet")
    "WorkerCapabilities_OsFamily"=@("New-ADCFleet","Update-ADCFleet")
}

_awsArgumentCompleterRegistration $ADC_Completers $ADC_map

$ADC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ADC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ADC_SelectMap = @{
    "Select"=@("Add-ADCMemberToFarm",
               "Add-ADCMemberToFleet",
               "Add-ADCMemberToJob",
               "Add-ADCMemberToQueue",
               "Get-ADCFleetRoleForRead",
               "Get-ADCFleetRoleForWorker",
               "Get-ADCQueueRoleForRead",
               "Get-ADCQueueRoleForUser",
               "Get-ADCQueueRoleForWorker",
               "Get-ADCBatchJobEntity",
               "Copy-ADCJobTemplate",
               "New-ADCBudget",
               "New-ADCFarm",
               "New-ADCFleet",
               "New-ADCJob",
               "New-ADCLicenseEndpoint",
               "New-ADCMonitor",
               "New-ADCQueue",
               "New-ADCQueueEnvironment",
               "New-ADCQueueFleetAssociation",
               "New-ADCStorageProfile",
               "New-ADCWorker",
               "Remove-ADCBudget",
               "Remove-ADCFarm",
               "Remove-ADCFleet",
               "Remove-ADCLicenseEndpoint",
               "Remove-ADCMeteredProduct",
               "Remove-ADCMonitor",
               "Remove-ADCQueue",
               "Remove-ADCQueueEnvironment",
               "Remove-ADCQueueFleetAssociation",
               "Remove-ADCStorageProfile",
               "Remove-ADCWorker",
               "Remove-ADCMemberFromFarm",
               "Remove-ADCMemberFromFleet",
               "Remove-ADCMemberFromJob",
               "Remove-ADCMemberFromQueue",
               "Get-ADCBudget",
               "Get-ADCFarm",
               "Get-ADCFleet",
               "Get-ADCJob",
               "Get-ADCLicenseEndpoint",
               "Get-ADCMonitor",
               "Get-ADCQueue",
               "Get-ADCQueueEnvironment",
               "Get-ADCQueueFleetAssociation",
               "Get-ADCSession",
               "Get-ADCSessionAction",
               "Get-ADCSessionsStatisticsAggregation",
               "Get-ADCStep",
               "Get-ADCStorageProfile",
               "Get-ADCStorageProfileForQueue",
               "Get-ADCTask",
               "Get-ADCWorker",
               "Get-ADCAvailableMeteredProductList",
               "Get-ADCBudgetList",
               "Get-ADCFarmMemberList",
               "Get-ADCFarmList",
               "Get-ADCFleetMemberList",
               "Get-ADCFleetList",
               "Get-ADCJobMemberList",
               "Get-ADCJobParameterDefinitionList",
               "Get-ADCJobList",
               "Get-ADCLicenseEndpointList",
               "Get-ADCMeteredProductList",
               "Get-ADCMonitorList",
               "Get-ADCQueueEnvironmentList",
               "Get-ADCQueueFleetAssociationList",
               "Get-ADCQueueMemberList",
               "Get-ADCQueueList",
               "Get-ADCSessionActionList",
               "Get-ADCSessionList",
               "Get-ADCSessionsForWorkerList",
               "Get-ADCStepConsumerList",
               "Get-ADCStepDependencyList",
               "Get-ADCStepList",
               "Get-ADCStorageProfileList",
               "Get-ADCStorageProfilesForQueueList",
               "Get-ADCResourceTag",
               "Get-ADCTaskList",
               "Get-ADCWorkerList",
               "Write-ADCMeteredProduct",
               "Search-ADCJob",
               "Search-ADCStep",
               "Search-ADCTask",
               "Search-ADCWorker",
               "Start-ADCSessionsStatisticsAggregation",
               "Add-ADCResourceTag",
               "Remove-ADCResourceTag",
               "Update-ADCBudget",
               "Update-ADCFarm",
               "Update-ADCFleet",
               "Update-ADCJob",
               "Update-ADCMonitor",
               "Update-ADCQueue",
               "Update-ADCQueueEnvironment",
               "Update-ADCQueueFleetAssociation",
               "Update-ADCSession",
               "Update-ADCStep",
               "Update-ADCStorageProfile",
               "Update-ADCTask",
               "Update-ADCWorker",
               "Update-ADCWorkerSchedule")
}

_awsArgumentCompleterRegistration $ADC_SelectCompleters $ADC_SelectMap
# Argument completions for service Amazon Detective


$DTCT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Detective.Field
        "Get-DTCTInvestigationList/SortCriteria_Field"
        {
            $v = "CREATED_TIME","SEVERITY","STATUS"
            break
        }

        # Amazon.Detective.IndicatorType
        "Get-DTCTIndicatorList/IndicatorType"
        {
            $v = "FLAGGED_IP_ADDRESS","IMPOSSIBLE_TRAVEL","NEW_ASO","NEW_GEOLOCATION","NEW_USER_AGENT","RELATED_FINDING","RELATED_FINDING_GROUP","TTP_OBSERVED"
            break
        }

        # Amazon.Detective.SortOrder
        "Get-DTCTInvestigationList/SortCriteria_SortOrder"
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.Detective.State
        "Update-DTCTInvestigationState/State"
        {
            $v = "ACTIVE","ARCHIVED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DTCT_map = @{
    "IndicatorType"=@("Get-DTCTIndicatorList")
    "SortCriteria_Field"=@("Get-DTCTInvestigationList")
    "SortCriteria_SortOrder"=@("Get-DTCTInvestigationList")
    "State"=@("Update-DTCTInvestigationState")
}

_awsArgumentCompleterRegistration $DTCT_Completers $DTCT_map

$DTCT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DTCT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DTCT_SelectMap = @{
    "Select"=@("Approve-DTCTInvitation",
               "Get-DTCTGraphMemberDatasource",
               "Get-DTCTMembershipDatasource",
               "New-DTCTGraph",
               "New-DTCTMember",
               "Remove-DTCTGraph",
               "Remove-DTCTMember",
               "Get-DTCTOrganizationConfiguration",
               "Disable-DTCTOrganizationAdminAccount",
               "Remove-DTCTMembership",
               "Enable-DTCTOrganizationAdminAccount",
               "Get-DTCTInvestigation",
               "Get-DTCTMember",
               "Get-DTCTDatasourcePackageList",
               "Get-DTCTGraphList",
               "Get-DTCTIndicatorList",
               "Get-DTCTInvestigationList",
               "Get-DTCTInvitationList",
               "Get-DTCTMemberList",
               "Get-DTCTOrganizationAdminAccountList",
               "Get-DTCTResourceTag",
               "Deny-DTCTInvitation",
               "Start-DTCTInvestigation",
               "Start-DTCTMonitoringMember",
               "Add-DTCTResourceTag",
               "Remove-DTCTResourceTag",
               "Update-DTCTDatasourcePackage",
               "Update-DTCTInvestigationState",
               "Update-DTCTOrganizationConfiguration")
}

_awsArgumentCompleterRegistration $DTCT_SelectCompleters $DTCT_SelectMap
# Argument completions for service AWS Device Farm


$DF_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DeviceFarm.ArtifactCategory
        "Get-DFArtifactList/Type"
        {
            $v = "FILE","LOG","SCREENSHOT"
            break
        }

        # Amazon.DeviceFarm.BillingMethod
        {
            ($_ -eq "Get-DFDevicePoolCompatibility/Configuration_BillingMethod") -Or
            ($_ -eq "New-DFRemoteAccessSession/Configuration_BillingMethod") -Or
            ($_ -eq "Submit-DFTestRun/Configuration_BillingMethod")
        }
        {
            $v = "METERED","UNMETERED"
            break
        }

        # Amazon.DeviceFarm.DevicePoolType
        "Get-DFDevicePoolList/Type"
        {
            $v = "CURATED","PRIVATE"
            break
        }

        # Amazon.DeviceFarm.InteractionMode
        "New-DFRemoteAccessSession/InteractionMode"
        {
            $v = "INTERACTIVE","NO_VIDEO","VIDEO_ONLY"
            break
        }

        # Amazon.DeviceFarm.NetworkProfileType
        {
            ($_ -eq "Get-DFNetworkProfileList/Type") -Or
            ($_ -eq "New-DFNetworkProfile/Type") -Or
            ($_ -eq "Update-DFNetworkProfile/Type")
        }
        {
            $v = "CURATED","PRIVATE"
            break
        }

        # Amazon.DeviceFarm.TestGridSessionArtifactCategory
        "Get-DFTestGridSessionArtifactList/Type"
        {
            $v = "LOG","VIDEO"
            break
        }

        # Amazon.DeviceFarm.TestGridSessionStatus
        "Get-DFTestGridSessionList/Status"
        {
            $v = "ACTIVE","CLOSED","ERRORED"
            break
        }

        # Amazon.DeviceFarm.TestType
        {
            ($_ -eq "Get-DFDevicePoolCompatibility/Test_Type") -Or
            ($_ -eq "Submit-DFTestRun/Test_Type") -Or
            ($_ -eq "Get-DFDevicePoolCompatibility/TestType")
        }
        {
            $v = "APPIUM_JAVA_JUNIT","APPIUM_JAVA_TESTNG","APPIUM_NODE","APPIUM_PYTHON","APPIUM_RUBY","APPIUM_WEB_JAVA_JUNIT","APPIUM_WEB_JAVA_TESTNG","APPIUM_WEB_NODE","APPIUM_WEB_PYTHON","APPIUM_WEB_RUBY","BUILTIN_FUZZ","INSTRUMENTATION","XCTEST","XCTEST_UI"
            break
        }

        # Amazon.DeviceFarm.UploadType
        {
            ($_ -eq "Get-DFUploadList/Type") -Or
            ($_ -eq "New-DFUpload/Type")
        }
        {
            $v = "ANDROID_APP","APPIUM_JAVA_JUNIT_TEST_PACKAGE","APPIUM_JAVA_JUNIT_TEST_SPEC","APPIUM_JAVA_TESTNG_TEST_PACKAGE","APPIUM_JAVA_TESTNG_TEST_SPEC","APPIUM_NODE_TEST_PACKAGE","APPIUM_NODE_TEST_SPEC","APPIUM_PYTHON_TEST_PACKAGE","APPIUM_PYTHON_TEST_SPEC","APPIUM_RUBY_TEST_PACKAGE","APPIUM_RUBY_TEST_SPEC","APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE","APPIUM_WEB_JAVA_JUNIT_TEST_SPEC","APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE","APPIUM_WEB_JAVA_TESTNG_TEST_SPEC","APPIUM_WEB_NODE_TEST_PACKAGE","APPIUM_WEB_NODE_TEST_SPEC","APPIUM_WEB_PYTHON_TEST_PACKAGE","APPIUM_WEB_PYTHON_TEST_SPEC","APPIUM_WEB_RUBY_TEST_PACKAGE","APPIUM_WEB_RUBY_TEST_SPEC","CALABASH_TEST_PACKAGE","EXTERNAL_DATA","INSTRUMENTATION_TEST_PACKAGE","INSTRUMENTATION_TEST_SPEC","IOS_APP","UIAUTOMATION_TEST_PACKAGE","UIAUTOMATOR_TEST_PACKAGE","WEB_APP","XCTEST_TEST_PACKAGE","XCTEST_UI_TEST_PACKAGE","XCTEST_UI_TEST_SPEC"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DF_map = @{
    "Configuration_BillingMethod"=@("Get-DFDevicePoolCompatibility","New-DFRemoteAccessSession","Submit-DFTestRun")
    "InteractionMode"=@("New-DFRemoteAccessSession")
    "Status"=@("Get-DFTestGridSessionList")
    "Test_Type"=@("Get-DFDevicePoolCompatibility","Submit-DFTestRun")
    "TestType"=@("Get-DFDevicePoolCompatibility")
    "Type"=@("Get-DFArtifactList","Get-DFDevicePoolList","Get-DFNetworkProfileList","Get-DFTestGridSessionArtifactList","Get-DFUploadList","New-DFNetworkProfile","New-DFUpload","Update-DFNetworkProfile")
}

_awsArgumentCompleterRegistration $DF_Completers $DF_map

$DF_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DF.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DF_SelectMap = @{
    "Select"=@("New-DFDevicePool",
               "New-DFInstanceProfile",
               "New-DFNetworkProfile",
               "New-DFProject",
               "New-DFRemoteAccessSession",
               "New-DFTestGridProject",
               "New-DFTestGridUrl",
               "New-DFUpload",
               "New-DFVPCEConfiguration",
               "Remove-DFDevicePool",
               "Remove-DFInstanceProfile",
               "Remove-DFNetworkProfile",
               "Remove-DFProject",
               "Remove-DFRemoteAccessSession",
               "Remove-DFRun",
               "Remove-DFTestGridProject",
               "Remove-DFUpload",
               "Remove-DFVPCEConfiguration",
               "Get-DFAccountSettingList",
               "Get-DFDevice",
               "Get-DFDeviceInstance",
               "Get-DFDevicePool",
               "Get-DFDevicePoolCompatibility",
               "Get-DFInstanceProfile",
               "Get-DFJob",
               "Get-DFNetworkProfile",
               "Get-DFOfferingStatus",
               "Get-DFProject",
               "Get-DFRemoteAccessSession",
               "Get-DFRun",
               "Get-DFSuite",
               "Get-DFTest",
               "Get-DFTestGridProject",
               "Get-DFTestGridSession",
               "Get-DFUpload",
               "Get-DFVPCEConfiguration",
               "Install-DFToRemoteAccessSession",
               "Get-DFArtifactList",
               "Get-DFDeviceInstanceList",
               "Get-DFDevicePoolList",
               "Get-DFDeviceList",
               "Get-DFInstanceProfileList",
               "Get-DFJobList",
               "Get-DFNetworkProfileList",
               "Get-DFOfferingPromotion",
               "Get-DFOffering",
               "Get-DFOfferingTransaction",
               "Get-DFProjectList",
               "Get-DFRemoteAccessSessionList",
               "Get-DFRunList",
               "Get-DFSampleList",
               "Get-DFSuiteList",
               "Get-DFResourceTag",
               "Get-DFTestGridProjectList",
               "Get-DFTestGridSessionActionList",
               "Get-DFTestGridSessionArtifactList",
               "Get-DFTestGridSessionList",
               "Get-DFTestList",
               "Get-DFUniqueProblemList",
               "Get-DFUploadList",
               "Get-DFVPCEConfigurationList",
               "New-DFOfferingPurchase",
               "New-DFOfferingRenewal",
               "Submit-DFTestRun",
               "Stop-DFJob",
               "Stop-DFRemoteAccessSession",
               "Stop-DFRun",
               "Add-DFResourceTag",
               "Remove-DFResourceTag",
               "Update-DFDeviceInstance",
               "Update-DFDevicePool",
               "Update-DFInstanceProfile",
               "Update-DFNetworkProfile",
               "Update-DFProject",
               "Update-DFTestGridProject",
               "Update-DFUpload",
               "Update-DFVPCEConfiguration")
}

_awsArgumentCompleterRegistration $DF_SelectCompleters $DF_SelectMap
# Argument completions for service Amazon DevOps Guru


$DGURU_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DevOpsGuru.EventClass
        "Get-DGURUEventList/Filters_EventClass"
        {
            $v = "CONFIG_CHANGE","DEPLOYMENT","INFRASTRUCTURE","SCHEMA_CHANGE","SECURITY_CHANGE"
            break
        }

        # Amazon.DevOpsGuru.EventDataSource
        "Get-DGURUEventList/Filters_DataSource"
        {
            $v = "AWS_CLOUD_TRAIL","AWS_CODE_DEPLOY"
            break
        }

        # Amazon.DevOpsGuru.EventSourceOptInStatus
        "Update-DGURUEventSourcesConfig/AmazonCodeGuruProfiler_Status"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.DevOpsGuru.InsightType
        {
            ($_ -eq "Get-DGURUOrganizationInsightList/Any_Type") -Or
            ($_ -eq "Get-DGURUOrganizationInsightList/Closed_Type") -Or
            ($_ -eq "Get-DGURUOrganizationInsightList/Ongoing_Type") -Or
            ($_ -eq "Search-DGURUInsight/Type") -Or
            ($_ -eq "Search-DGURUOrganizationInsight/Type")
        }
        {
            $v = "PROACTIVE","REACTIVE"
            break
        }

        # Amazon.DevOpsGuru.Locale
        "Get-DGURURecommendationList/Locale"
        {
            $v = "DE_DE","EN_GB","EN_US","ES_ES","FR_FR","IT_IT","JA_JP","KO_KR","PT_BR","ZH_CN","ZH_TW"
            break
        }

        # Amazon.DevOpsGuru.OptInStatus
        {
            ($_ -eq "Update-DGURUServiceIntegration/KMSServerSideEncryption_OptInStatus") -Or
            ($_ -eq "Update-DGURUServiceIntegration/LogsAnomalyDetection_OptInStatus")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.DevOpsGuru.OrganizationResourceCollectionType
        "Get-DGURUOrganizationResourceCollectionHealth/OrganizationResourceCollectionType"
        {
            $v = "AWS_ACCOUNT","AWS_CLOUD_FORMATION","AWS_SERVICE","AWS_TAGS"
            break
        }

        # Amazon.DevOpsGuru.ResourceCollectionType
        {
            ($_ -eq "Get-DGURUResourceCollection/ResourceCollectionType") -Or
            ($_ -eq "Get-DGURUResourceCollectionHealth/ResourceCollectionType")
        }
        {
            $v = "AWS_CLOUD_FORMATION","AWS_SERVICE","AWS_TAGS"
            break
        }

        # Amazon.DevOpsGuru.ResourcePermission
        "Get-DGURUMonitoredResourceList/Filters_ResourcePermission"
        {
            $v = "FULL_PERMISSION","MISSING_PERMISSION"
            break
        }

        # Amazon.DevOpsGuru.ServerSideEncryptionType
        "Update-DGURUServiceIntegration/KMSServerSideEncryption_Type"
        {
            $v = "AWS_OWNED_KMS_KEY","CUSTOMER_MANAGED_KEY"
            break
        }

        # Amazon.DevOpsGuru.UpdateResourceCollectionAction
        "Update-DGURUResourceCollection/Action"
        {
            $v = "ADD","REMOVE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DGURU_map = @{
    "Action"=@("Update-DGURUResourceCollection")
    "AmazonCodeGuruProfiler_Status"=@("Update-DGURUEventSourcesConfig")
    "Any_Type"=@("Get-DGURUOrganizationInsightList")
    "Closed_Type"=@("Get-DGURUOrganizationInsightList")
    "Filters_DataSource"=@("Get-DGURUEventList")
    "Filters_EventClass"=@("Get-DGURUEventList")
    "Filters_ResourcePermission"=@("Get-DGURUMonitoredResourceList")
    "KMSServerSideEncryption_OptInStatus"=@("Update-DGURUServiceIntegration")
    "KMSServerSideEncryption_Type"=@("Update-DGURUServiceIntegration")
    "Locale"=@("Get-DGURURecommendationList")
    "LogsAnomalyDetection_OptInStatus"=@("Update-DGURUServiceIntegration")
    "Ongoing_Type"=@("Get-DGURUOrganizationInsightList")
    "OrganizationResourceCollectionType"=@("Get-DGURUOrganizationResourceCollectionHealth")
    "ResourceCollectionType"=@("Get-DGURUResourceCollection","Get-DGURUResourceCollectionHealth")
    "Type"=@("Search-DGURUInsight","Search-DGURUOrganizationInsight")
}

_awsArgumentCompleterRegistration $DGURU_Completers $DGURU_map

$DGURU_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DGURU.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DGURU_SelectMap = @{
    "Select"=@("Add-DGURUNotificationChannel",
               "Remove-DGURUInsight",
               "Get-DGURUAccountHealth",
               "Get-DGURUAccountOverview",
               "Get-DGURUAnomaly",
               "Get-DGURUEventSourcesConfig",
               "Get-DGURUFeedback",
               "Get-DGURUInsight",
               "Get-DGURUOrganizationHealth",
               "Get-DGURUOrganizationOverview",
               "Get-DGURUOrganizationResourceCollectionHealth",
               "Get-DGURUResourceCollectionHealth",
               "Get-DGURUServiceIntegration",
               "Get-DGURUCostEstimation",
               "Get-DGURUResourceCollection",
               "Get-DGURUAnomaliesForInsightList",
               "Get-DGURUAnomalousLogGroupList",
               "Get-DGURUEventList",
               "Get-DGURUInsightList",
               "Get-DGURUMonitoredResourceList",
               "Get-DGURUNotificationChannelList",
               "Get-DGURUOrganizationInsightList",
               "Get-DGURURecommendationList",
               "Write-DGURUFeedback",
               "Remove-DGURUNotificationChannel",
               "Search-DGURUInsight",
               "Search-DGURUOrganizationInsight",
               "Start-DGURUCostEstimation",
               "Update-DGURUEventSourcesConfig",
               "Update-DGURUResourceCollection",
               "Update-DGURUServiceIntegration")
}

_awsArgumentCompleterRegistration $DGURU_SelectCompleters $DGURU_SelectMap
# Argument completions for service AWS Direct Connect


$DC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DirectConnect.AddressFamily
        {
            ($_ -eq "New-DCBGPPeer/NewBGPPeer_AddressFamily") -Or
            ($_ -eq "New-DCPrivateVirtualInterface/NewPrivateVirtualInterface_AddressFamily") -Or
            ($_ -eq "Enable-DCPrivateVirtualInterface/NewPrivateVirtualInterfaceAllocation_AddressFamily") -Or
            ($_ -eq "New-DCPublicVirtualInterface/NewPublicVirtualInterface_AddressFamily") -Or
            ($_ -eq "Enable-DCPublicVirtualInterface/NewPublicVirtualInterfaceAllocation_AddressFamily") -Or
            ($_ -eq "New-DCTransitVirtualInterface/NewTransitVirtualInterface_AddressFamily") -Or
            ($_ -eq "Enable-DCTransitVirtualInterface/NewTransitVirtualInterfaceAllocation_AddressFamily")
        }
        {
            $v = "ipv4","ipv6"
            break
        }

        # Amazon.DirectConnect.LoaContentType
        {
            ($_ -eq "Get-DCConnectionLoa/LoaContentType") -Or
            ($_ -eq "Get-DCInterconnectLoa/LoaContentType") -Or
            ($_ -eq "Get-DCLoa/LoaContentType")
        }
        {
            $v = "application/pdf"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DC_map = @{
    "LoaContentType"=@("Get-DCConnectionLoa","Get-DCInterconnectLoa","Get-DCLoa")
    "NewBGPPeer_AddressFamily"=@("New-DCBGPPeer")
    "NewPrivateVirtualInterface_AddressFamily"=@("New-DCPrivateVirtualInterface")
    "NewPrivateVirtualInterfaceAllocation_AddressFamily"=@("Enable-DCPrivateVirtualInterface")
    "NewPublicVirtualInterface_AddressFamily"=@("New-DCPublicVirtualInterface")
    "NewPublicVirtualInterfaceAllocation_AddressFamily"=@("Enable-DCPublicVirtualInterface")
    "NewTransitVirtualInterface_AddressFamily"=@("New-DCTransitVirtualInterface")
    "NewTransitVirtualInterfaceAllocation_AddressFamily"=@("Enable-DCTransitVirtualInterface")
}

_awsArgumentCompleterRegistration $DC_Completers $DC_map

$DC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DC_SelectMap = @{
    "Select"=@("Confirm-DCDirectConnectGatewayAssociationProposal",
               "Enable-DCConnectionOnInterconnect",
               "New-DCHostedConnection",
               "Enable-DCPrivateVirtualInterface",
               "Enable-DCPublicVirtualInterface",
               "Enable-DCTransitVirtualInterface",
               "Register-DCConnectionWithLag",
               "Register-DCHostedConnection",
               "Add-DCMacSecKey",
               "Register-DCVirtualInterface",
               "Confirm-DCConnection",
               "Confirm-DCCustomerAgreement",
               "Confirm-DCPrivateVirtualInterface",
               "Confirm-DCPublicVirtualInterface",
               "Confirm-DCTransitVirtualInterface",
               "New-DCBGPPeer",
               "New-DCConnection",
               "New-DCGateway",
               "New-DCGatewayAssociation",
               "New-DCDirectConnectGatewayAssociationProposal",
               "New-DCInterconnect",
               "New-DCLag",
               "New-DCPrivateVirtualInterface",
               "New-DCPublicVirtualInterface",
               "New-DCTransitVirtualInterface",
               "Remove-DCBGPPeer",
               "Remove-DCConnection",
               "Remove-DCGateway",
               "Remove-DCGatewayAssociation",
               "Remove-DCDirectConnectGatewayAssociationProposal",
               "Remove-DCInterconnect",
               "Remove-DCLag",
               "Remove-DCVirtualInterface",
               "Get-DCConnectionLoa",
               "Get-DCConnection",
               "Get-DCConnectionsOnInterconnect",
               "Get-DCCustomerMetadata",
               "Get-DCDirectConnectGatewayAssociationProposal",
               "Get-DCGatewayAssociation",
               "Get-DCGatewayAttachment",
               "Get-DCGateway",
               "Get-DCHostedConnection",
               "Get-DCInterconnectLoa",
               "Get-DCInterconnect",
               "Get-DCLag",
               "Get-DCLoa",
               "Get-DCLocation",
               "Get-DCRouterConfiguration",
               "Get-DCResourceTag",
               "Get-DCVirtualGateway",
               "Get-DCVirtualInterface",
               "Unregister-DCConnectionFromLag",
               "Remove-DCMacSecKey",
               "Get-DCVirtualInterfaceTestHistoryList",
               "Start-DCBgpFailoverTest",
               "Stop-DCBgpFailoverTest",
               "Add-DCResourceTag",
               "Remove-DCResourceTag",
               "Update-DCConnection",
               "Update-DCDirectConnectGateway",
               "Update-DCDirectConnectGatewayAssociation",
               "Update-DCLag",
               "Update-DCVirtualInterfaceAttribute")
}

_awsArgumentCompleterRegistration $DC_SelectCompleters $DC_SelectMap
# Argument completions for service AWS Directory Service Data


$DSD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DirectoryServiceData.GroupScope
        {
            ($_ -eq "New-DSDGroup/GroupScope") -Or
            ($_ -eq "Update-DSDGroup/GroupScope")
        }
        {
            $v = "BuiltinLocal","DomainLocal","Global","Universal"
            break
        }

        # Amazon.DirectoryServiceData.GroupType
        {
            ($_ -eq "New-DSDGroup/GroupType") -Or
            ($_ -eq "Update-DSDGroup/GroupType")
        }
        {
            $v = "Distribution","Security"
            break
        }

        # Amazon.DirectoryServiceData.UpdateType
        {
            ($_ -eq "Update-DSDGroup/UpdateType") -Or
            ($_ -eq "Update-DSDUser/UpdateType")
        }
        {
            $v = "ADD","REMOVE","REPLACE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DSD_map = @{
    "GroupScope"=@("New-DSDGroup","Update-DSDGroup")
    "GroupType"=@("New-DSDGroup","Update-DSDGroup")
    "UpdateType"=@("Update-DSDGroup","Update-DSDUser")
}

_awsArgumentCompleterRegistration $DSD_Completers $DSD_map

$DSD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DSD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DSD_SelectMap = @{
    "Select"=@("Add-DSDGroupMember",
               "New-DSDGroup",
               "New-DSDUser",
               "Remove-DSDGroup",
               "Remove-DSDUser",
               "Get-DSDGroup",
               "Get-DSDUser",
               "Disable-DSDUser",
               "Get-DSDGroupMemberList",
               "Get-DSDGroupList",
               "Get-DSDGroupsForMemberList",
               "Get-DSDUserList",
               "Remove-DSDGroupMember",
               "Search-DSDGroup",
               "Search-DSDUser",
               "Update-DSDGroup",
               "Update-DSDUser")
}

_awsArgumentCompleterRegistration $DSD_SelectCompleters $DSD_SelectMap
# Argument completions for service AWS Application Discovery Service


$ADS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ApplicationDiscoveryService.ConfigurationItemType
        "Get-ADSConfigurationList/ConfigurationType"
        {
            $v = "APPLICATION","CONNECTION","PROCESS","SERVER"
            break
        }

        # Amazon.ApplicationDiscoveryService.DeletionConfigurationItemType
        "Start-ADSBatchDeleteConfigurationTask/ConfigurationType"
        {
            $v = "SERVER"
            break
        }

        # Amazon.ApplicationDiscoveryService.OfferingClass
        "Start-ADSExportTask/ReservedInstanceOptions_OfferingClass"
        {
            $v = "CONVERTIBLE","STANDARD"
            break
        }

        # Amazon.ApplicationDiscoveryService.PurchasingOption
        "Start-ADSExportTask/ReservedInstanceOptions_PurchasingOption"
        {
            $v = "ALL_UPFRONT","NO_UPFRONT","PARTIAL_UPFRONT"
            break
        }

        # Amazon.ApplicationDiscoveryService.Tenancy
        "Start-ADSExportTask/Ec2RecommendationsPreferences_Tenancy"
        {
            $v = "DEDICATED","SHARED"
            break
        }

        # Amazon.ApplicationDiscoveryService.TermLength
        "Start-ADSExportTask/ReservedInstanceOptions_TermLength"
        {
            $v = "ONE_YEAR","THREE_YEAR"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ADS_map = @{
    "ConfigurationType"=@("Get-ADSConfigurationList","Start-ADSBatchDeleteConfigurationTask")
    "Ec2RecommendationsPreferences_Tenancy"=@("Start-ADSExportTask")
    "ReservedInstanceOptions_OfferingClass"=@("Start-ADSExportTask")
    "ReservedInstanceOptions_PurchasingOption"=@("Start-ADSExportTask")
    "ReservedInstanceOptions_TermLength"=@("Start-ADSExportTask")
}

_awsArgumentCompleterRegistration $ADS_Completers $ADS_map

$ADS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ADS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ADS_SelectMap = @{
    "Select"=@("Add-ADSConfigurationItemsToApplication",
               "Remove-ADSBatchAgent",
               "Remove-ADSImportDataBatch",
               "New-ADSApplication",
               "New-ADSTag",
               "Remove-ADSApplication",
               "Remove-ADSTag",
               "Get-ADSAgent",
               "Get-ADSBatchDeleteConfigurationTask",
               "Get-ADSConfiguration",
               "Get-ADSContinuousExport",
               "Get-ADSExportConfiguration",
               "Get-ADSExportTask",
               "Get-ADSImportTask",
               "Get-ADSTag",
               "Remove-ADSConfigurationItemsFromApplication",
               "Get-ADSExportConfigurationsId",
               "Get-ADSDiscoverySummary",
               "Get-ADSConfigurationList",
               "Get-ADSServerNeighborList",
               "Start-ADSBatchDeleteConfigurationTask",
               "Start-ADSContinuousExport",
               "Start-ADSDataCollectionByAgentId",
               "Start-ADSExportTask",
               "Start-ADSImportTask",
               "Stop-ADSContinuousExport",
               "Stop-ADSDataCollectionByAgentId",
               "Update-ADSApplication")
}

_awsArgumentCompleterRegistration $ADS_SelectCompleters $ADS_SelectMap
# Argument completions for service Amazon Data Lifecycle Manager


$DLM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DLM.DefaultPoliciesTypeValues
        "Get-DLMLifecyclePolicySummary/DefaultPolicyType"
        {
            $v = "ALL","INSTANCE","VOLUME"
            break
        }

        # Amazon.DLM.DefaultPolicyTypeValues
        "New-DLMLifecyclePolicy/DefaultPolicy"
        {
            $v = "INSTANCE","VOLUME"
            break
        }

        # Amazon.DLM.EventSourceValues
        {
            ($_ -eq "New-DLMLifecyclePolicy/EventSource_Type") -Or
            ($_ -eq "Update-DLMLifecyclePolicy/EventSource_Type")
        }
        {
            $v = "MANAGED_CWE"
            break
        }

        # Amazon.DLM.EventTypeValues
        {
            ($_ -eq "New-DLMLifecyclePolicy/Parameters_EventType") -Or
            ($_ -eq "Update-DLMLifecyclePolicy/Parameters_EventType")
        }
        {
            $v = "shareSnapshot"
            break
        }

        # Amazon.DLM.GettablePolicyStateValues
        "Get-DLMLifecyclePolicySummary/State"
        {
            $v = "DISABLED","ENABLED","ERROR"
            break
        }

        # Amazon.DLM.PolicyLanguageValues
        {
            ($_ -eq "New-DLMLifecyclePolicy/PolicyDetails_PolicyLanguage") -Or
            ($_ -eq "Update-DLMLifecyclePolicy/PolicyDetails_PolicyLanguage")
        }
        {
            $v = "SIMPLIFIED","STANDARD"
            break
        }

        # Amazon.DLM.PolicyTypeValues
        {
            ($_ -eq "New-DLMLifecyclePolicy/PolicyDetails_PolicyType") -Or
            ($_ -eq "Update-DLMLifecyclePolicy/PolicyDetails_PolicyType")
        }
        {
            $v = "EBS_SNAPSHOT_MANAGEMENT","EVENT_BASED_POLICY","IMAGE_MANAGEMENT"
            break
        }

        # Amazon.DLM.ResourceTypeValues
        {
            ($_ -eq "New-DLMLifecyclePolicy/PolicyDetails_SimplifiedResourceType") -Or
            ($_ -eq "Update-DLMLifecyclePolicy/PolicyDetails_SimplifiedResourceType")
        }
        {
            $v = "INSTANCE","VOLUME"
            break
        }

        # Amazon.DLM.SettablePolicyStateValues
        {
            ($_ -eq "New-DLMLifecyclePolicy/State") -Or
            ($_ -eq "Update-DLMLifecyclePolicy/State")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DLM_map = @{
    "DefaultPolicy"=@("New-DLMLifecyclePolicy")
    "DefaultPolicyType"=@("Get-DLMLifecyclePolicySummary")
    "EventSource_Type"=@("New-DLMLifecyclePolicy","Update-DLMLifecyclePolicy")
    "Parameters_EventType"=@("New-DLMLifecyclePolicy","Update-DLMLifecyclePolicy")
    "PolicyDetails_PolicyLanguage"=@("New-DLMLifecyclePolicy","Update-DLMLifecyclePolicy")
    "PolicyDetails_PolicyType"=@("New-DLMLifecyclePolicy","Update-DLMLifecyclePolicy")
    "PolicyDetails_SimplifiedResourceType"=@("New-DLMLifecyclePolicy","Update-DLMLifecyclePolicy")
    "State"=@("Get-DLMLifecyclePolicySummary","New-DLMLifecyclePolicy","Update-DLMLifecyclePolicy")
}

_awsArgumentCompleterRegistration $DLM_Completers $DLM_map

$DLM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DLM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DLM_SelectMap = @{
    "Select"=@("New-DLMLifecyclePolicy",
               "Remove-DLMLifecyclePolicy",
               "Get-DLMLifecyclePolicySummary",
               "Get-DLMLifecyclePolicy",
               "Get-DLMResourceTag",
               "Add-DLMResourceTag",
               "Remove-DLMResourceTag",
               "Update-DLMLifecyclePolicy")
}

_awsArgumentCompleterRegistration $DLM_SelectCompleters $DLM_SelectMap
# Argument completions for service AWS Database Migration Service


$DMS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DatabaseMigrationService.AuthMechanismValue
        {
            ($_ -eq "Edit-DMSDataProvider/MongoDbSettings_AuthMechanism") -Or
            ($_ -eq "Edit-DMSEndpoint/MongoDbSettings_AuthMechanism") -Or
            ($_ -eq "New-DMSDataProvider/MongoDbSettings_AuthMechanism") -Or
            ($_ -eq "New-DMSEndpoint/MongoDbSettings_AuthMechanism")
        }
        {
            $v = "default","mongodb_cr","scram_sha_1"
            break
        }

        # Amazon.DatabaseMigrationService.AuthTypeValue
        {
            ($_ -eq "Edit-DMSDataProvider/MongoDbSettings_AuthType") -Or
            ($_ -eq "Edit-DMSEndpoint/MongoDbSettings_AuthType") -Or
            ($_ -eq "New-DMSDataProvider/MongoDbSettings_AuthType") -Or
            ($_ -eq "New-DMSEndpoint/MongoDbSettings_AuthType")
        }
        {
            $v = "no","password"
            break
        }

        # Amazon.DatabaseMigrationService.CannedAclForObjectsValue
        {
            ($_ -eq "Edit-DMSEndpoint/S3Settings_CannedAclForObject") -Or
            ($_ -eq "New-DMSEndpoint/S3Settings_CannedAclForObject")
        }
        {
            $v = "authenticated-read","aws-exec-read","bucket-owner-full-control","bucket-owner-read","none","private","public-read","public-read-write"
            break
        }

        # Amazon.DatabaseMigrationService.CharLengthSemantics
        {
            ($_ -eq "Edit-DMSEndpoint/OracleSettings_CharLengthSemantic") -Or
            ($_ -eq "New-DMSEndpoint/OracleSettings_CharLengthSemantic")
        }
        {
            $v = "byte","char","default"
            break
        }

        # Amazon.DatabaseMigrationService.CompressionTypeValue
        {
            ($_ -eq "Edit-DMSEndpoint/S3Settings_CompressionType") -Or
            ($_ -eq "New-DMSEndpoint/S3Settings_CompressionType")
        }
        {
            $v = "gzip","none"
            break
        }

        # Amazon.DatabaseMigrationService.DatabaseMode
        {
            ($_ -eq "Edit-DMSEndpoint/PostgreSQLSettings_DatabaseMode") -Or
            ($_ -eq "New-DMSEndpoint/PostgreSQLSettings_DatabaseMode")
        }
        {
            $v = "babelfish","default"
            break
        }

        # Amazon.DatabaseMigrationService.DataFormatValue
        {
            ($_ -eq "Edit-DMSEndpoint/S3Settings_DataFormat") -Or
            ($_ -eq "New-DMSEndpoint/S3Settings_DataFormat")
        }
        {
            $v = "csv","parquet"
            break
        }

        # Amazon.DatabaseMigrationService.DatePartitionDelimiterValue
        {
            ($_ -eq "Edit-DMSEndpoint/S3Settings_DatePartitionDelimiter") -Or
            ($_ -eq "New-DMSEndpoint/S3Settings_DatePartitionDelimiter")
        }
        {
            $v = "DASH","NONE","SLASH","UNDERSCORE"
            break
        }

        # Amazon.DatabaseMigrationService.DatePartitionSequenceValue
        {
            ($_ -eq "Edit-DMSEndpoint/S3Settings_DatePartitionSequence") -Or
            ($_ -eq "New-DMSEndpoint/S3Settings_DatePartitionSequence")
        }
        {
            $v = "DDMMYYYY","MMYYYYDD","YYYYMM","YYYYMMDD","YYYYMMDDHH"
            break
        }

        # Amazon.DatabaseMigrationService.DmsSslModeValue
        {
            ($_ -eq "Edit-DMSDataProvider/DocDbSettings_SslMode") -Or
            ($_ -eq "New-DMSDataProvider/DocDbSettings_SslMode") -Or
            ($_ -eq "Edit-DMSDataProvider/MariaDbSettings_SslMode") -Or
            ($_ -eq "New-DMSDataProvider/MariaDbSettings_SslMode") -Or
            ($_ -eq "Edit-DMSDataProvider/MicrosoftSqlServerSettings_SslMode") -Or
            ($_ -eq "New-DMSDataProvider/MicrosoftSqlServerSettings_SslMode") -Or
            ($_ -eq "Edit-DMSDataProvider/MongoDbSettings_SslMode") -Or
            ($_ -eq "New-DMSDataProvider/MongoDbSettings_SslMode") -Or
            ($_ -eq "Edit-DMSDataProvider/MySqlSettings_SslMode") -Or
            ($_ -eq "New-DMSDataProvider/MySqlSettings_SslMode") -Or
            ($_ -eq "Edit-DMSDataProvider/OracleSettings_SslMode") -Or
            ($_ -eq "New-DMSDataProvider/OracleSettings_SslMode") -Or
            ($_ -eq "Edit-DMSDataProvider/PostgreSqlSettings_SslMode") -Or
            ($_ -eq "New-DMSDataProvider/PostgreSqlSettings_SslMode") -Or
            ($_ -eq "Edit-DMSEndpoint/SslMode") -Or
            ($_ -eq "New-DMSEndpoint/SslMode")
        }
        {
            $v = "none","require","verify-ca","verify-full"
            break
        }

        # Amazon.DatabaseMigrationService.EncodingTypeValue
        {
            ($_ -eq "Edit-DMSEndpoint/S3Settings_EncodingType") -Or
            ($_ -eq "New-DMSEndpoint/S3Settings_EncodingType")
        }
        {
            $v = "plain","plain-dictionary","rle-dictionary"
            break
        }

        # Amazon.DatabaseMigrationService.EncryptionModeValue
        {
            ($_ -eq "Edit-DMSEndpoint/RedshiftSettings_EncryptionMode") -Or
            ($_ -eq "New-DMSEndpoint/RedshiftSettings_EncryptionMode") -Or
            ($_ -eq "Edit-DMSEndpoint/S3Settings_EncryptionMode") -Or
            ($_ -eq "New-DMSEndpoint/S3Settings_EncryptionMode")
        }
        {
            $v = "sse-kms","sse-s3"
            break
        }

        # Amazon.DatabaseMigrationService.KafkaSaslMechanism
        {
            ($_ -eq "Edit-DMSEndpoint/KafkaSettings_SaslMechanism") -Or
            ($_ -eq "New-DMSEndpoint/KafkaSettings_SaslMechanism")
        }
        {
            $v = "plain","scram-sha-512"
            break
        }

        # Amazon.DatabaseMigrationService.KafkaSecurityProtocol
        {
            ($_ -eq "Edit-DMSEndpoint/KafkaSettings_SecurityProtocol") -Or
            ($_ -eq "New-DMSEndpoint/KafkaSettings_SecurityProtocol")
        }
        {
            $v = "plaintext","sasl-ssl","ssl-authentication","ssl-encryption"
            break
        }

        # Amazon.DatabaseMigrationService.KafkaSslEndpointIdentificationAlgorithm
        {
            ($_ -eq "Edit-DMSEndpoint/KafkaSettings_SslEndpointIdentificationAlgorithm") -Or
            ($_ -eq "New-DMSEndpoint/KafkaSettings_SslEndpointIdentificationAlgorithm")
        }
        {
            $v = "https","none"
            break
        }

        # Amazon.DatabaseMigrationService.LongVarcharMappingType
        {
            ($_ -eq "Edit-DMSEndpoint/PostgreSQLSettings_MapLongVarcharAs") -Or
            ($_ -eq "New-DMSEndpoint/PostgreSQLSettings_MapLongVarcharAs")
        }
        {
            $v = "clob","nclob","wstring"
            break
        }

        # Amazon.DatabaseMigrationService.MessageFormatValue
        {
            ($_ -eq "Edit-DMSEndpoint/KafkaSettings_MessageFormat") -Or
            ($_ -eq "New-DMSEndpoint/KafkaSettings_MessageFormat") -Or
            ($_ -eq "Edit-DMSEndpoint/KinesisSettings_MessageFormat") -Or
            ($_ -eq "New-DMSEndpoint/KinesisSettings_MessageFormat")
        }
        {
            $v = "json","json-unformatted"
            break
        }

        # Amazon.DatabaseMigrationService.MigrationTypeValue
        {
            ($_ -eq "Edit-DMSDataMigration/DataMigrationType") -Or
            ($_ -eq "New-DMSDataMigration/DataMigrationType") -Or
            ($_ -eq "Edit-DMSReplicationTask/MigrationType") -Or
            ($_ -eq "Get-DMSApplicableIndividualAssessment/MigrationType") -Or
            ($_ -eq "New-DMSReplicationTask/MigrationType") -Or
            ($_ -eq "Edit-DMSReplicationConfig/ReplicationType") -Or
            ($_ -eq "New-DMSReplicationConfig/ReplicationType")
        }
        {
            $v = "cdc","full-load","full-load-and-cdc"
            break
        }

        # Amazon.DatabaseMigrationService.NestingLevelValue
        {
            ($_ -eq "Edit-DMSEndpoint/DocDbSettings_NestingLevel") -Or
            ($_ -eq "New-DMSEndpoint/DocDbSettings_NestingLevel") -Or
            ($_ -eq "Edit-DMSEndpoint/MongoDbSettings_NestingLevel") -Or
            ($_ -eq "New-DMSEndpoint/MongoDbSettings_NestingLevel")
        }
        {
            $v = "none","one"
            break
        }

        # Amazon.DatabaseMigrationService.OriginTypeValue
        {
            ($_ -eq "Start-DMSMetadataModelExportAsScript/Origin") -Or
            ($_ -eq "Start-DMSMetadataModelImport/Origin")
        }
        {
            $v = "SOURCE","TARGET"
            break
        }

        # Amazon.DatabaseMigrationService.ParquetVersionValue
        {
            ($_ -eq "Edit-DMSEndpoint/S3Settings_ParquetVersion") -Or
            ($_ -eq "New-DMSEndpoint/S3Settings_ParquetVersion")
        }
        {
            $v = "parquet-1-0","parquet-2-0"
            break
        }

        # Amazon.DatabaseMigrationService.PluginNameValue
        {
            ($_ -eq "Edit-DMSEndpoint/PostgreSQLSettings_PluginName") -Or
            ($_ -eq "New-DMSEndpoint/PostgreSQLSettings_PluginName")
        }
        {
            $v = "no-preference","pglogical","test-decoding"
            break
        }

        # Amazon.DatabaseMigrationService.RedisAuthTypeValue
        {
            ($_ -eq "Edit-DMSEndpoint/RedisSettings_AuthType") -Or
            ($_ -eq "New-DMSEndpoint/RedisSettings_AuthType")
        }
        {
            $v = "auth-role","auth-token","none"
            break
        }

        # Amazon.DatabaseMigrationService.ReloadOptionValue
        {
            ($_ -eq "Restore-DMSReplicationTable/ReloadOption") -Or
            ($_ -eq "Restore-DMSTable/ReloadOption")
        }
        {
            $v = "data-reload","validate-only"
            break
        }

        # Amazon.DatabaseMigrationService.ReplicationEndpointTypeValue
        {
            ($_ -eq "Edit-DMSEndpoint/EndpointType") -Or
            ($_ -eq "New-DMSEndpoint/EndpointType")
        }
        {
            $v = "source","target"
            break
        }

        # Amazon.DatabaseMigrationService.SafeguardPolicy
        {
            ($_ -eq "Edit-DMSEndpoint/MicrosoftSQLServerSettings_SafeguardPolicy") -Or
            ($_ -eq "New-DMSEndpoint/MicrosoftSQLServerSettings_SafeguardPolicy")
        }
        {
            $v = "exclusive-automatic-truncation","rely-on-sql-server-replication-agent","shared-automatic-truncation"
            break
        }

        # Amazon.DatabaseMigrationService.SourceType
        "Get-DMSEvent/SourceType"
        {
            $v = "replication-instance"
            break
        }

        # Amazon.DatabaseMigrationService.SslSecurityProtocolValue
        {
            ($_ -eq "Edit-DMSEndpoint/RedisSettings_SslSecurityProtocol") -Or
            ($_ -eq "New-DMSEndpoint/RedisSettings_SslSecurityProtocol")
        }
        {
            $v = "plaintext","ssl-encryption"
            break
        }

        # Amazon.DatabaseMigrationService.StartReplicationMigrationTypeValue
        "Start-DMSDataMigration/StartType"
        {
            $v = "reload-target","resume-processing","start-replication"
            break
        }

        # Amazon.DatabaseMigrationService.StartReplicationTaskTypeValue
        "Start-DMSReplicationTask/StartReplicationTaskType"
        {
            $v = "reload-target","resume-processing","start-replication"
            break
        }

        # Amazon.DatabaseMigrationService.TargetDbType
        {
            ($_ -eq "Edit-DMSEndpoint/GcpMySQLSettings_TargetDbType") -Or
            ($_ -eq "New-DMSEndpoint/GcpMySQLSettings_TargetDbType") -Or
            ($_ -eq "Edit-DMSEndpoint/MySQLSettings_TargetDbType") -Or
            ($_ -eq "New-DMSEndpoint/MySQLSettings_TargetDbType")
        }
        {
            $v = "multiple-databases","specific-database"
            break
        }

        # Amazon.DatabaseMigrationService.TlogAccessMode
        {
            ($_ -eq "Edit-DMSEndpoint/MicrosoftSQLServerSettings_TlogAccessMode") -Or
            ($_ -eq "New-DMSEndpoint/MicrosoftSQLServerSettings_TlogAccessMode")
        }
        {
            $v = "BackupOnly","PreferBackup","PreferTlog","TlogOnly"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DMS_map = @{
    "DataMigrationType"=@("Edit-DMSDataMigration","New-DMSDataMigration")
    "DocDbSettings_NestingLevel"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "DocDbSettings_SslMode"=@("Edit-DMSDataProvider","New-DMSDataProvider")
    "EndpointType"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "GcpMySQLSettings_TargetDbType"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "KafkaSettings_MessageFormat"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "KafkaSettings_SaslMechanism"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "KafkaSettings_SecurityProtocol"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "KafkaSettings_SslEndpointIdentificationAlgorithm"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "KinesisSettings_MessageFormat"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "MariaDbSettings_SslMode"=@("Edit-DMSDataProvider","New-DMSDataProvider")
    "MicrosoftSQLServerSettings_SafeguardPolicy"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "MicrosoftSqlServerSettings_SslMode"=@("Edit-DMSDataProvider","New-DMSDataProvider")
    "MicrosoftSQLServerSettings_TlogAccessMode"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "MigrationType"=@("Edit-DMSReplicationTask","Get-DMSApplicableIndividualAssessment","New-DMSReplicationTask")
    "MongoDbSettings_AuthMechanism"=@("Edit-DMSDataProvider","Edit-DMSEndpoint","New-DMSDataProvider","New-DMSEndpoint")
    "MongoDbSettings_AuthType"=@("Edit-DMSDataProvider","Edit-DMSEndpoint","New-DMSDataProvider","New-DMSEndpoint")
    "MongoDbSettings_NestingLevel"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "MongoDbSettings_SslMode"=@("Edit-DMSDataProvider","New-DMSDataProvider")
    "MySqlSettings_SslMode"=@("Edit-DMSDataProvider","New-DMSDataProvider")
    "MySQLSettings_TargetDbType"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "OracleSettings_CharLengthSemantic"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "OracleSettings_SslMode"=@("Edit-DMSDataProvider","New-DMSDataProvider")
    "Origin"=@("Start-DMSMetadataModelExportAsScript","Start-DMSMetadataModelImport")
    "PostgreSQLSettings_DatabaseMode"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "PostgreSQLSettings_MapLongVarcharAs"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "PostgreSQLSettings_PluginName"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "PostgreSqlSettings_SslMode"=@("Edit-DMSDataProvider","New-DMSDataProvider")
    "RedisSettings_AuthType"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "RedisSettings_SslSecurityProtocol"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "RedshiftSettings_EncryptionMode"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "ReloadOption"=@("Restore-DMSReplicationTable","Restore-DMSTable")
    "ReplicationType"=@("Edit-DMSReplicationConfig","New-DMSReplicationConfig")
    "S3Settings_CannedAclForObject"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "S3Settings_CompressionType"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "S3Settings_DataFormat"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "S3Settings_DatePartitionDelimiter"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "S3Settings_DatePartitionSequence"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "S3Settings_EncodingType"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "S3Settings_EncryptionMode"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "S3Settings_ParquetVersion"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "SourceType"=@("Get-DMSEvent")
    "SslMode"=@("Edit-DMSEndpoint","New-DMSEndpoint")
    "StartReplicationTaskType"=@("Start-DMSReplicationTask")
    "StartType"=@("Start-DMSDataMigration")
}

_awsArgumentCompleterRegistration $DMS_Completers $DMS_map

$DMS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DMS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DMS_SelectMap = @{
    "Select"=@("Set-DMSResourceTag",
               "Complete-DMSPendingMaintenanceAction",
               "Start-DMSBatchRecommendation",
               "Stop-DMSReplicationTaskAssessmentRun",
               "New-DMSDataMigration",
               "New-DMSDataProvider",
               "New-DMSEndpoint",
               "New-DMSEventSubscription",
               "New-DMSFleetAdvisorCollector",
               "New-DMSInstanceProfile",
               "New-DMSMigrationProject",
               "New-DMSReplicationConfig",
               "New-DMSReplicationInstance",
               "New-DMSReplicationSubnetGroup",
               "New-DMSReplicationTask",
               "Remove-DMSCertificate",
               "Remove-DMSConnection",
               "Remove-DMSDataMigration",
               "Remove-DMSDataProvider",
               "Remove-DMSEndpoint",
               "Remove-DMSEventSubscription",
               "Remove-DMSFleetAdvisorCollector",
               "Remove-DMSFleetAdvisorDatabaseId",
               "Remove-DMSInstanceProfile",
               "Remove-DMSMigrationProject",
               "Remove-DMSReplicationConfig",
               "Remove-DMSReplicationInstance",
               "Remove-DMSReplicationSubnetGroup",
               "Remove-DMSReplicationTask",
               "Remove-DMSReplicationTaskAssessmentRun",
               "Get-DMSAccountAttribute",
               "Get-DMSApplicableIndividualAssessment",
               "Get-DMSCertificate",
               "Get-DMSConnection",
               "Get-DMSConversionConfiguration",
               "Get-DMSDataMigration",
               "Get-DMSDataProvider",
               "Get-DMSEndpoint",
               "Get-DMSEndpointSetting",
               "Get-DMSEndpointType",
               "Get-DMSEngineVersion",
               "Get-DMSEventCategory",
               "Get-DMSEvent",
               "Get-DMSEventSubscription",
               "Get-DMSExtensionPackAssociation",
               "Get-DMSFleetAdvisorCollector",
               "Get-DMSFleetAdvisorDatabase",
               "Get-DMSFleetAdvisorLsaAnalysis",
               "Get-DMSFleetAdvisorSchemaObjectSummary",
               "Get-DMSFleetAdvisorSchema",
               "Get-DMSInstanceProfile",
               "Get-DMSMetadataModelAssessment",
               "Get-DMSMetadataModelConversion",
               "Get-DMSMetadataModelExportsAsScript",
               "Get-DMSMetadataModelExportsToTarget",
               "Get-DMSMetadataModelImport",
               "Get-DMSMigrationProject",
               "Get-DMSOrderableReplicationInstance",
               "Get-DMSPendingMaintenanceAction",
               "Get-DMSRecommendationLimitation",
               "Get-DMSRecommendation",
               "Get-DMSRefreshSchemasStatus",
               "Get-DMSReplicationConfig",
               "Get-DMSReplicationInstance",
               "Get-DMSReplicationInstanceTaskLog",
               "Get-DMSReplication",
               "Get-DMSReplicationSubnetGroup",
               "Get-DMSReplicationTableStatistic",
               "Get-DMSReplicationTaskAssessmentResult",
               "Get-DMSReplicationTaskAssessmentRun",
               "Get-DMSReplicationTaskIndividualAssessment",
               "Get-DMSReplicationTask",
               "Get-DMSSchema",
               "Get-DMSTableStatistic",
               "Export-DMSMetadataModelAssessment",
               "Import-DMSCertificate",
               "Get-DMSResourceTag",
               "Edit-DMSConversionConfiguration",
               "Edit-DMSDataMigration",
               "Edit-DMSDataProvider",
               "Edit-DMSEndpoint",
               "Edit-DMSEventSubscription",
               "Edit-DMSInstanceProfile",
               "Edit-DMSMigrationProject",
               "Edit-DMSReplicationConfig",
               "Edit-DMSReplicationInstance",
               "Edit-DMSReplicationSubnetGroup",
               "Edit-DMSReplicationTask",
               "Move-DMSReplicationTask",
               "Restart-DMSReplicationInstance",
               "Invoke-DMSSchemaRefresh",
               "Restore-DMSReplicationTable",
               "Restore-DMSTable",
               "Remove-DMSResourceTag",
               "Start-DMSFleetAdvisorLsaAnalysis",
               "Start-DMSDataMigration",
               "Start-DMSExtensionPackAssociation",
               "Start-DMSMetadataModelAssessment",
               "Start-DMSMetadataModelConversion",
               "Start-DMSMetadataModelExportAsScript",
               "Start-DMSMetadataModelExportToTarget",
               "Start-DMSMetadataModelImport",
               "Start-DMSRecommendation",
               "Start-DMSReplication",
               "Start-DMSReplicationTask",
               "Start-DMSReplicationTaskAssessment",
               "Start-DMSReplicationTaskAssessmentRun",
               "Stop-DMSDataMigration",
               "Stop-DMSReplication",
               "Stop-DMSReplicationTask",
               "Test-DMSConnection",
               "Update-DMSSubscriptionsToEventBridge")
}

_awsArgumentCompleterRegistration $DMS_SelectCompleters $DMS_SelectMap
# Argument completions for service Amazon DocumentDB (with MongoDB compatibility)


$DOC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DocDB.SourceType
        "Get-DOCEvent/SourceType"
        {
            $v = "db-cluster","db-cluster-snapshot","db-instance","db-parameter-group","db-security-group","db-snapshot"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DOC_map = @{
    "SourceType"=@("Get-DOCEvent")
}

_awsArgumentCompleterRegistration $DOC_Completers $DOC_map

$DOC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DOC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DOC_SelectMap = @{
    "Select"=@("Add-DOCSourceIdentifierToSubscription",
               "Add-DOCResourceTag",
               "Complete-DOCPendingMaintenanceAction",
               "Copy-DOCDBClusterParameterGroup",
               "Copy-DOCDBClusterSnapshot",
               "New-DOCDBCluster",
               "New-DOCDBClusterParameterGroup",
               "New-DOCDBClusterSnapshot",
               "New-DOCDBInstance",
               "New-DOCDBSubnetGroup",
               "New-DOCEventSubscription",
               "New-DOCGlobalCluster",
               "Remove-DOCDBCluster",
               "Remove-DOCDBClusterParameterGroup",
               "Remove-DOCDBClusterSnapshot",
               "Remove-DOCDBInstance",
               "Remove-DOCDBSubnetGroup",
               "Remove-DOCEventSubscription",
               "Remove-DOCGlobalCluster",
               "Get-DOCCertificate",
               "Get-DOCDBClusterParameterGroup",
               "Get-DOCDBClusterParameter",
               "Get-DOCDBCluster",
               "Get-DOCDBClusterSnapshotAttribute",
               "Get-DOCDBClusterSnapshot",
               "Get-DOCDBEngineVersion",
               "Get-DOCDBInstance",
               "Get-DOCDBSubnetGroup",
               "Get-DOCEngineDefaultClusterParameter",
               "Get-DOCEventCategory",
               "Get-DOCEvent",
               "Get-DOCEventSubscription",
               "Get-DOCGlobalCluster",
               "Get-DOCOrderableDBInstanceOption",
               "Get-DOCPendingMaintenanceAction",
               "Start-DOCDBClusterFailover",
               "Start-DOCFailoverGlobalCluster",
               "Get-DOCResourceTag",
               "Edit-DOCDBCluster",
               "Edit-DOCDBClusterParameterGroup",
               "Edit-DOCDBClusterSnapshotAttribute",
               "Edit-DOCDBInstance",
               "Edit-DOCDBSubnetGroup",
               "Edit-DOCEventSubscription",
               "Edit-DOCGlobalCluster",
               "Restart-DOCDBInstance",
               "Remove-DOCFromGlobalCluster",
               "Remove-DOCSourceIdentifierFromSubscription",
               "Remove-DOCResourceTag",
               "Reset-DOCDBClusterParameterGroup",
               "Restore-DOCDBClusterFromSnapshot",
               "Restore-DOCDBClusterToPointInTime",
               "Start-DOCDBCluster",
               "Stop-DOCDBCluster",
               "Request-DOCSwitchoverGlobalCluster")
}

_awsArgumentCompleterRegistration $DOC_SelectCompleters $DOC_SelectMap
# Argument completions for service Amazon DocumentDB Elastic Clusters


$DOCE_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DocDBElastic.Auth
        {
            ($_ -eq "New-DOCECluster/AuthType") -Or
            ($_ -eq "Update-DOCECluster/AuthType")
        }
        {
            $v = "PLAIN_TEXT","SECRET_ARN"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DOCE_map = @{
    "AuthType"=@("New-DOCECluster","Update-DOCECluster")
}

_awsArgumentCompleterRegistration $DOCE_Completers $DOCE_map

$DOCE_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DOCE.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DOCE_SelectMap = @{
    "Select"=@("Copy-DOCEClusterSnapshot",
               "New-DOCECluster",
               "New-DOCEClusterSnapshot",
               "Remove-DOCECluster",
               "Remove-DOCEClusterSnapshot",
               "Get-DOCECluster",
               "Get-DOCEClusterSnapshot",
               "Get-DOCEClusterList",
               "Get-DOCEClusterSnapshotList",
               "Get-DOCEResourceTag",
               "Restore-DOCEClusterFromSnapshot",
               "Start-DOCECluster",
               "Stop-DOCECluster",
               "Add-DOCEResourceTag",
               "Remove-DOCEResourceTag",
               "Update-DOCECluster")
}

_awsArgumentCompleterRegistration $DOCE_SelectCompleters $DOCE_SelectMap
# Argument completions for service Elastic Disaster Recovery Service


$EDRS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Drs.LaunchActionCategory
        "Write-EDRSLaunchAction/Category"
        {
            $v = "CONFIGURATION","MONITORING","OTHER","SECURITY","VALIDATION"
            break
        }

        # Amazon.Drs.LaunchDisposition
        {
            ($_ -eq "New-EDRSLaunchConfigurationTemplate/LaunchDisposition") -Or
            ($_ -eq "Update-EDRSLaunchConfiguration/LaunchDisposition") -Or
            ($_ -eq "Update-EDRSLaunchConfigurationTemplate/LaunchDisposition")
        }
        {
            $v = "STARTED","STOPPED"
            break
        }

        # Amazon.Drs.RecoverySnapshotsOrder
        "Get-EDRSRecoverySnapshot/Order"
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.Drs.ReplicationConfigurationDataPlaneRouting
        {
            ($_ -eq "New-EDRSReplicationConfigurationTemplate/DataPlaneRouting") -Or
            ($_ -eq "Update-EDRSReplicationConfiguration/DataPlaneRouting") -Or
            ($_ -eq "Update-EDRSReplicationConfigurationTemplate/DataPlaneRouting")
        }
        {
            $v = "PRIVATE_IP","PUBLIC_IP"
            break
        }

        # Amazon.Drs.ReplicationConfigurationDefaultLargeStagingDiskType
        {
            ($_ -eq "New-EDRSReplicationConfigurationTemplate/DefaultLargeStagingDiskType") -Or
            ($_ -eq "Update-EDRSReplicationConfiguration/DefaultLargeStagingDiskType") -Or
            ($_ -eq "Update-EDRSReplicationConfigurationTemplate/DefaultLargeStagingDiskType")
        }
        {
            $v = "AUTO","GP2","GP3","ST1"
            break
        }

        # Amazon.Drs.ReplicationConfigurationEbsEncryption
        {
            ($_ -eq "New-EDRSReplicationConfigurationTemplate/EbsEncryption") -Or
            ($_ -eq "Update-EDRSReplicationConfiguration/EbsEncryption") -Or
            ($_ -eq "Update-EDRSReplicationConfigurationTemplate/EbsEncryption")
        }
        {
            $v = "CUSTOM","DEFAULT","NONE"
            break
        }

        # Amazon.Drs.TargetInstanceTypeRightSizingMethod
        {
            ($_ -eq "New-EDRSLaunchConfigurationTemplate/TargetInstanceTypeRightSizingMethod") -Or
            ($_ -eq "Update-EDRSLaunchConfiguration/TargetInstanceTypeRightSizingMethod") -Or
            ($_ -eq "Update-EDRSLaunchConfigurationTemplate/TargetInstanceTypeRightSizingMethod")
        }
        {
            $v = "BASIC","IN_AWS","NONE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EDRS_map = @{
    "Category"=@("Write-EDRSLaunchAction")
    "DataPlaneRouting"=@("New-EDRSReplicationConfigurationTemplate","Update-EDRSReplicationConfiguration","Update-EDRSReplicationConfigurationTemplate")
    "DefaultLargeStagingDiskType"=@("New-EDRSReplicationConfigurationTemplate","Update-EDRSReplicationConfiguration","Update-EDRSReplicationConfigurationTemplate")
    "EbsEncryption"=@("New-EDRSReplicationConfigurationTemplate","Update-EDRSReplicationConfiguration","Update-EDRSReplicationConfigurationTemplate")
    "LaunchDisposition"=@("New-EDRSLaunchConfigurationTemplate","Update-EDRSLaunchConfiguration","Update-EDRSLaunchConfigurationTemplate")
    "Order"=@("Get-EDRSRecoverySnapshot")
    "TargetInstanceTypeRightSizingMethod"=@("New-EDRSLaunchConfigurationTemplate","Update-EDRSLaunchConfiguration","Update-EDRSLaunchConfigurationTemplate")
}

_awsArgumentCompleterRegistration $EDRS_Completers $EDRS_map

$EDRS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EDRS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EDRS_SelectMap = @{
    "Select"=@("Register-EDRSSourceNetworkStack",
               "New-EDRSExtendedSourceServer",
               "New-EDRSLaunchConfigurationTemplate",
               "New-EDRSReplicationConfigurationTemplate",
               "New-EDRSSourceNetwork",
               "Remove-EDRSJob",
               "Remove-EDRSLaunchAction",
               "Remove-EDRSLaunchConfigurationTemplate",
               "Remove-EDRSRecoveryInstance",
               "Remove-EDRSReplicationConfigurationTemplate",
               "Remove-EDRSSourceNetwork",
               "Remove-EDRSSourceServer",
               "Get-EDRSJobLogItem",
               "Get-EDRSJob",
               "Get-EDRSLaunchConfigurationTemplate",
               "Get-EDRSRecoveryInstance",
               "Get-EDRSRecoverySnapshot",
               "Get-EDRSReplicationConfigurationTemplate",
               "Get-EDRSSourceNetwork",
               "Get-EDRSSourceServer",
               "Disconnect-EDRSRecoveryInstance",
               "Disconnect-EDRSSourceServer",
               "Export-EDRSSourceNetworkCfnTemplate",
               "Get-EDRSFailbackReplicationConfiguration",
               "Get-EDRSLaunchConfiguration",
               "Get-EDRSReplicationConfiguration",
               "Initialize-EDRSService",
               "Get-EDRSExtensibleSourceServerList",
               "Get-EDRSLaunchActionList",
               "Get-EDRSStagingAccountList",
               "Get-EDRSResourceTag",
               "Write-EDRSLaunchAction",
               "Restart-EDRSDataReplication",
               "Start-EDRSReversedReplication",
               "Start-EDRSFailbackLaunch",
               "Start-EDRSRecovery",
               "Start-EDRSReplication",
               "Start-EDRSSourceNetworkRecovery",
               "Start-EDRSSourceNetworkReplication",
               "Stop-EDRSFailback",
               "Stop-EDRSReplication",
               "Stop-EDRSSourceNetworkReplication",
               "Add-EDRSResourceTag",
               "Stop-EDRSRecoveryInstance",
               "Remove-EDRSResourceTag",
               "Update-EDRSFailbackReplicationConfiguration",
               "Update-EDRSLaunchConfiguration",
               "Update-EDRSLaunchConfigurationTemplate",
               "Update-EDRSReplicationConfiguration",
               "Update-EDRSReplicationConfigurationTemplate")
}

_awsArgumentCompleterRegistration $EDRS_SelectCompleters $EDRS_SelectMap
# Argument completions for service AWS Directory Service


$DS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DirectoryService.CertificateType
        "Register-DSCertificate/Type"
        {
            $v = "ClientCertAuth","ClientLDAPS"
            break
        }

        # Amazon.DirectoryService.ClientAuthenticationType
        {
            ($_ -eq "Disable-DSClientAuthentication/Type") -Or
            ($_ -eq "Enable-DSClientAuthentication/Type") -Or
            ($_ -eq "Get-DSClientAuthenticationSetting/Type")
        }
        {
            $v = "SmartCard","SmartCardOrPassword"
            break
        }

        # Amazon.DirectoryService.DirectoryConfigurationStatus
        "Get-DSSetting/Status"
        {
            $v = "Default","Failed","Requested","Updated","Updating"
            break
        }

        # Amazon.DirectoryService.DirectoryEdition
        "New-DSMicrosoftAD/Edition"
        {
            $v = "Enterprise","Standard"
            break
        }

        # Amazon.DirectoryService.DirectorySize
        {
            ($_ -eq "Connect-DSDirectory/Size") -Or
            ($_ -eq "New-DSDirectory/Size")
        }
        {
            $v = "Large","Small"
            break
        }

        # Amazon.DirectoryService.LDAPSType
        {
            ($_ -eq "Disable-DSLDAPS/Type") -Or
            ($_ -eq "Enable-DSLDAPS/Type") -Or
            ($_ -eq "Get-DSLDAPSSetting/Type")
        }
        {
            $v = "Client"
            break
        }

        # Amazon.DirectoryService.OSVersion
        "Update-DSDirectorySetup/OSUpdateSettings_OSVersion"
        {
            $v = "SERVER_2012","SERVER_2019"
            break
        }

        # Amazon.DirectoryService.RadiusAuthenticationProtocol
        {
            ($_ -eq "Enable-DSRadius/RadiusSettings_AuthenticationProtocol") -Or
            ($_ -eq "Update-DSRadius/RadiusSettings_AuthenticationProtocol")
        }
        {
            $v = "CHAP","MS-CHAPv1","MS-CHAPv2","PAP"
            break
        }

        # Amazon.DirectoryService.SelectiveAuth
        {
            ($_ -eq "New-DSTrust/SelectiveAuth") -Or
            ($_ -eq "Update-DSTrust/SelectiveAuth")
        }
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.DirectoryService.ShareMethod
        "Enable-DSDirectoryShare/ShareMethod"
        {
            $v = "HANDSHAKE","ORGANIZATIONS"
            break
        }

        # Amazon.DirectoryService.TargetType
        {
            ($_ -eq "Enable-DSDirectoryShare/ShareTarget_Type") -Or
            ($_ -eq "Disable-DSDirectoryShare/UnshareTarget_Type")
        }
        {
            $v = "ACCOUNT"
            break
        }

        # Amazon.DirectoryService.TrustDirection
        "New-DSTrust/TrustDirection"
        {
            $v = "One-Way: Incoming","One-Way: Outgoing","Two-Way"
            break
        }

        # Amazon.DirectoryService.TrustType
        "New-DSTrust/TrustType"
        {
            $v = "External","Forest"
            break
        }

        # Amazon.DirectoryService.UpdateType
        {
            ($_ -eq "Get-DSUpdateDirectory/UpdateType") -Or
            ($_ -eq "Update-DSDirectorySetup/UpdateType")
        }
        {
            $v = "OS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DS_map = @{
    "Edition"=@("New-DSMicrosoftAD")
    "OSUpdateSettings_OSVersion"=@("Update-DSDirectorySetup")
    "RadiusSettings_AuthenticationProtocol"=@("Enable-DSRadius","Update-DSRadius")
    "SelectiveAuth"=@("New-DSTrust","Update-DSTrust")
    "ShareMethod"=@("Enable-DSDirectoryShare")
    "ShareTarget_Type"=@("Enable-DSDirectoryShare")
    "Size"=@("Connect-DSDirectory","New-DSDirectory")
    "Status"=@("Get-DSSetting")
    "TrustDirection"=@("New-DSTrust")
    "TrustType"=@("New-DSTrust")
    "Type"=@("Disable-DSClientAuthentication","Disable-DSLDAPS","Enable-DSClientAuthentication","Enable-DSLDAPS","Get-DSClientAuthenticationSetting","Get-DSLDAPSSetting","Register-DSCertificate")
    "UnshareTarget_Type"=@("Disable-DSDirectoryShare")
    "UpdateType"=@("Get-DSUpdateDirectory","Update-DSDirectorySetup")
}

_awsArgumentCompleterRegistration $DS_Completers $DS_map

$DS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DS_SelectMap = @{
    "Select"=@("Confirm-DSSharedDirectory",
               "Add-DSIpRoute",
               "Add-DSRegion",
               "Add-DSResourceTag",
               "Stop-DSSchemaExtension",
               "Connect-DSDirectory",
               "New-DSAlias",
               "New-DSComputer",
               "New-DSConditionalForwarder",
               "New-DSDirectory",
               "New-DSLogSubscription",
               "New-DSMicrosoftAD",
               "New-DSSnapshot",
               "New-DSTrust",
               "Remove-DSConditionalForwarder",
               "Remove-DSDirectory",
               "Remove-DSLogSubscription",
               "Remove-DSSnapshot",
               "Remove-DSTrust",
               "Unregister-DSCertificate",
               "Unregister-DSEventTopic",
               "Get-DSCertificate",
               "Get-DSClientAuthenticationSetting",
               "Get-DSConditionalForwarder",
               "Get-DSDirectory",
               "Get-DSDirectoryDataAccess",
               "Get-DSDomainControllerList",
               "Get-DSEventTopic",
               "Get-DSLDAPSSetting",
               "Get-DSRegion",
               "Get-DSSetting",
               "Get-DSSharedDirectory",
               "Get-DSSnapshot",
               "Get-DSTrust",
               "Get-DSUpdateDirectory",
               "Disable-DSClientAuthentication",
               "Disable-DSDirectoryDataAccess",
               "Disable-DSLDAPS",
               "Disable-DSRadius",
               "Disable-DSSso",
               "Enable-DSClientAuthentication",
               "Enable-DSDirectoryDataAccess",
               "Enable-DSLDAPS",
               "Enable-DSRadius",
               "Enable-DSSso",
               "Get-DSDirectoryLimit",
               "Get-DSSnapshotLimit",
               "Get-DSCertificateList",
               "Get-DSIpRouteList",
               "Get-DSLogSubscriptionList",
               "Get-DSSchemaExtension",
               "Get-DSResourceTag",
               "Register-DSCertificate",
               "Register-DSEventTopic",
               "Deny-DSSharedDirectory",
               "Remove-DSIpRoute",
               "Remove-DSRegion",
               "Remove-DSResourceTag",
               "Reset-DSUserPassword",
               "Restore-DSFromSnapshot",
               "Enable-DSDirectoryShare",
               "Start-DSSchemaExtension",
               "Disable-DSDirectoryShare",
               "Update-DSConditionalForwarder",
               "Update-DSDirectorySetup",
               "Set-DSDomainControllerCount",
               "Update-DSRadius",
               "Update-DSSetting",
               "Update-DSTrust",
               "Approve-DSTrust")
}

_awsArgumentCompleterRegistration $DS_SelectCompleters $DS_SelectMap
# Argument completions for service Amazon DynamoDB


$DDB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision
        {
            ($_ -eq "Disable-DDBKinesisStreamingDestination/EnableKinesisStreamingConfiguration_ApproximateCreationDateTimePrecision") -Or
            ($_ -eq "Enable-DDBKinesisStreamingDestination/EnableKinesisStreamingConfiguration_ApproximateCreationDateTimePrecision") -Or
            ($_ -eq "Update-DDBKinesisStreamingDestination/UpdateKinesisStreamingConfiguration_ApproximateCreationDateTimePrecision")
        }
        {
            $v = "MICROSECOND","MILLISECOND"
            break
        }

        # Amazon.DynamoDBv2.BackupTypeFilter
        "Get-DDBBackupList/BackupType"
        {
            $v = "ALL","AWS_BACKUP","SYSTEM","USER"
            break
        }

        # Amazon.DynamoDBv2.BillingMode
        {
            ($_ -eq "New-DDBTable/BillingMode") -Or
            ($_ -eq "Update-DDBTable/BillingMode") -Or
            ($_ -eq "Restore-DDBTableFromBackup/BillingModeOverride") -Or
            ($_ -eq "Restore-DDBTableToPointInTime/BillingModeOverride") -Or
            ($_ -eq "Update-DDBGlobalTableSetting/GlobalTableBillingMode") -Or
            ($_ -eq "Import-DDBTable/TableCreationParameters_BillingMode")
        }
        {
            $v = "PAY_PER_REQUEST","PROVISIONED"
            break
        }

        # Amazon.DynamoDBv2.ConditionalOperator
        {
            ($_ -eq "Invoke-DDBQuery/ConditionalOperator") -Or
            ($_ -eq "Invoke-DDBScan/ConditionalOperator") -Or
            ($_ -eq "Remove-DDBItem/ConditionalOperator") -Or
            ($_ -eq "Set-DDBItem/ConditionalOperator") -Or
            ($_ -eq "Update-DDBItem/ConditionalOperator")
        }
        {
            $v = "AND","OR"
            break
        }

        # Amazon.DynamoDBv2.ContributorInsightsAction
        "Update-DDBContributorInsight/ContributorInsightsAction"
        {
            $v = "DISABLE","ENABLE"
            break
        }

        # Amazon.DynamoDBv2.ExportFormat
        "Export-DDBTableToPointInTime/ExportFormat"
        {
            $v = "DYNAMODB_JSON","ION"
            break
        }

        # Amazon.DynamoDBv2.ExportType
        "Export-DDBTableToPointInTime/ExportType"
        {
            $v = "FULL_EXPORT","INCREMENTAL_EXPORT"
            break
        }

        # Amazon.DynamoDBv2.ExportViewType
        "Export-DDBTableToPointInTime/IncrementalExportSpecification_ExportViewType"
        {
            $v = "NEW_AND_OLD_IMAGES","NEW_IMAGE"
            break
        }

        # Amazon.DynamoDBv2.InputCompressionType
        "Import-DDBTable/InputCompressionType"
        {
            $v = "GZIP","NONE","ZSTD"
            break
        }

        # Amazon.DynamoDBv2.InputFormat
        "Import-DDBTable/InputFormat"
        {
            $v = "CSV","DYNAMODB_JSON","ION"
            break
        }

        # Amazon.DynamoDBv2.KeyType
        "Add-DDBKeySchema/KeyType"
        {
            $v = "HASH","RANGE"
            break
        }

        # Amazon.DynamoDBv2.ProjectionType
        "Add-DDBIndexSchema/ProjectionType"
        {
            $v = "ALL","INCLUDE","KEYS_ONLY"
            break
        }

        # Amazon.DynamoDBv2.ReturnConsumedCapacity
        {
            ($_ -eq "Get-DDBBatchItem/ReturnConsumedCapacity") -Or
            ($_ -eq "Get-DDBItem/ReturnConsumedCapacity") -Or
            ($_ -eq "Get-DDBItemTransactionally/ReturnConsumedCapacity") -Or
            ($_ -eq "Invoke-DDBDDBBatchExecuteStatement/ReturnConsumedCapacity") -Or
            ($_ -eq "Invoke-DDBDDBExecuteStatement/ReturnConsumedCapacity") -Or
            ($_ -eq "Invoke-DDBDDBExecuteTransaction/ReturnConsumedCapacity") -Or
            ($_ -eq "Invoke-DDBQuery/ReturnConsumedCapacity") -Or
            ($_ -eq "Invoke-DDBScan/ReturnConsumedCapacity") -Or
            ($_ -eq "Remove-DDBItem/ReturnConsumedCapacity") -Or
            ($_ -eq "Set-DDBBatchItem/ReturnConsumedCapacity") -Or
            ($_ -eq "Set-DDBItem/ReturnConsumedCapacity") -Or
            ($_ -eq "Update-DDBItem/ReturnConsumedCapacity") -Or
            ($_ -eq "Write-DDBItemTransactionally/ReturnConsumedCapacity")
        }
        {
            $v = "INDEXES","NONE","TOTAL"
            break
        }

        # Amazon.DynamoDBv2.ReturnItemCollectionMetrics
        {
            ($_ -eq "Remove-DDBItem/ReturnItemCollectionMetric") -Or
            ($_ -eq "Set-DDBBatchItem/ReturnItemCollectionMetric") -Or
            ($_ -eq "Set-DDBItem/ReturnItemCollectionMetric") -Or
            ($_ -eq "Update-DDBItem/ReturnItemCollectionMetric") -Or
            ($_ -eq "Write-DDBItemTransactionally/ReturnItemCollectionMetric")
        }
        {
            $v = "NONE","SIZE"
            break
        }

        # Amazon.DynamoDBv2.ReturnValue
        {
            ($_ -eq "Remove-DDBItem/ReturnValue") -Or
            ($_ -eq "Set-DDBItem/ReturnValue") -Or
            ($_ -eq "Update-DDBItem/ReturnValue")
        }
        {
            $v = "ALL_NEW","ALL_OLD","NONE","UPDATED_NEW","UPDATED_OLD"
            break
        }

        # Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure
        {
            ($_ -eq "Invoke-DDBDDBExecuteStatement/ReturnValuesOnConditionCheckFailure") -Or
            ($_ -eq "Remove-DDBItem/ReturnValuesOnConditionCheckFailure") -Or
            ($_ -eq "Set-DDBItem/ReturnValuesOnConditionCheckFailure") -Or
            ($_ -eq "Update-DDBItem/ReturnValuesOnConditionCheckFailure")
        }
        {
            $v = "ALL_OLD","NONE"
            break
        }

        # Amazon.DynamoDBv2.S3SseAlgorithm
        "Export-DDBTableToPointInTime/S3SseAlgorithm"
        {
            $v = "AES256","KMS"
            break
        }

        # Amazon.DynamoDBv2.ScalarAttributeType
        {
            ($_ -eq "Add-DDBIndexSchema/HashKeyDataType") -Or
            ($_ -eq "Add-DDBKeySchema/KeyDataType") -Or
            ($_ -eq "Add-DDBIndexSchema/RangeKeyDataType")
        }
        {
            $v = "B","N","S"
            break
        }

        # Amazon.DynamoDBv2.Select
        {
            ($_ -eq "Invoke-DDBQuery/SelectItem") -Or
            ($_ -eq "Invoke-DDBScan/SelectItem")
        }
        {
            $v = "ALL_ATTRIBUTES","ALL_PROJECTED_ATTRIBUTES","COUNT","SPECIFIC_ATTRIBUTES"
            break
        }

        # Amazon.DynamoDBv2.SSEType
        {
            ($_ -eq "Import-DDBTable/SSESpecification_SSEType") -Or
            ($_ -eq "Update-DDBTable/SSESpecification_SSEType") -Or
            ($_ -eq "Restore-DDBTableFromBackup/SSESpecificationOverride_SSEType") -Or
            ($_ -eq "Restore-DDBTableToPointInTime/SSESpecificationOverride_SSEType")
        }
        {
            $v = "AES256","KMS"
            break
        }

        # Amazon.DynamoDBv2.StreamViewType
        "Update-DDBTable/StreamSpecification_StreamViewType"
        {
            $v = "KEYS_ONLY","NEW_AND_OLD_IMAGES","NEW_IMAGE","OLD_IMAGE"
            break
        }

        # Amazon.DynamoDBv2.TableClass
        "Update-DDBTable/TableClass"
        {
            $v = "STANDARD","STANDARD_INFREQUENT_ACCESS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DDB_map = @{
    "BackupType"=@("Get-DDBBackupList")
    "BillingMode"=@("New-DDBTable","Update-DDBTable")
    "BillingModeOverride"=@("Restore-DDBTableFromBackup","Restore-DDBTableToPointInTime")
    "ConditionalOperator"=@("Invoke-DDBQuery","Invoke-DDBScan","Remove-DDBItem","Set-DDBItem","Update-DDBItem")
    "ContributorInsightsAction"=@("Update-DDBContributorInsight")
    "EnableKinesisStreamingConfiguration_ApproximateCreationDateTimePrecision"=@("Disable-DDBKinesisStreamingDestination","Enable-DDBKinesisStreamingDestination")
    "ExportFormat"=@("Export-DDBTableToPointInTime")
    "ExportType"=@("Export-DDBTableToPointInTime")
    "GlobalTableBillingMode"=@("Update-DDBGlobalTableSetting")
    "HashKeyDataType"=@("Add-DDBIndexSchema")
    "IncrementalExportSpecification_ExportViewType"=@("Export-DDBTableToPointInTime")
    "InputCompressionType"=@("Import-DDBTable")
    "InputFormat"=@("Import-DDBTable")
    "KeyDataType"=@("Add-DDBKeySchema")
    "KeyType"=@("Add-DDBKeySchema")
    "ProjectionType"=@("Add-DDBIndexSchema")
    "RangeKeyDataType"=@("Add-DDBIndexSchema")
    "ReturnConsumedCapacity"=@("Get-DDBBatchItem","Get-DDBItem","Get-DDBItemTransactionally","Invoke-DDBDDBBatchExecuteStatement","Invoke-DDBDDBExecuteStatement","Invoke-DDBDDBExecuteTransaction","Invoke-DDBQuery","Invoke-DDBScan","Remove-DDBItem","Set-DDBBatchItem","Set-DDBItem","Update-DDBItem","Write-DDBItemTransactionally")
    "ReturnItemCollectionMetric"=@("Remove-DDBItem","Set-DDBBatchItem","Set-DDBItem","Update-DDBItem","Write-DDBItemTransactionally")
    "ReturnValue"=@("Remove-DDBItem","Set-DDBItem","Update-DDBItem")
    "ReturnValuesOnConditionCheckFailure"=@("Invoke-DDBDDBExecuteStatement","Remove-DDBItem","Set-DDBItem","Update-DDBItem")
    "S3SseAlgorithm"=@("Export-DDBTableToPointInTime")
    "SelectItem"=@("Invoke-DDBQuery","Invoke-DDBScan")
    "SSESpecification_SSEType"=@("Import-DDBTable","Update-DDBTable")
    "SSESpecificationOverride_SSEType"=@("Restore-DDBTableFromBackup","Restore-DDBTableToPointInTime")
    "StreamSpecification_StreamViewType"=@("Update-DDBTable")
    "TableClass"=@("Update-DDBTable")
    "TableCreationParameters_BillingMode"=@("Import-DDBTable")
    "UpdateKinesisStreamingConfiguration_ApproximateCreationDateTimePrecision"=@("Update-DDBKinesisStreamingDestination")
}

_awsArgumentCompleterRegistration $DDB_Completers $DDB_map

$DDB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DDB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DDB_SelectMap = @{
    "Select"=@("Invoke-DDBDDBBatchExecuteStatement",
               "Get-DDBBatchItem",
               "Set-DDBBatchItem",
               "New-DDBBackup",
               "New-DDBGlobalTable",
               "Remove-DDBBackup",
               "Remove-DDBItem",
               "Remove-DDBResourcePolicy",
               "Remove-DDBTable",
               "Get-DDBBackup",
               "Get-DDBContinuousBackup",
               "Get-DDBContributorInsight",
               "Get-DDBEndpoint",
               "Get-DDBExport",
               "Get-DDBGlobalTable",
               "Get-DDBGlobalTableSetting",
               "Get-DDBImport",
               "Get-DDBKinesisStreamingDestination",
               "Get-DDBProvisionLimit",
               "Get-DDBTable",
               "Get-DDBTableReplicaAutoScaling",
               "Get-DDBTimeToLive",
               "Disable-DDBKinesisStreamingDestination",
               "Enable-DDBKinesisStreamingDestination",
               "Invoke-DDBDDBExecuteStatement",
               "Invoke-DDBDDBExecuteTransaction",
               "Export-DDBTableToPointInTime",
               "Get-DDBItem",
               "Get-DDBResourcePolicy",
               "Import-DDBTable",
               "Get-DDBBackupList",
               "Get-DDBContributorInsightList",
               "Get-DDBExportList",
               "Get-DDBGlobalTableList",
               "Get-DDBImportList",
               "Get-DDBTableList",
               "Get-DDBResourceTag",
               "Set-DDBItem",
               "Write-DDBResourcePolicy",
               "Invoke-DDBQuery",
               "Restore-DDBTableFromBackup",
               "Restore-DDBTableToPointInTime",
               "Invoke-DDBScan",
               "Add-DDBResourceTag",
               "Get-DDBItemTransactionally",
               "Write-DDBItemTransactionally",
               "Remove-DDBResourceTag",
               "Update-DDBContinuousBackup",
               "Update-DDBContributorInsight",
               "Update-DDBGlobalTable",
               "Update-DDBGlobalTableSetting",
               "Update-DDBItem",
               "Update-DDBKinesisStreamingDestination",
               "Update-DDBTable",
               "Update-DDBTableReplicaAutoScaling",
               "Update-DDBTimeToLive",
               "Add-DDBIndexSchema",
               "Add-DDBKeySchema",
               "ConvertFrom-DDBItem",
               "ConvertTo-DDBItem",
               "New-DDBTable",
               "New-DDBTableSchema")
}

_awsArgumentCompleterRegistration $DDB_SelectCompleters $DDB_SelectMap
# Argument completions for service Amazon DynamoDB


$DDB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.DynamoDBv2.BillingMode
        "New-DDBTable/BillingMode"
        {
            $v = "PAY_PER_REQUEST","PROVISIONED"
            break
        }

        # Amazon.DynamoDBv2.KeyType
        "Add-DDBKeySchema/KeyType"
        {
            $v = "HASH","RANGE"
            break
        }

        # Amazon.DynamoDBv2.ProjectionType
        "Add-DDBIndexSchema/ProjectionType"
        {
            $v = "ALL","INCLUDE","KEYS_ONLY"
            break
        }

        # Amazon.DynamoDBv2.ScalarAttributeType
        {
            ($_ -eq "Add-DDBIndexSchema/HashKeyDataType") -Or
            ($_ -eq "Add-DDBKeySchema/KeyDataType") -Or
            ($_ -eq "Add-DDBIndexSchema/RangeKeyDataType")
        }
        {
            $v = "B","N","S"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DDB_map = @{
    "BillingMode"=@("New-DDBTable")
    "HashKeyDataType"=@("Add-DDBIndexSchema")
    "KeyDataType"=@("Add-DDBKeySchema")
    "KeyType"=@("Add-DDBKeySchema")
    "ProjectionType"=@("Add-DDBIndexSchema")
    "RangeKeyDataType"=@("Add-DDBIndexSchema")
}

_awsArgumentCompleterRegistration $DDB_Completers $DDB_map

$DDB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.DDB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$DDB_SelectMap = @{
    "Select"=@("Get-DDBStream",
               "Get-DDBStreamList",
               "Add-DDBIndexSchema",
               "Add-DDBKeySchema",
               "ConvertFrom-DDBItem",
               "ConvertTo-DDBItem",
               "New-DDBTable",
               "New-DDBTableSchema")
}

_awsArgumentCompleterRegistration $DDB_SelectCompleters $DDB_SelectMap
# Argument completions for service Amazon EBS


$EBS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.EBS.ChecksumAggregationMethod
        "Complete-EBSSnapshot/ChecksumAggregationMethod"
        {
            $v = "LINEAR"
            break
        }

        # Amazon.EBS.ChecksumAlgorithm
        {
            ($_ -eq "Complete-EBSSnapshot/ChecksumAlgorithm") -Or
            ($_ -eq "Write-EBSSnapshotBlock/ChecksumAlgorithm")
        }
        {
            $v = "SHA256"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EBS_map = @{
    "ChecksumAggregationMethod"=@("Complete-EBSSnapshot")
    "ChecksumAlgorithm"=@("Complete-EBSSnapshot","Write-EBSSnapshotBlock")
}

_awsArgumentCompleterRegistration $EBS_Completers $EBS_map

$EBS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EBS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EBS_SelectMap = @{
    "Select"=@("Complete-EBSSnapshot",
               "Get-EBSSnapshotBlock",
               "Get-EBSChangedBlockList",
               "Get-EBSSnapshotBlockList",
               "Write-EBSSnapshotBlock",
               "Start-EBSSnapshot")
}

_awsArgumentCompleterRegistration $EBS_SelectCompleters $EBS_SelectMap
# Argument completions for service Amazon Elastic Compute Cloud (EC2)


$EC2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.EC2.AddressAttributeName
        {
            ($_ -eq "Get-EC2AddressesAttribute/Attribute") -Or
            ($_ -eq "Reset-EC2AddressAttribute/Attribute")
        }
        {
            $v = "domain-name"
            break
        }

        # Amazon.EC2.AddressFamily
        "New-EC2IpamPool/AddressFamily"
        {
            $v = "ipv4","ipv6"
            break
        }

        # Amazon.EC2.Affinity
        "Edit-EC2InstancePlacement/Affinity"
        {
            $v = "default","host"
            break
        }

        # Amazon.EC2.AllocationStrategy
        "Request-EC2SpotFleet/SpotFleetRequestConfig_AllocationStrategy"
        {
            $v = "capacityOptimized","capacityOptimizedPrioritized","diversified","lowestPrice","priceCapacityOptimized"
            break
        }

        # Amazon.EC2.ApplianceModeSupportValue
        {
            ($_ -eq "Edit-EC2TransitGatewayVpcAttachment/Options_ApplianceModeSupport") -Or
            ($_ -eq "New-EC2TransitGatewayVpcAttachment/Options_ApplianceModeSupport")
        }
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.ArchitectureValues
        "Register-EC2Image/Architecture"
        {
            $v = "arm64","arm64_mac","i386","x86_64","x86_64_mac"
            break
        }

        # Amazon.EC2.AutoAcceptSharedAssociationsValue
        "New-EC2TransitGatewayMulticastDomain/Options_AutoAcceptSharedAssociation"
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.AutoAcceptSharedAttachmentsValue
        {
            ($_ -eq "Edit-EC2TransitGateway/Options_AutoAcceptSharedAttachment") -Or
            ($_ -eq "New-EC2TransitGateway/Options_AutoAcceptSharedAttachment")
        }
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.AutoPlacement
        {
            ($_ -eq "Edit-EC2Host/AutoPlacement") -Or
            ($_ -eq "New-EC2Host/AutoPlacement")
        }
        {
            $v = "off","on"
            break
        }

        # Amazon.EC2.BareMetal
        {
            ($_ -eq "Get-EC2InstanceTypesFromInstanceRequirement/InstanceRequirements_BareMetal") -Or
            ($_ -eq "Get-EC2SpotPlacementScore/InstanceRequirements_BareMetal")
        }
        {
            $v = "excluded","included","required"
            break
        }

        # Amazon.EC2.BootModeValues
        {
            ($_ -eq "Import-EC2Image/BootMode") -Or
            ($_ -eq "Register-EC2Image/BootMode")
        }
        {
            $v = "legacy-bios","uefi","uefi-preferred"
            break
        }

        # Amazon.EC2.BurstablePerformance
        {
            ($_ -eq "Get-EC2InstanceTypesFromInstanceRequirement/InstanceRequirements_BurstablePerformance") -Or
            ($_ -eq "Get-EC2SpotPlacementScore/InstanceRequirements_BurstablePerformance")
        }
        {
            $v = "excluded","included","required"
            break
        }

        # Amazon.EC2.CallerRole
        "Get-EC2CapacityReservationBillingRequest/Role"
        {
            $v = "odcr-owner","unused-reservation-billing-owner"
            break
        }

        # Amazon.EC2.CapacityReservationInstancePlatform
        {
            ($_ -eq "Add-EC2CapacityReservation/InstancePlatform") -Or
            ($_ -eq "New-EC2EC2CapacityBlock/InstancePlatform")
        }
        {
            $v = "Linux with SQL Server Enterprise","Linux with SQL Server Standard","Linux with SQL Server Web","Linux/UNIX","Red Hat Enterprise Linux","RHEL with HA","RHEL with HA and SQL Server Enterprise","RHEL with HA and SQL Server Standard","RHEL with SQL Server Enterprise","RHEL with SQL Server Standard","RHEL with SQL Server Web","SUSE Linux","Ubuntu Pro","Windows","Windows with SQL Server","Windows with SQL Server Enterprise","Windows with SQL Server Standard","Windows with SQL Server Web"
            break
        }

        # Amazon.EC2.CapacityReservationPreference
        {
            ($_ -eq "Edit-EC2InstanceCapacityReservationAttribute/CapacityReservationSpecification_CapacityReservationPreference") -Or
            ($_ -eq "New-EC2Instance/CapacityReservationSpecification_CapacityReservationPreference")
        }
        {
            $v = "none","open"
            break
        }

        # Amazon.EC2.CapacityReservationTenancy
        "Add-EC2CapacityReservation/Tenancy"
        {
            $v = "dedicated","default"
            break
        }

        # Amazon.EC2.ConnectivityType
        "New-EC2NatGateway/ConnectivityType"
        {
            $v = "private","public"
            break
        }

        # Amazon.EC2.ContainerFormat
        "New-EC2InstanceExportTask/ExportToS3Task_ContainerFormat"
        {
            $v = "ova"
            break
        }

        # Amazon.EC2.CopyTagsFromSource
        "New-EC2SnapshotBatch/CopyTagsFromSource"
        {
            $v = "volume"
            break
        }

        # Amazon.EC2.CurrencyCodeValues
        {
            ($_ -eq "New-EC2HostReservation/CurrencyCode") -Or
            ($_ -eq "New-EC2ReservedInstance/LimitPrice_CurrencyCode")
        }
        {
            $v = "USD"
            break
        }

        # Amazon.EC2.DefaultInstanceMetadataEndpointState
        "Edit-EC2InstanceMetadataDefault/HttpEndpoint"
        {
            $v = "disabled","enabled","no-preference"
            break
        }

        # Amazon.EC2.DefaultInstanceMetadataTagsState
        "Edit-EC2InstanceMetadataDefault/InstanceMetadataTag"
        {
            $v = "disabled","enabled","no-preference"
            break
        }

        # Amazon.EC2.DefaultRouteTableAssociationValue
        {
            ($_ -eq "Edit-EC2TransitGateway/Options_DefaultRouteTableAssociation") -Or
            ($_ -eq "New-EC2TransitGateway/Options_DefaultRouteTableAssociation")
        }
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.DefaultRouteTablePropagationValue
        {
            ($_ -eq "Edit-EC2TransitGateway/Options_DefaultRouteTablePropagation") -Or
            ($_ -eq "New-EC2TransitGateway/Options_DefaultRouteTablePropagation")
        }
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.DefaultTargetCapacityType
        {
            ($_ -eq "Edit-EC2Fleet/TargetCapacitySpecification_DefaultTargetCapacityType") -Or
            ($_ -eq "New-EC2Fleet/TargetCapacitySpecification_DefaultTargetCapacityType")
        }
        {
            $v = "capacity-block","on-demand","spot"
            break
        }

        # Amazon.EC2.DestinationFileFormat
        "New-EC2FlowLog/DestinationOptions_FileFormat"
        {
            $v = "parquet","plain-text"
            break
        }

        # Amazon.EC2.DeviceTrustProviderType
        "New-EC2VerifiedAccessTrustProvider/DeviceTrustProviderType"
        {
            $v = "crowdstrike","jamf","jumpcloud"
            break
        }

        # Amazon.EC2.DiskImageFormat
        {
            ($_ -eq "Export-EC2Image/DiskImageFormat") -Or
            ($_ -eq "New-EC2InstanceExportTask/ExportToS3Task_DiskImageFormat")
        }
        {
            $v = "RAW","VHD","VMDK"
            break
        }

        # Amazon.EC2.DnsRecordIpType
        {
            ($_ -eq "Edit-EC2VpcEndpoint/DnsOptions_DnsRecordIpType") -Or
            ($_ -eq "New-EC2VpcEndpoint/DnsOptions_DnsRecordIpType")
        }
        {
            $v = "dualstack","ipv4","ipv6","service-defined"
            break
        }

        # Amazon.EC2.DnsSupportValue
        {
            ($_ -eq "Edit-EC2TransitGateway/Options_DnsSupport") -Or
            ($_ -eq "Edit-EC2TransitGatewayVpcAttachment/Options_DnsSupport") -Or
            ($_ -eq "New-EC2TransitGateway/Options_DnsSupport") -Or
            ($_ -eq "New-EC2TransitGatewayVpcAttachment/Options_DnsSupport")
        }
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.DomainType
        "New-EC2Address/Domain"
        {
            $v = "standard","vpc"
            break
        }

        # Amazon.EC2.DynamicRoutingValue
        "New-EC2TransitGatewayPeeringAttachment/Options_DynamicRouting"
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.EkPubKeyFormat
        "Get-EC2InstanceTpmEkPub/KeyFormat"
        {
            $v = "der","tpmt"
            break
        }

        # Amazon.EC2.EkPubKeyType
        "Get-EC2InstanceTpmEkPub/KeyType"
        {
            $v = "ecc-sec-p384","rsa-2048"
            break
        }

        # Amazon.EC2.EndDateType
        {
            ($_ -eq "Add-EC2CapacityReservation/EndDateType") -Or
            ($_ -eq "Edit-EC2CapacityReservation/EndDateType")
        }
        {
            $v = "limited","unlimited"
            break
        }

        # Amazon.EC2.EventType
        "Get-EC2SpotFleetRequestHistory/EventType"
        {
            $v = "error","fleetRequestChange","information","instanceChange"
            break
        }

        # Amazon.EC2.ExcessCapacityTerminationPolicy
        {
            ($_ -eq "Edit-EC2SpotFleetRequest/ExcessCapacityTerminationPolicy") -Or
            ($_ -eq "Request-EC2SpotFleet/SpotFleetRequestConfig_ExcessCapacityTerminationPolicy")
        }
        {
            $v = "default","noTermination"
            break
        }

        # Amazon.EC2.ExportEnvironment
        "New-EC2InstanceExportTask/TargetEnvironment"
        {
            $v = "citrix","microsoft","vmware"
            break
        }

        # Amazon.EC2.FleetCapacityReservationTenancy
        "New-EC2CapacityReservationFleet/Tenancy"
        {
            $v = "default"
            break
        }

        # Amazon.EC2.FleetCapacityReservationUsageStrategy
        "New-EC2Fleet/CapacityReservationOptions_UsageStrategy"
        {
            $v = "none","use-capacity-reservations-first","use-capacity-reservations-only"
            break
        }

        # Amazon.EC2.FleetEventType
        "Get-EC2FleetHistory/EventType"
        {
            $v = "fleet-change","instance-change","service-error"
            break
        }

        # Amazon.EC2.FleetExcessCapacityTerminationPolicy
        {
            ($_ -eq "Edit-EC2Fleet/ExcessCapacityTerminationPolicy") -Or
            ($_ -eq "New-EC2Fleet/ExcessCapacityTerminationPolicy")
        }
        {
            $v = "no-termination","termination"
            break
        }

        # Amazon.EC2.FleetInstanceMatchCriteria
        "New-EC2CapacityReservationFleet/InstanceMatchCriterion"
        {
            $v = "open"
            break
        }

        # Amazon.EC2.FleetOnDemandAllocationStrategy
        "New-EC2Fleet/OnDemandOptions_AllocationStrategy"
        {
            $v = "lowest-price","prioritized"
            break
        }

        # Amazon.EC2.FleetReplacementStrategy
        "New-EC2Fleet/CapacityRebalance_ReplacementStrategy"
        {
            $v = "launch","launch-before-terminate"
            break
        }

        # Amazon.EC2.FleetType
        {
            ($_ -eq "Request-EC2SpotFleet/SpotFleetRequestConfig_Type") -Or
            ($_ -eq "New-EC2Fleet/Type")
        }
        {
            $v = "instant","maintain","request"
            break
        }

        # Amazon.EC2.FlowLogsResourceType
        "New-EC2FlowLog/ResourceType"
        {
            $v = "NetworkInterface","Subnet","TransitGateway","TransitGatewayAttachment","VPC"
            break
        }

        # Amazon.EC2.FpgaImageAttributeName
        {
            ($_ -eq "Edit-EC2FpgaImageAttribute/Attribute") -Or
            ($_ -eq "Get-EC2FpgaImageAttribute/Attribute")
        }
        {
            $v = "description","loadPermission","name","productCodes"
            break
        }

        # Amazon.EC2.GatewayType
        {
            ($_ -eq "New-EC2CustomerGateway/Type") -Or
            ($_ -eq "New-EC2VpnGateway/Type")
        }
        {
            $v = "ipsec.1"
            break
        }

        # Amazon.EC2.HostMaintenance
        {
            ($_ -eq "Edit-EC2Host/HostMaintenance") -Or
            ($_ -eq "New-EC2Host/HostMaintenance")
        }
        {
            $v = "off","on"
            break
        }

        # Amazon.EC2.HostnameType
        {
            ($_ -eq "Edit-EC2PrivateDnsNameOption/PrivateDnsHostnameType") -Or
            ($_ -eq "Edit-EC2SubnetAttribute/PrivateDnsHostnameTypeOnLaunch") -Or
            ($_ -eq "New-EC2Instance/PrivateDnsNameOptions_HostnameType")
        }
        {
            $v = "ip-name","resource-name"
            break
        }

        # Amazon.EC2.HostRecovery
        {
            ($_ -eq "Edit-EC2Host/HostRecovery") -Or
            ($_ -eq "New-EC2Host/HostRecovery")
        }
        {
            $v = "off","on"
            break
        }

        # Amazon.EC2.HostTenancy
        "Edit-EC2InstancePlacement/Tenancy"
        {
            $v = "dedicated","default","host"
            break
        }

        # Amazon.EC2.HttpTokensState
        {
            ($_ -eq "Edit-EC2InstanceMetadataOption/HttpToken") -Or
            ($_ -eq "New-EC2Instance/MetadataOptions_HttpToken")
        }
        {
            $v = "optional","required"
            break
        }

        # Amazon.EC2.Igmpv2SupportValue
        "New-EC2TransitGatewayMulticastDomain/Options_Igmpv2Support"
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.ImageAttributeName
        "Get-EC2ImageAttribute/Attribute"
        {
            $v = "blockDeviceMapping","bootMode","deregistrationProtection","description","imdsSupport","kernel","lastLaunchedTime","launchPermission","productCodes","ramdisk","sriovNetSupport","tpmSupport","uefiData"
            break
        }

        # Amazon.EC2.ImageBlockPublicAccessEnabledState
        "Enable-EC2ImageBlockPublicAccess/ImageBlockPublicAccessState"
        {
            $v = "block-new-sharing"
            break
        }

        # Amazon.EC2.ImdsSupportValues
        "Register-EC2Image/ImdsSupport"
        {
            $v = "v2.0"
            break
        }

        # Amazon.EC2.InstanceAttributeName
        {
            ($_ -eq "Edit-EC2InstanceAttribute/Attribute") -Or
            ($_ -eq "Get-EC2InstanceAttribute/Attribute") -Or
            ($_ -eq "Reset-EC2InstanceAttribute/Attribute")
        }
        {
            $v = "blockDeviceMapping","disableApiStop","disableApiTermination","ebsOptimized","enaSupport","enclaveOptions","groupSet","instanceInitiatedShutdownBehavior","instanceType","kernel","productCodes","ramdisk","rootDeviceName","sourceDestCheck","sriovNetSupport","userData"
            break
        }

        # Amazon.EC2.InstanceAutoRecoveryState
        {
            ($_ -eq "Edit-EC2InstanceMaintenanceOption/AutoRecovery") -Or
            ($_ -eq "New-EC2Instance/MaintenanceOptions_AutoRecovery")
        }
        {
            $v = "default","disabled"
            break
        }

        # Amazon.EC2.InstanceInterruptionBehavior
        {
            ($_ -eq "Request-EC2SpotInstance/InstanceInterruptionBehavior") -Or
            ($_ -eq "Request-EC2SpotFleet/SpotFleetRequestConfig_InstanceInterruptionBehavior")
        }
        {
            $v = "hibernate","stop","terminate"
            break
        }

        # Amazon.EC2.InstanceMatchCriteria
        {
            ($_ -eq "Add-EC2CapacityReservation/InstanceMatchCriterion") -Or
            ($_ -eq "Edit-EC2CapacityReservation/InstanceMatchCriterion")
        }
        {
            $v = "open","targeted"
            break
        }

        # Amazon.EC2.InstanceMetadataEndpointState
        {
            ($_ -eq "Edit-EC2InstanceMetadataOption/HttpEndpoint") -Or
            ($_ -eq "New-EC2Instance/MetadataOptions_HttpEndpoint")
        }
        {
            $v = "disabled","enabled"
            break
        }

        # Amazon.EC2.InstanceMetadataProtocolState
        {
            ($_ -eq "Edit-EC2InstanceMetadataOption/HttpProtocolIpv6") -Or
            ($_ -eq "New-EC2Instance/MetadataOptions_HttpProtocolIpv6")
        }
        {
            $v = "disabled","enabled"
            break
        }

        # Amazon.EC2.InstanceMetadataTagsState
        {
            ($_ -eq "Edit-EC2InstanceMetadataOption/InstanceMetadataTag") -Or
            ($_ -eq "New-EC2Instance/MetadataOptions_InstanceMetadataTag")
        }
        {
            $v = "disabled","enabled"
            break
        }

        # Amazon.EC2.InstanceType
        {
            ($_ -eq "Get-EC2ReservedInstancesOffering/InstanceType") -Or
            ($_ -eq "New-EC2Instance/InstanceType") -Or
            ($_ -eq "Request-EC2SpotInstance/LaunchSpecification_InstanceType")
        }
        {
            $v = "a1.2xlarge","a1.4xlarge","a1.large","a1.medium","a1.metal","a1.xlarge","c1.medium","c1.xlarge","c3.2xlarge","c3.4xlarge","c3.8xlarge","c3.large","c3.xlarge","c4.2xlarge","c4.4xlarge","c4.8xlarge","c4.large","c4.xlarge","c5.12xlarge","c5.18xlarge","c5.24xlarge","c5.2xlarge","c5.4xlarge","c5.9xlarge","c5.large","c5.metal","c5.xlarge","c5a.12xlarge","c5a.16xlarge","c5a.24xlarge","c5a.2xlarge","c5a.4xlarge","c5a.8xlarge","c5a.large","c5a.xlarge","c5ad.12xlarge","c5ad.16xlarge","c5ad.24xlarge","c5ad.2xlarge","c5ad.4xlarge","c5ad.8xlarge","c5ad.large","c5ad.xlarge","c5d.12xlarge","c5d.18xlarge","c5d.24xlarge","c5d.2xlarge","c5d.4xlarge","c5d.9xlarge","c5d.large","c5d.metal","c5d.xlarge","c5n.18xlarge","c5n.2xlarge","c5n.4xlarge","c5n.9xlarge","c5n.large","c5n.metal","c5n.xlarge","c6a.12xlarge","c6a.16xlarge","c6a.24xlarge","c6a.2xlarge","c6a.32xlarge","c6a.48xlarge","c6a.4xlarge","c6a.8xlarge","c6a.large","c6a.metal","c6a.xlarge","c6g.12xlarge","c6g.16xlarge","c6g.2xlarge","c6g.4xlarge","c6g.8xlarge","c6g.large","c6g.medium","c6g.metal","c6g.xlarge","c6gd.12xlarge","c6gd.16xlarge","c6gd.2xlarge","c6gd.4xlarge","c6gd.8xlarge","c6gd.large","c6gd.medium","c6gd.metal","c6gd.xlarge","c6gn.12xlarge","c6gn.16xlarge","c6gn.2xlarge","c6gn.4xlarge","c6gn.8xlarge","c6gn.large","c6gn.medium","c6gn.xlarge","c6i.12xlarge","c6i.16xlarge","c6i.24xlarge","c6i.2xlarge","c6i.32xlarge","c6i.4xlarge","c6i.8xlarge","c6i.large","c6i.metal","c6i.xlarge","c6id.12xlarge","c6id.16xlarge","c6id.24xlarge","c6id.2xlarge","c6id.32xlarge","c6id.4xlarge","c6id.8xlarge","c6id.large","c6id.metal","c6id.xlarge","c6in.12xlarge","c6in.16xlarge","c6in.24xlarge","c6in.2xlarge","c6in.32xlarge","c6in.4xlarge","c6in.8xlarge","c6in.large","c6in.metal","c6in.xlarge","c7a.12xlarge","c7a.16xlarge","c7a.24xlarge","c7a.2xlarge","c7a.32xlarge","c7a.48xlarge","c7a.4xlarge","c7a.8xlarge","c7a.large","c7a.medium","c7a.metal-48xl","c7a.xlarge","c7g.12xlarge","c7g.16xlarge","c7g.2xlarge","c7g.4xlarge","c7g.8xlarge","c7g.large","c7g.medium","c7g.metal","c7g.xlarge","c7gd.12xlarge","c7gd.16xlarge","c7gd.2xlarge","c7gd.4xlarge","c7gd.8xlarge","c7gd.large","c7gd.medium","c7gd.metal","c7gd.xlarge","c7gn.12xlarge","c7gn.16xlarge","c7gn.2xlarge","c7gn.4xlarge","c7gn.8xlarge","c7gn.large","c7gn.medium","c7gn.metal","c7gn.xlarge","c7i-flex.2xlarge","c7i-flex.4xlarge","c7i-flex.8xlarge","c7i-flex.large","c7i-flex.xlarge","c7i.12xlarge","c7i.16xlarge","c7i.24xlarge","c7i.2xlarge","c7i.48xlarge","c7i.4xlarge","c7i.8xlarge","c7i.large","c7i.metal-24xl","c7i.metal-48xl","c7i.xlarge","c8g.12xlarge","c8g.16xlarge","c8g.24xlarge","c8g.2xlarge","c8g.48xlarge","c8g.4xlarge","c8g.8xlarge","c8g.large","c8g.medium","c8g.metal-24xl","c8g.metal-48xl","c8g.xlarge","cc1.4xlarge","cc2.8xlarge","cg1.4xlarge","cr1.8xlarge","d2.2xlarge","d2.4xlarge","d2.8xlarge","d2.xlarge","d3.2xlarge","d3.4xlarge","d3.8xlarge","d3.xlarge","d3en.12xlarge","d3en.2xlarge","d3en.4xlarge","d3en.6xlarge","d3en.8xlarge","d3en.xlarge","dl1.24xlarge","dl2q.24xlarge","f1.16xlarge","f1.2xlarge","f1.4xlarge","g2.2xlarge","g2.8xlarge","g3.16xlarge","g3.4xlarge","g3.8xlarge","g3s.xlarge","g4ad.16xlarge","g4ad.2xlarge","g4ad.4xlarge","g4ad.8xlarge","g4ad.xlarge","g4dn.12xlarge","g4dn.16xlarge","g4dn.2xlarge","g4dn.4xlarge","g4dn.8xlarge","g4dn.metal","g4dn.xlarge","g5.12xlarge","g5.16xlarge","g5.24xlarge","g5.2xlarge","g5.48xlarge","g5.4xlarge","g5.8xlarge","g5.xlarge","g5g.16xlarge","g5g.2xlarge","g5g.4xlarge","g5g.8xlarge","g5g.metal","g5g.xlarge","g6.12xlarge","g6.16xlarge","g6.24xlarge","g6.2xlarge","g6.48xlarge","g6.4xlarge","g6.8xlarge","g6.xlarge","g6e.12xlarge","g6e.16xlarge","g6e.24xlarge","g6e.2xlarge","g6e.48xlarge","g6e.4xlarge","g6e.8xlarge","g6e.xlarge","gr6.4xlarge","gr6.8xlarge","h1.16xlarge","h1.2xlarge","h1.4xlarge","h1.8xlarge","hi1.4xlarge","hpc6a.48xlarge","hpc6id.32xlarge","hpc7a.12xlarge","hpc7a.24xlarge","hpc7a.48xlarge","hpc7a.96xlarge","hpc7g.16xlarge","hpc7g.4xlarge","hpc7g.8xlarge","hs1.8xlarge","i2.2xlarge","i2.4xlarge","i2.8xlarge","i2.xlarge","i3.16xlarge","i3.2xlarge","i3.4xlarge","i3.8xlarge","i3.large","i3.metal","i3.xlarge","i3en.12xlarge","i3en.24xlarge","i3en.2xlarge","i3en.3xlarge","i3en.6xlarge","i3en.large","i3en.metal","i3en.xlarge","i4g.16xlarge","i4g.2xlarge","i4g.4xlarge","i4g.8xlarge","i4g.large","i4g.xlarge","i4i.12xlarge","i4i.16xlarge","i4i.24xlarge","i4i.2xlarge","i4i.32xlarge","i4i.4xlarge","i4i.8xlarge","i4i.large","i4i.metal","i4i.xlarge","im4gn.16xlarge","im4gn.2xlarge","im4gn.4xlarge","im4gn.8xlarge","im4gn.large","im4gn.xlarge","inf1.24xlarge","inf1.2xlarge","inf1.6xlarge","inf1.xlarge","inf2.24xlarge","inf2.48xlarge","inf2.8xlarge","inf2.xlarge","is4gen.2xlarge","is4gen.4xlarge","is4gen.8xlarge","is4gen.large","is4gen.medium","is4gen.xlarge","m1.large","m1.medium","m1.small","m1.xlarge","m2.2xlarge","m2.4xlarge","m2.xlarge","m3.2xlarge","m3.large","m3.medium","m3.xlarge","m4.10xlarge","m4.16xlarge","m4.2xlarge","m4.4xlarge","m4.large","m4.xlarge","m5.12xlarge","m5.16xlarge","m5.24xlarge","m5.2xlarge","m5.4xlarge","m5.8xlarge","m5.large","m5.metal","m5.xlarge","m5a.12xlarge","m5a.16xlarge","m5a.24xlarge","m5a.2xlarge","m5a.4xlarge","m5a.8xlarge","m5a.large","m5a.xlarge","m5ad.12xlarge","m5ad.16xlarge","m5ad.24xlarge","m5ad.2xlarge","m5ad.4xlarge","m5ad.8xlarge","m5ad.large","m5ad.xlarge","m5d.12xlarge","m5d.16xlarge","m5d.24xlarge","m5d.2xlarge","m5d.4xlarge","m5d.8xlarge","m5d.large","m5d.metal","m5d.xlarge","m5dn.12xlarge","m5dn.16xlarge","m5dn.24xlarge","m5dn.2xlarge","m5dn.4xlarge","m5dn.8xlarge","m5dn.large","m5dn.metal","m5dn.xlarge","m5n.12xlarge","m5n.16xlarge","m5n.24xlarge","m5n.2xlarge","m5n.4xlarge","m5n.8xlarge","m5n.large","m5n.metal","m5n.xlarge","m5zn.12xlarge","m5zn.2xlarge","m5zn.3xlarge","m5zn.6xlarge","m5zn.large","m5zn.metal","m5zn.xlarge","m6a.12xlarge","m6a.16xlarge","m6a.24xlarge","m6a.2xlarge","m6a.32xlarge","m6a.48xlarge","m6a.4xlarge","m6a.8xlarge","m6a.large","m6a.metal","m6a.xlarge","m6g.12xlarge","m6g.16xlarge","m6g.2xlarge","m6g.4xlarge","m6g.8xlarge","m6g.large","m6g.medium","m6g.metal","m6g.xlarge","m6gd.12xlarge","m6gd.16xlarge","m6gd.2xlarge","m6gd.4xlarge","m6gd.8xlarge","m6gd.large","m6gd.medium","m6gd.metal","m6gd.xlarge","m6i.12xlarge","m6i.16xlarge","m6i.24xlarge","m6i.2xlarge","m6i.32xlarge","m6i.4xlarge","m6i.8xlarge","m6i.large","m6i.metal","m6i.xlarge","m6id.12xlarge","m6id.16xlarge","m6id.24xlarge","m6id.2xlarge","m6id.32xlarge","m6id.4xlarge","m6id.8xlarge","m6id.large","m6id.metal","m6id.xlarge","m6idn.12xlarge","m6idn.16xlarge","m6idn.24xlarge","m6idn.2xlarge","m6idn.32xlarge","m6idn.4xlarge","m6idn.8xlarge","m6idn.large","m6idn.metal","m6idn.xlarge","m6in.12xlarge","m6in.16xlarge","m6in.24xlarge","m6in.2xlarge","m6in.32xlarge","m6in.4xlarge","m6in.8xlarge","m6in.large","m6in.metal","m6in.xlarge","m7a.12xlarge","m7a.16xlarge","m7a.24xlarge","m7a.2xlarge","m7a.32xlarge","m7a.48xlarge","m7a.4xlarge","m7a.8xlarge","m7a.large","m7a.medium","m7a.metal-48xl","m7a.xlarge","m7g.12xlarge","m7g.16xlarge","m7g.2xlarge","m7g.4xlarge","m7g.8xlarge","m7g.large","m7g.medium","m7g.metal","m7g.xlarge","m7gd.12xlarge","m7gd.16xlarge","m7gd.2xlarge","m7gd.4xlarge","m7gd.8xlarge","m7gd.large","m7gd.medium","m7gd.metal","m7gd.xlarge","m7i-flex.2xlarge","m7i-flex.4xlarge","m7i-flex.8xlarge","m7i-flex.large","m7i-flex.xlarge","m7i.12xlarge","m7i.16xlarge","m7i.24xlarge","m7i.2xlarge","m7i.48xlarge","m7i.4xlarge","m7i.8xlarge","m7i.large","m7i.metal-24xl","m7i.metal-48xl","m7i.xlarge","m8g.12xlarge","m8g.16xlarge","m8g.24xlarge","m8g.2xlarge","m8g.48xlarge","m8g.4xlarge","m8g.8xlarge","m8g.large","m8g.medium","m8g.metal-24xl","m8g.metal-48xl","m8g.xlarge","mac1.metal","mac2-m1ultra.metal","mac2-m2.metal","mac2-m2pro.metal","mac2.metal","p2.16xlarge","p2.8xlarge","p2.xlarge","p3.16xlarge","p3.2xlarge","p3.8xlarge","p3dn.24xlarge","p4d.24xlarge","p4de.24xlarge","p5.48xlarge","r3.2xlarge","r3.4xlarge","r3.8xlarge","r3.large","r3.xlarge","r4.16xlarge","r4.2xlarge","r4.4xlarge","r4.8xlarge","r4.large","r4.xlarge","r5.12xlarge","r5.16xlarge","r5.24xlarge","r5.2xlarge","r5.4xlarge","r5.8xlarge","r5.large","r5.metal","r5.xlarge","r5a.12xlarge","r5a.16xlarge","r5a.24xlarge","r5a.2xlarge","r5a.4xlarge","r5a.8xlarge","r5a.large","r5a.xlarge","r5ad.12xlarge","r5ad.16xlarge","r5ad.24xlarge","r5ad.2xlarge","r5ad.4xlarge","r5ad.8xlarge","r5ad.large","r5ad.xlarge","r5b.12xlarge","r5b.16xlarge","r5b.24xlarge","r5b.2xlarge","r5b.4xlarge","r5b.8xlarge","r5b.large","r5b.metal","r5b.xlarge","r5d.12xlarge","r5d.16xlarge","r5d.24xlarge","r5d.2xlarge","r5d.4xlarge","r5d.8xlarge","r5d.large","r5d.metal","r5d.xlarge","r5dn.12xlarge","r5dn.16xlarge","r5dn.24xlarge","r5dn.2xlarge","r5dn.4xlarge","r5dn.8xlarge","r5dn.large","r5dn.metal","r5dn.xlarge","r5n.12xlarge","r5n.16xlarge","r5n.24xlarge","r5n.2xlarge","r5n.4xlarge","r5n.8xlarge","r5n.large","r5n.metal","r5n.xlarge","r6a.12xlarge","r6a.16xlarge","r6a.24xlarge","r6a.2xlarge","r6a.32xlarge","r6a.48xlarge","r6a.4xlarge","r6a.8xlarge","r6a.large","r6a.metal","r6a.xlarge","r6g.12xlarge","r6g.16xlarge","r6g.2xlarge","r6g.4xlarge","r6g.8xlarge","r6g.large","r6g.medium","r6g.metal","r6g.xlarge","r6gd.12xlarge","r6gd.16xlarge","r6gd.2xlarge","r6gd.4xlarge","r6gd.8xlarge","r6gd.large","r6gd.medium","r6gd.metal","r6gd.xlarge","r6i.12xlarge","r6i.16xlarge","r6i.24xlarge","r6i.2xlarge","r6i.32xlarge","r6i.4xlarge","r6i.8xlarge","r6i.large","r6i.metal","r6i.xlarge","r6id.12xlarge","r6id.16xlarge","r6id.24xlarge","r6id.2xlarge","r6id.32xlarge","r6id.4xlarge","r6id.8xlarge","r6id.large","r6id.metal","r6id.xlarge","r6idn.12xlarge","r6idn.16xlarge","r6idn.24xlarge","r6idn.2xlarge","r6idn.32xlarge","r6idn.4xlarge","r6idn.8xlarge","r6idn.large","r6idn.metal","r6idn.xlarge","r6in.12xlarge","r6in.16xlarge","r6in.24xlarge","r6in.2xlarge","r6in.32xlarge","r6in.4xlarge","r6in.8xlarge","r6in.large","r6in.metal","r6in.xlarge","r7a.12xlarge","r7a.16xlarge","r7a.24xlarge","r7a.2xlarge","r7a.32xlarge","r7a.48xlarge","r7a.4xlarge","r7a.8xlarge","r7a.large","r7a.medium","r7a.metal-48xl","r7a.xlarge","r7g.12xlarge","r7g.16xlarge","r7g.2xlarge","r7g.4xlarge","r7g.8xlarge","r7g.large","r7g.medium","r7g.metal","r7g.xlarge","r7gd.12xlarge","r7gd.16xlarge","r7gd.2xlarge","r7gd.4xlarge","r7gd.8xlarge","r7gd.large","r7gd.medium","r7gd.metal","r7gd.xlarge","r7i.12xlarge","r7i.16xlarge","r7i.24xlarge","r7i.2xlarge","r7i.48xlarge","r7i.4xlarge","r7i.8xlarge","r7i.large","r7i.metal-24xl","r7i.metal-48xl","r7i.xlarge","r7iz.12xlarge","r7iz.16xlarge","r7iz.2xlarge","r7iz.32xlarge","r7iz.4xlarge","r7iz.8xlarge","r7iz.large","r7iz.metal-16xl","r7iz.metal-32xl","r7iz.xlarge","r8g.12xlarge","r8g.16xlarge","r8g.24xlarge","r8g.2xlarge","r8g.48xlarge","r8g.4xlarge","r8g.8xlarge","r8g.large","r8g.medium","r8g.metal-24xl","r8g.metal-48xl","r8g.xlarge","t1.micro","t2.2xlarge","t2.large","t2.medium","t2.micro","t2.nano","t2.small","t2.xlarge","t3.2xlarge","t3.large","t3.medium","t3.micro","t3.nano","t3.small","t3.xlarge","t3a.2xlarge","t3a.large","t3a.medium","t3a.micro","t3a.nano","t3a.small","t3a.xlarge","t4g.2xlarge","t4g.large","t4g.medium","t4g.micro","t4g.nano","t4g.small","t4g.xlarge","trn1.2xlarge","trn1.32xlarge","trn1n.32xlarge","u-12tb1.112xlarge","u-12tb1.metal","u-18tb1.112xlarge","u-18tb1.metal","u-24tb1.112xlarge","u-24tb1.metal","u-3tb1.56xlarge","u-6tb1.112xlarge","u-6tb1.56xlarge","u-6tb1.metal","u-9tb1.112xlarge","u-9tb1.metal","u7i-12tb.224xlarge","u7ib-12tb.224xlarge","u7in-16tb.224xlarge","u7in-24tb.224xlarge","u7in-32tb.224xlarge","vt1.24xlarge","vt1.3xlarge","vt1.6xlarge","x1.16xlarge","x1.32xlarge","x1e.16xlarge","x1e.2xlarge","x1e.32xlarge","x1e.4xlarge","x1e.8xlarge","x1e.xlarge","x2gd.12xlarge","x2gd.16xlarge","x2gd.2xlarge","x2gd.4xlarge","x2gd.8xlarge","x2gd.large","x2gd.medium","x2gd.metal","x2gd.xlarge","x2idn.16xlarge","x2idn.24xlarge","x2idn.32xlarge","x2idn.metal","x2iedn.16xlarge","x2iedn.24xlarge","x2iedn.2xlarge","x2iedn.32xlarge","x2iedn.4xlarge","x2iedn.8xlarge","x2iedn.metal","x2iedn.xlarge","x2iezn.12xlarge","x2iezn.2xlarge","x2iezn.4xlarge","x2iezn.6xlarge","x2iezn.8xlarge","x2iezn.metal","x8g.12xlarge","x8g.16xlarge","x8g.24xlarge","x8g.2xlarge","x8g.48xlarge","x8g.4xlarge","x8g.8xlarge","x8g.large","x8g.medium","x8g.metal-24xl","x8g.metal-48xl","x8g.xlarge","z1d.12xlarge","z1d.2xlarge","z1d.3xlarge","z1d.6xlarge","z1d.large","z1d.metal","z1d.xlarge"
            break
        }

        # Amazon.EC2.InterfacePermissionType
        "New-EC2NetworkInterfacePermission/Permission"
        {
            $v = "EIP-ASSOCIATE","INSTANCE-ATTACH"
            break
        }

        # Amazon.EC2.IpAddressType
        {
            ($_ -eq "Edit-EC2VpcEndpoint/IpAddressType") -Or
            ($_ -eq "New-EC2VpcEndpoint/IpAddressType")
        }
        {
            $v = "dualstack","ipv4","ipv6"
            break
        }

        # Amazon.EC2.IpamPoolAwsService
        "New-EC2IpamPool/AwsService"
        {
            $v = "ec2"
            break
        }

        # Amazon.EC2.IpamPoolPublicIpSource
        "New-EC2IpamPool/PublicIpSource"
        {
            $v = "amazon","byoip"
            break
        }

        # Amazon.EC2.IpamPoolSourceResourceType
        "New-EC2IpamPool/SourceResource_ResourceType"
        {
            $v = "vpc"
            break
        }

        # Amazon.EC2.IpamResourceType
        "Get-EC2IpamResourceCidr/ResourceType"
        {
            $v = "eip","eni","ipv6-pool","public-ipv4-pool","subnet","vpc"
            break
        }

        # Amazon.EC2.IpamTier
        {
            ($_ -eq "Edit-EC2Ipam/Tier") -Or
            ($_ -eq "New-EC2Ipam/Tier")
        }
        {
            $v = "advanced","free"
            break
        }

        # Amazon.EC2.Ipv6SupportValue
        {
            ($_ -eq "Edit-EC2TransitGatewayVpcAttachment/Options_Ipv6Support") -Or
            ($_ -eq "New-EC2TransitGatewayVpcAttachment/Options_Ipv6Support")
        }
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.KeyFormat
        "New-EC2KeyPair/KeyFormat"
        {
            $v = "pem","ppk"
            break
        }

        # Amazon.EC2.KeyType
        "New-EC2KeyPair/KeyType"
        {
            $v = "ed25519","rsa"
            break
        }

        # Amazon.EC2.LocalGatewayRouteTableMode
        "New-EC2LocalGatewayRouteTable/Mode"
        {
            $v = "coip","direct-vpc-routing"
            break
        }

        # Amazon.EC2.LocalStorage
        {
            ($_ -eq "Get-EC2InstanceTypesFromInstanceRequirement/InstanceRequirements_LocalStorage") -Or
            ($_ -eq "Get-EC2SpotPlacementScore/InstanceRequirements_LocalStorage")
        }
        {
            $v = "excluded","included","required"
            break
        }

        # Amazon.EC2.LocationType
        "Get-EC2InstanceTypeOffering/LocationType"
        {
            $v = "availability-zone","availability-zone-id","outpost","region"
            break
        }

        # Amazon.EC2.LockMode
        "Lock-EC2Snapshot/LockMode"
        {
            $v = "compliance","governance"
            break
        }

        # Amazon.EC2.LogDestinationType
        "New-EC2FlowLog/LogDestinationType"
        {
            $v = "cloud-watch-logs","kinesis-data-firehose","s3"
            break
        }

        # Amazon.EC2.MetadataDefaultHttpTokensState
        "Edit-EC2InstanceMetadataDefault/HttpToken"
        {
            $v = "no-preference","optional","required"
            break
        }

        # Amazon.EC2.MetricType
        {
            ($_ -eq "Disable-EC2AwsNetworkPerformanceMetricSubscription/Metric") -Or
            ($_ -eq "Enable-EC2AwsNetworkPerformanceMetricSubscription/Metric")
        }
        {
            $v = "aggregate-latency"
            break
        }

        # Amazon.EC2.ModifyAvailabilityZoneOptInStatus
        "Edit-EC2AvailabilityZoneGroup/OptInStatus"
        {
            $v = "not-opted-in","opted-in"
            break
        }

        # Amazon.EC2.MulticastSupportValue
        "New-EC2TransitGateway/Options_MulticastSupport"
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.NetworkInterfaceAttribute
        "Get-EC2NetworkInterfaceAttribute/Attribute"
        {
            $v = "associatePublicIpAddress","attachment","description","groupSet","sourceDestCheck"
            break
        }

        # Amazon.EC2.NetworkInterfaceCreationType
        "New-EC2NetworkInterface/InterfaceType"
        {
            $v = "branch","efa","efa-only","trunk"
            break
        }

        # Amazon.EC2.OfferingClassType
        {
            ($_ -eq "Get-EC2ReservedInstance/OfferingClass") -Or
            ($_ -eq "Get-EC2ReservedInstancesOffering/OfferingClass")
        }
        {
            $v = "convertible","standard"
            break
        }

        # Amazon.EC2.OfferingTypeValues
        {
            ($_ -eq "Get-EC2ReservedInstance/OfferingType") -Or
            ($_ -eq "Get-EC2ReservedInstancesOffering/OfferingType")
        }
        {
            $v = "All Upfront","Heavy Utilization","Light Utilization","Medium Utilization","No Upfront","Partial Upfront"
            break
        }

        # Amazon.EC2.OnDemandAllocationStrategy
        "Request-EC2SpotFleet/SpotFleetRequestConfig_OnDemandAllocationStrategy"
        {
            $v = "lowestPrice","prioritized"
            break
        }

        # Amazon.EC2.OperationType
        {
            ($_ -eq "Edit-EC2FpgaImageAttribute/OperationType") -Or
            ($_ -eq "Edit-EC2ImageAttribute/OperationType") -Or
            ($_ -eq "Edit-EC2SnapshotAttribute/OperationType")
        }
        {
            $v = "add","remove"
            break
        }

        # Amazon.EC2.PayerResponsibility
        "Edit-EC2VpcEndpointServicePayerResponsibility/PayerResponsibility"
        {
            $v = "ServiceOwner"
            break
        }

        # Amazon.EC2.PlacementStrategy
        "New-EC2PlacementGroup/Strategy"
        {
            $v = "cluster","partition","spread"
            break
        }

        # Amazon.EC2.Protocol
        "New-EC2NetworkInsightsPath/Protocol"
        {
            $v = "tcp","udp"
            break
        }

        # Amazon.EC2.ProtocolValue
        "New-EC2TransitGatewayConnect/Options_Protocol"
        {
            $v = "gre"
            break
        }

        # Amazon.EC2.ReplacementStrategy
        "Request-EC2SpotFleet/CapacityRebalance_ReplacementStrategy"
        {
            $v = "launch","launch-before-terminate"
            break
        }

        # Amazon.EC2.ReportStatusType
        "Send-EC2InstanceStatus/Status"
        {
            $v = "impaired","ok"
            break
        }

        # Amazon.EC2.ResetFpgaImageAttributeName
        "Reset-EC2FpgaImageAttribute/Attribute"
        {
            $v = "loadPermission"
            break
        }

        # Amazon.EC2.ResetImageAttributeName
        "Reset-EC2ImageAttribute/Attribute"
        {
            $v = "launchPermission"
            break
        }

        # Amazon.EC2.RIProductDescription
        "Get-EC2ReservedInstancesOffering/ProductDescription"
        {
            $v = "Linux/UNIX","Linux/UNIX (Amazon VPC)","Windows","Windows (Amazon VPC)"
            break
        }

        # Amazon.EC2.RuleAction
        {
            ($_ -eq "New-EC2NetworkAclEntry/RuleAction") -Or
            ($_ -eq "Set-EC2NetworkAclEntry/RuleAction")
        }
        {
            $v = "allow","deny"
            break
        }

        # Amazon.EC2.SecurityGroupReferencingSupportValue
        {
            ($_ -eq "Edit-EC2TransitGateway/Options_SecurityGroupReferencingSupport") -Or
            ($_ -eq "Edit-EC2TransitGatewayVpcAttachment/Options_SecurityGroupReferencingSupport") -Or
            ($_ -eq "New-EC2TransitGateway/Options_SecurityGroupReferencingSupport") -Or
            ($_ -eq "New-EC2TransitGatewayVpcAttachment/Options_SecurityGroupReferencingSupport")
        }
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.SelfServicePortal
        {
            ($_ -eq "Edit-EC2ClientVpnEndpoint/SelfServicePortal") -Or
            ($_ -eq "New-EC2ClientVpnEndpoint/SelfServicePortal")
        }
        {
            $v = "disabled","enabled"
            break
        }

        # Amazon.EC2.ShutdownBehavior
        "New-EC2Instance/InstanceInitiatedShutdownBehavior"
        {
            $v = "stop","terminate"
            break
        }

        # Amazon.EC2.SnapshotAttributeName
        {
            ($_ -eq "Edit-EC2SnapshotAttribute/Attribute") -Or
            ($_ -eq "Get-EC2SnapshotAttribute/Attribute") -Or
            ($_ -eq "Reset-EC2SnapshotAttribute/Attribute")
        }
        {
            $v = "createVolumePermission","productCodes"
            break
        }

        # Amazon.EC2.SnapshotBlockPublicAccessState
        "Enable-EC2SnapshotBlockPublicAccess/State"
        {
            $v = "block-all-sharing","block-new-sharing","unblocked"
            break
        }

        # Amazon.EC2.SpotAllocationStrategy
        "New-EC2Fleet/SpotOptions_AllocationStrategy"
        {
            $v = "capacity-optimized","capacity-optimized-prioritized","diversified","lowest-price","price-capacity-optimized"
            break
        }

        # Amazon.EC2.SpotInstanceInterruptionBehavior
        "New-EC2Fleet/SpotOptions_InstanceInterruptionBehavior"
        {
            $v = "hibernate","stop","terminate"
            break
        }

        # Amazon.EC2.SpotInstanceType
        "Request-EC2SpotInstance/Type"
        {
            $v = "one-time","persistent"
            break
        }

        # Amazon.EC2.SpreadLevel
        "New-EC2PlacementGroup/SpreadLevel"
        {
            $v = "host","rack"
            break
        }

        # Amazon.EC2.StaticSourcesSupportValue
        "New-EC2TransitGatewayMulticastDomain/Options_StaticSourcesSupport"
        {
            $v = "disable","enable"
            break
        }

        # Amazon.EC2.StatisticType
        {
            ($_ -eq "Disable-EC2AwsNetworkPerformanceMetricSubscription/Statistic") -Or
            ($_ -eq "Enable-EC2AwsNetworkPerformanceMetricSubscription/Statistic")
        }
        {
            $v = "p50"
            break
        }

        # Amazon.EC2.SubnetCidrReservationType
        "New-EC2SubnetCidrReservation/ReservationType"
        {
            $v = "explicit","prefix"
            break
        }

        # Amazon.EC2.TargetCapacityUnitType
        {
            ($_ -eq "Request-EC2SpotFleet/SpotFleetRequestConfig_TargetCapacityUnitType") -Or
            ($_ -eq "Edit-EC2Fleet/TargetCapacitySpecification_TargetCapacityUnitType") -Or
            ($_ -eq "New-EC2Fleet/TargetCapacitySpecification_TargetCapacityUnitType") -Or
            ($_ -eq "Get-EC2SpotPlacementScore/TargetCapacityUnitType")
        }
        {
            $v = "memory-mib","units","vcpu"
            break
        }

        # Amazon.EC2.TargetStorageTier
        "Edit-EC2SnapshotTier/StorageTier"
        {
            $v = "archive"
            break
        }

        # Amazon.EC2.Tenancy
        {
            ($_ -eq "Get-EC2ReservedInstancesOffering/InstanceTenancy") -Or
            ($_ -eq "New-EC2Vpc/InstanceTenancy") -Or
            ($_ -eq "New-EC2Instance/Placement_Tenancy") -Or
            ($_ -eq "Request-EC2SpotInstance/Placement_Tenancy")
        }
        {
            $v = "dedicated","default","host"
            break
        }

        # Amazon.EC2.TpmSupportValues
        "Register-EC2Image/TpmSupport"
        {
            $v = "v2.0"
            break
        }

        # Amazon.EC2.TrafficDirection
        {
            ($_ -eq "Edit-EC2TrafficMirrorFilterRule/TrafficDirection") -Or
            ($_ -eq "New-EC2TrafficMirrorFilterRule/TrafficDirection")
        }
        {
            $v = "egress","ingress"
            break
        }

        # Amazon.EC2.TrafficMirrorRuleAction
        {
            ($_ -eq "Edit-EC2TrafficMirrorFilterRule/RuleAction") -Or
            ($_ -eq "New-EC2TrafficMirrorFilterRule/RuleAction")
        }
        {
            $v = "accept","reject"
            break
        }

        # Amazon.EC2.TrafficType
        "New-EC2FlowLog/TrafficType"
        {
            $v = "ACCEPT","ALL","REJECT"
            break
        }

        # Amazon.EC2.TransportProtocol
        "New-EC2ClientVpnEndpoint/TransportProtocol"
        {
            $v = "tcp","udp"
            break
        }

        # Amazon.EC2.TrustProviderType
        "New-EC2VerifiedAccessTrustProvider/TrustProviderType"
        {
            $v = "device","user"
            break
        }

        # Amazon.EC2.TunnelInsideIpVersion
        "New-EC2VpnConnection/Options_TunnelInsideIpVersion"
        {
            $v = "ipv4","ipv6"
            break
        }

        # Amazon.EC2.UnlimitedSupportedInstanceFamily
        {
            ($_ -eq "Edit-EC2DefaultCreditSpecification/InstanceFamily") -Or
            ($_ -eq "Get-EC2DefaultCreditSpecification/InstanceFamily")
        }
        {
            $v = "t2","t3","t3a","t4g"
            break
        }

        # Amazon.EC2.UserTrustProviderType
        "New-EC2VerifiedAccessTrustProvider/UserTrustProviderType"
        {
            $v = "iam-identity-center","oidc"
            break
        }

        # Amazon.EC2.VerificationMethod
        "Register-EC2IpamPoolCidr/VerificationMethod"
        {
            $v = "dns-token","remarks-x509"
            break
        }

        # Amazon.EC2.VerifiedAccessEndpointAttachmentType
        "New-EC2VerifiedAccessEndpoint/AttachmentType"
        {
            $v = "vpc"
            break
        }

        # Amazon.EC2.VerifiedAccessEndpointProtocol
        {
            ($_ -eq "Edit-EC2VerifiedAccessEndpoint/LoadBalancerOptions_Protocol") -Or
            ($_ -eq "New-EC2VerifiedAccessEndpoint/LoadBalancerOptions_Protocol") -Or
            ($_ -eq "Edit-EC2VerifiedAccessEndpoint/NetworkInterfaceOptions_Protocol") -Or
            ($_ -eq "New-EC2VerifiedAccessEndpoint/NetworkInterfaceOptions_Protocol")
        }
        {
            $v = "http","https"
            break
        }

        # Amazon.EC2.VerifiedAccessEndpointType
        "New-EC2VerifiedAccessEndpoint/EndpointType"
        {
            $v = "load-balancer","network-interface"
            break
        }

        # Amazon.EC2.VolumeAttributeName
        "Get-EC2VolumeAttribute/Attribute"
        {
            $v = "autoEnableIO","productCodes"
            break
        }

        # Amazon.EC2.VolumeType
        {
            ($_ -eq "Edit-EC2Volume/VolumeType") -Or
            ($_ -eq "New-EC2Volume/VolumeType")
        }
        {
            $v = "gp2","gp3","io1","io2","sc1","st1","standard"
            break
        }

        # Amazon.EC2.VpcAttributeName
        "Get-EC2VpcAttribute/Attribute"
        {
            $v = "enableDnsHostnames","enableDnsSupport","enableNetworkAddressUsageMetrics"
            break
        }

        # Amazon.EC2.VpcEndpointType
        "New-EC2VpcEndpoint/VpcEndpointType"
        {
            $v = "Gateway","GatewayLoadBalancer","Interface"
            break
        }

        # Amazon.EC2.VpcTenancy
        "Edit-EC2VpcTenancy/InstanceTenancy"
        {
            $v = "default"
            break
        }

        # Amazon.EC2.VpnEcmpSupportValue
        {
            ($_ -eq "Edit-EC2TransitGateway/Options_VpnEcmpSupport") -Or
            ($_ -eq "New-EC2TransitGateway/Options_VpnEcmpSupport")
        }
        {
            $v = "disable","enable"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EC2_map = @{
    "AddressFamily"=@("New-EC2IpamPool")
    "Affinity"=@("Edit-EC2InstancePlacement")
    "Architecture"=@("Register-EC2Image")
    "AttachmentType"=@("New-EC2VerifiedAccessEndpoint")
    "Attribute"=@("Edit-EC2FpgaImageAttribute","Edit-EC2InstanceAttribute","Edit-EC2SnapshotAttribute","Get-EC2AddressesAttribute","Get-EC2FpgaImageAttribute","Get-EC2ImageAttribute","Get-EC2InstanceAttribute","Get-EC2NetworkInterfaceAttribute","Get-EC2SnapshotAttribute","Get-EC2VolumeAttribute","Get-EC2VpcAttribute","Reset-EC2AddressAttribute","Reset-EC2FpgaImageAttribute","Reset-EC2ImageAttribute","Reset-EC2InstanceAttribute","Reset-EC2SnapshotAttribute")
    "AutoPlacement"=@("Edit-EC2Host","New-EC2Host")
    "AutoRecovery"=@("Edit-EC2InstanceMaintenanceOption")
    "AwsService"=@("New-EC2IpamPool")
    "BootMode"=@("Import-EC2Image","Register-EC2Image")
    "CapacityRebalance_ReplacementStrategy"=@("New-EC2Fleet","Request-EC2SpotFleet")
    "CapacityReservationOptions_UsageStrategy"=@("New-EC2Fleet")
    "CapacityReservationSpecification_CapacityReservationPreference"=@("Edit-EC2InstanceCapacityReservationAttribute","New-EC2Instance")
    "ConnectivityType"=@("New-EC2NatGateway")
    "CopyTagsFromSource"=@("New-EC2SnapshotBatch")
    "CurrencyCode"=@("New-EC2HostReservation")
    "DestinationOptions_FileFormat"=@("New-EC2FlowLog")
    "DeviceTrustProviderType"=@("New-EC2VerifiedAccessTrustProvider")
    "DiskImageFormat"=@("Export-EC2Image")
    "DnsOptions_DnsRecordIpType"=@("Edit-EC2VpcEndpoint","New-EC2VpcEndpoint")
    "Domain"=@("New-EC2Address")
    "EndDateType"=@("Add-EC2CapacityReservation","Edit-EC2CapacityReservation")
    "EndpointType"=@("New-EC2VerifiedAccessEndpoint")
    "EventType"=@("Get-EC2FleetHistory","Get-EC2SpotFleetRequestHistory")
    "ExcessCapacityTerminationPolicy"=@("Edit-EC2Fleet","Edit-EC2SpotFleetRequest","New-EC2Fleet")
    "ExportToS3Task_ContainerFormat"=@("New-EC2InstanceExportTask")
    "ExportToS3Task_DiskImageFormat"=@("New-EC2InstanceExportTask")
    "HostMaintenance"=@("Edit-EC2Host","New-EC2Host")
    "HostRecovery"=@("Edit-EC2Host","New-EC2Host")
    "HttpEndpoint"=@("Edit-EC2InstanceMetadataDefault","Edit-EC2InstanceMetadataOption")
    "HttpProtocolIpv6"=@("Edit-EC2InstanceMetadataOption")
    "HttpToken"=@("Edit-EC2InstanceMetadataDefault","Edit-EC2InstanceMetadataOption")
    "ImageBlockPublicAccessState"=@("Enable-EC2ImageBlockPublicAccess")
    "ImdsSupport"=@("Register-EC2Image")
    "InstanceFamily"=@("Edit-EC2DefaultCreditSpecification","Get-EC2DefaultCreditSpecification")
    "InstanceInitiatedShutdownBehavior"=@("New-EC2Instance")
    "InstanceInterruptionBehavior"=@("Request-EC2SpotInstance")
    "InstanceMatchCriterion"=@("Add-EC2CapacityReservation","Edit-EC2CapacityReservation","New-EC2CapacityReservationFleet")
    "InstanceMetadataTag"=@("Edit-EC2InstanceMetadataDefault","Edit-EC2InstanceMetadataOption")
    "InstancePlatform"=@("Add-EC2CapacityReservation","New-EC2EC2CapacityBlock")
    "InstanceRequirements_BareMetal"=@("Get-EC2InstanceTypesFromInstanceRequirement","Get-EC2SpotPlacementScore")
    "InstanceRequirements_BurstablePerformance"=@("Get-EC2InstanceTypesFromInstanceRequirement","Get-EC2SpotPlacementScore")
    "InstanceRequirements_LocalStorage"=@("Get-EC2InstanceTypesFromInstanceRequirement","Get-EC2SpotPlacementScore")
    "InstanceTenancy"=@("Edit-EC2VpcTenancy","Get-EC2ReservedInstancesOffering","New-EC2Vpc")
    "InstanceType"=@("Get-EC2ReservedInstancesOffering","New-EC2Instance")
    "InterfaceType"=@("New-EC2NetworkInterface")
    "IpAddressType"=@("Edit-EC2VpcEndpoint","New-EC2VpcEndpoint")
    "KeyFormat"=@("Get-EC2InstanceTpmEkPub","New-EC2KeyPair")
    "KeyType"=@("Get-EC2InstanceTpmEkPub","New-EC2KeyPair")
    "LaunchSpecification_InstanceType"=@("Request-EC2SpotInstance")
    "LimitPrice_CurrencyCode"=@("New-EC2ReservedInstance")
    "LoadBalancerOptions_Protocol"=@("Edit-EC2VerifiedAccessEndpoint","New-EC2VerifiedAccessEndpoint")
    "LocationType"=@("Get-EC2InstanceTypeOffering")
    "LockMode"=@("Lock-EC2Snapshot")
    "LogDestinationType"=@("New-EC2FlowLog")
    "MaintenanceOptions_AutoRecovery"=@("New-EC2Instance")
    "MetadataOptions_HttpEndpoint"=@("New-EC2Instance")
    "MetadataOptions_HttpProtocolIpv6"=@("New-EC2Instance")
    "MetadataOptions_HttpToken"=@("New-EC2Instance")
    "MetadataOptions_InstanceMetadataTag"=@("New-EC2Instance")
    "Metric"=@("Disable-EC2AwsNetworkPerformanceMetricSubscription","Enable-EC2AwsNetworkPerformanceMetricSubscription")
    "Mode"=@("New-EC2LocalGatewayRouteTable")
    "NetworkInterfaceOptions_Protocol"=@("Edit-EC2VerifiedAccessEndpoint","New-EC2VerifiedAccessEndpoint")
    "OfferingClass"=@("Get-EC2ReservedInstance","Get-EC2ReservedInstancesOffering")
    "OfferingType"=@("Get-EC2ReservedInstance","Get-EC2ReservedInstancesOffering")
    "OnDemandOptions_AllocationStrategy"=@("New-EC2Fleet")
    "OperationType"=@("Edit-EC2FpgaImageAttribute","Edit-EC2ImageAttribute","Edit-EC2SnapshotAttribute")
    "OptInStatus"=@("Edit-EC2AvailabilityZoneGroup")
    "Options_ApplianceModeSupport"=@("Edit-EC2TransitGatewayVpcAttachment","New-EC2TransitGatewayVpcAttachment")
    "Options_AutoAcceptSharedAssociation"=@("New-EC2TransitGatewayMulticastDomain")
    "Options_AutoAcceptSharedAttachment"=@("Edit-EC2TransitGateway","New-EC2TransitGateway")
    "Options_DefaultRouteTableAssociation"=@("Edit-EC2TransitGateway","New-EC2TransitGateway")
    "Options_DefaultRouteTablePropagation"=@("Edit-EC2TransitGateway","New-EC2TransitGateway")
    "Options_DnsSupport"=@("Edit-EC2TransitGateway","Edit-EC2TransitGatewayVpcAttachment","New-EC2TransitGateway","New-EC2TransitGatewayVpcAttachment")
    "Options_DynamicRouting"=@("New-EC2TransitGatewayPeeringAttachment")
    "Options_Igmpv2Support"=@("New-EC2TransitGatewayMulticastDomain")
    "Options_Ipv6Support"=@("Edit-EC2TransitGatewayVpcAttachment","New-EC2TransitGatewayVpcAttachment")
    "Options_MulticastSupport"=@("New-EC2TransitGateway")
    "Options_Protocol"=@("New-EC2TransitGatewayConnect")
    "Options_SecurityGroupReferencingSupport"=@("Edit-EC2TransitGateway","Edit-EC2TransitGatewayVpcAttachment","New-EC2TransitGateway","New-EC2TransitGatewayVpcAttachment")
    "Options_StaticSourcesSupport"=@("New-EC2TransitGatewayMulticastDomain")
    "Options_TunnelInsideIpVersion"=@("New-EC2VpnConnection")
    "Options_VpnEcmpSupport"=@("Edit-EC2TransitGateway","New-EC2TransitGateway")
    "PayerResponsibility"=@("Edit-EC2VpcEndpointServicePayerResponsibility")
    "Permission"=@("New-EC2NetworkInterfacePermission")
    "Placement_Tenancy"=@("New-EC2Instance","Request-EC2SpotInstance")
    "PrivateDnsHostnameType"=@("Edit-EC2PrivateDnsNameOption")
    "PrivateDnsHostnameTypeOnLaunch"=@("Edit-EC2SubnetAttribute")
    "PrivateDnsNameOptions_HostnameType"=@("New-EC2Instance")
    "ProductDescription"=@("Get-EC2ReservedInstancesOffering")
    "Protocol"=@("New-EC2NetworkInsightsPath")
    "PublicIpSource"=@("New-EC2IpamPool")
    "ReservationType"=@("New-EC2SubnetCidrReservation")
    "ResourceType"=@("Get-EC2IpamResourceCidr","New-EC2FlowLog")
    "Role"=@("Get-EC2CapacityReservationBillingRequest")
    "RuleAction"=@("Edit-EC2TrafficMirrorFilterRule","New-EC2NetworkAclEntry","New-EC2TrafficMirrorFilterRule","Set-EC2NetworkAclEntry")
    "SelfServicePortal"=@("Edit-EC2ClientVpnEndpoint","New-EC2ClientVpnEndpoint")
    "SourceResource_ResourceType"=@("New-EC2IpamPool")
    "SpotFleetRequestConfig_AllocationStrategy"=@("Request-EC2SpotFleet")
    "SpotFleetRequestConfig_ExcessCapacityTerminationPolicy"=@("Request-EC2SpotFleet")
    "SpotFleetRequestConfig_InstanceInterruptionBehavior"=@("Request-EC2SpotFleet")
    "SpotFleetRequestConfig_OnDemandAllocationStrategy"=@("Request-EC2SpotFleet")
    "SpotFleetRequestConfig_TargetCapacityUnitType"=@("Request-EC2SpotFleet")
    "SpotFleetRequestConfig_Type"=@("Request-EC2SpotFleet")
    "SpotOptions_AllocationStrategy"=@("New-EC2Fleet")
    "SpotOptions_InstanceInterruptionBehavior"=@("New-EC2Fleet")
    "SpreadLevel"=@("New-EC2PlacementGroup")
    "State"=@("Enable-EC2SnapshotBlockPublicAccess")
    "Statistic"=@("Disable-EC2AwsNetworkPerformanceMetricSubscription","Enable-EC2AwsNetworkPerformanceMetricSubscription")
    "Status"=@("Send-EC2InstanceStatus")
    "StorageTier"=@("Edit-EC2SnapshotTier")
    "Strategy"=@("New-EC2PlacementGroup")
    "TargetCapacitySpecification_DefaultTargetCapacityType"=@("Edit-EC2Fleet","New-EC2Fleet")
    "TargetCapacitySpecification_TargetCapacityUnitType"=@("Edit-EC2Fleet","New-EC2Fleet")
    "TargetCapacityUnitType"=@("Get-EC2SpotPlacementScore")
    "TargetEnvironment"=@("New-EC2InstanceExportTask")
    "Tenancy"=@("Add-EC2CapacityReservation","Edit-EC2InstancePlacement","New-EC2CapacityReservationFleet")
    "Tier"=@("Edit-EC2Ipam","New-EC2Ipam")
    "TpmSupport"=@("Register-EC2Image")
    "TrafficDirection"=@("Edit-EC2TrafficMirrorFilterRule","New-EC2TrafficMirrorFilterRule")
    "TrafficType"=@("New-EC2FlowLog")
    "TransportProtocol"=@("New-EC2ClientVpnEndpoint")
    "TrustProviderType"=@("New-EC2VerifiedAccessTrustProvider")
    "Type"=@("New-EC2CustomerGateway","New-EC2Fleet","New-EC2VpnGateway","Request-EC2SpotInstance")
    "UserTrustProviderType"=@("New-EC2VerifiedAccessTrustProvider")
    "VerificationMethod"=@("Register-EC2IpamPoolCidr")
    "VolumeType"=@("Edit-EC2Volume","New-EC2Volume")
    "VpcEndpointType"=@("New-EC2VpcEndpoint")
}

_awsArgumentCompleterRegistration $EC2_Completers $EC2_map

$EC2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EC2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EC2_SelectMap = @{
    "Select"=@("Approve-EC2AddressTransfer",
               "Approve-EC2CapacityReservationBillingOwnership",
               "Approve-EC2ReservedInstancesExchangeQuote",
               "Approve-EC2TransitGatewayMulticastDomainAssociation",
               "Approve-EC2TransitGatewayPeeringAttachment",
               "Approve-EC2TransitGatewayVpcAttachment",
               "Approve-EC2EndpointConnection",
               "Approve-EC2VpcPeeringConnection",
               "Start-EC2ByoipCidrAdvertisement",
               "New-EC2Address",
               "New-EC2Host",
               "New-EC2IpamPoolCidr",
               "Add-EC2SecurityGroupToClientVpnTargetNetwork",
               "Register-EC2Ipv6AddressList",
               "Register-EC2PrivateIpAddress",
               "Register-EC2PrivateNatGatewayAddress",
               "Register-EC2Address",
               "Register-EC2CapacityReservationBillingOwner",
               "Register-EC2ClientVpnTargetNetwork",
               "Register-EC2DhcpOption",
               "Register-EC2EnclaveCertificateIamRole",
               "Register-EC2IamInstanceProfile",
               "Register-EC2InstanceEventWindow",
               "Register-EC2IpamByoasn",
               "Register-EC2IpamResourceDiscovery",
               "Register-EC2NatGatewayAddress",
               "Register-EC2RouteTable",
               "Register-EC2SecurityGroupVpc",
               "Register-EC2SubnetCidrBlock",
               "Register-EC2TransitGatewayMulticastDomain",
               "Register-EC2TransitGatewayPolicyTable",
               "Register-EC2TransitGatewayRouteTable",
               "Register-EC2TrunkInterface",
               "Register-EC2VpcCidrBlock",
               "Add-EC2ClassicLinkVpc",
               "Add-EC2InternetGateway",
               "Add-EC2NetworkInterface",
               "Mount-EC2VerifiedAccessTrustProvider",
               "Add-EC2Volume",
               "Add-EC2VpnGateway",
               "Grant-EC2ClientVpnIngress",
               "Grant-EC2SecurityGroupEgress",
               "Grant-EC2SecurityGroupIngress",
               "New-EC2InstanceBundle",
               "Stop-EC2BundleTask",
               "Remove-EC2CapacityReservation",
               "Stop-EC2CapacityReservationFleet",
               "Stop-EC2ExportTask",
               "Stop-EC2ImageLaunchPermission",
               "Stop-EC2ImportTask",
               "Stop-EC2ReservedInstancesListing",
               "Stop-EC2SpotFleetRequest",
               "Stop-EC2SpotInstanceRequest",
               "Confirm-EC2ProductInstance",
               "Copy-EC2FpgaImage",
               "Copy-EC2Image",
               "Copy-EC2Snapshot",
               "Add-EC2CapacityReservation",
               "New-EC2CapacityReservationBySplitting",
               "New-EC2CapacityReservationFleet",
               "New-EC2CarrierGateway",
               "New-EC2ClientVpnEndpoint",
               "New-EC2ClientVpnRoute",
               "New-EC2CoipCidr",
               "New-EC2CoipPool",
               "New-EC2CustomerGateway",
               "New-EC2DefaultSubnet",
               "New-EC2DefaultVpc",
               "New-EC2DhcpOption",
               "New-EC2EgressOnlyInternetGateway",
               "New-EC2Fleet",
               "New-EC2FlowLog",
               "New-EC2FpgaImage",
               "New-EC2Image",
               "New-EC2InstanceConnectEndpoint",
               "New-EC2InstanceEventWindow",
               "New-EC2InstanceExportTask",
               "New-EC2InternetGateway",
               "New-EC2Ipam",
               "New-EC2IpamExternalResourceVerificationToken",
               "New-EC2IpamPool",
               "New-EC2IpamResourceDiscovery",
               "New-EC2IpamScope",
               "New-EC2KeyPair",
               "New-EC2LaunchTemplate",
               "New-EC2LaunchTemplateVersion",
               "New-EC2LocalGatewayRoute",
               "New-EC2LocalGatewayRouteTable",
               "New-EC2LocalGatewayRouteTableVirtualInterfaceGroupAssociation",
               "New-EC2LocalGatewayRouteTableVpcAssociation",
               "New-EC2ManagedPrefixList",
               "New-EC2NatGateway",
               "New-EC2NetworkAcl",
               "New-EC2NetworkAclEntry",
               "New-EC2NetworkInsightsAccessScope",
               "New-EC2NetworkInsightsPath",
               "New-EC2NetworkInterface",
               "New-EC2NetworkInterfacePermission",
               "New-EC2PlacementGroup",
               "New-EC2PublicIpv4Pool",
               "New-EC2ReplaceRootVolumeTask",
               "New-EC2ReservedInstancesListing",
               "New-EC2RestoreImageTask",
               "New-EC2Route",
               "New-EC2RouteTable",
               "New-EC2SecurityGroup",
               "New-EC2Snapshot",
               "New-EC2SnapshotBatch",
               "New-EC2SpotDatafeedSubscription",
               "New-EC2StoreImageTask",
               "New-EC2Subnet",
               "New-EC2SubnetCidrReservation",
               "New-EC2Tag",
               "New-EC2TrafficMirrorFilter",
               "New-EC2TrafficMirrorFilterRule",
               "New-EC2TrafficMirrorSession",
               "New-EC2TrafficMirrorTarget",
               "New-EC2TransitGateway",
               "New-EC2TransitGatewayConnect",
               "New-EC2TransitGatewayConnectPeer",
               "New-EC2TransitGatewayMulticastDomain",
               "New-EC2TransitGatewayPeeringAttachment",
               "New-EC2TransitGatewayPolicyTable",
               "New-EC2TransitGatewayPrefixListReference",
               "New-EC2TransitGatewayRoute",
               "New-EC2TransitGatewayRouteTable",
               "New-EC2TransitGatewayRouteTableAnnouncement",
               "New-EC2TransitGatewayVpcAttachment",
               "New-EC2VerifiedAccessEndpoint",
               "New-EC2VerifiedAccessGroup",
               "New-EC2VerifiedAccessInstance",
               "New-EC2VerifiedAccessTrustProvider",
               "New-EC2Volume",
               "New-EC2Vpc",
               "New-EC2VpcEndpoint",
               "New-EC2VpcEndpointConnectionNotification",
               "New-EC2VpcEndpointServiceConfiguration",
               "New-EC2VpcPeeringConnection",
               "New-EC2VpnConnection",
               "New-EC2VpnConnectionRoute",
               "New-EC2VpnGateway",
               "Remove-EC2CarrierGateway",
               "Remove-EC2ClientVpnEndpoint",
               "Remove-EC2ClientVpnRoute",
               "Remove-EC2CoipCidr",
               "Remove-EC2CoipPool",
               "Remove-EC2CustomerGateway",
               "Remove-EC2DhcpOption",
               "Remove-EC2EgressOnlyInternetGateway",
               "Remove-EC2Fleet",
               "Remove-EC2FlowLog",
               "Remove-EC2FpgaImage",
               "Remove-EC2InstanceConnectEndpoint",
               "Remove-EC2InstanceEventWindow",
               "Remove-EC2InternetGateway",
               "Remove-EC2Ipam",
               "Remove-EC2IpamExternalResourceVerificationToken",
               "Remove-EC2IpamPool",
               "Remove-EC2IpamResourceDiscovery",
               "Remove-EC2IpamScope",
               "Remove-EC2KeyPair",
               "Remove-EC2LaunchTemplate",
               "Remove-EC2TemplateVersion",
               "Remove-EC2LocalGatewayRoute",
               "Remove-EC2LocalGatewayRouteTable",
               "Remove-EC2LocalGatewayRouteTableVirtualInterfaceGroupAssociation",
               "Remove-EC2LocalGatewayRouteTableVpcAssociation",
               "Remove-EC2ManagedPrefixList",
               "Remove-EC2NatGateway",
               "Remove-EC2NetworkAcl",
               "Remove-EC2NetworkAclEntry",
               "Remove-EC2NetworkInsightsAccessScope",
               "Remove-EC2NetworkInsightsAccessScopeAnalysis",
               "Remove-EC2NetworkInsightsAnalysis",
               "Remove-EC2NetworkInsightsPath",
               "Remove-EC2NetworkInterface",
               "Remove-EC2NetworkInterfacePermission",
               "Remove-EC2PlacementGroup",
               "Remove-EC2PublicIpv4Pool",
               "Remove-EC2QueuedReservedInstance",
               "Remove-EC2Route",
               "Remove-EC2RouteTable",
               "Remove-EC2SecurityGroup",
               "Remove-EC2Snapshot",
               "Remove-EC2SpotDatafeedSubscription",
               "Remove-EC2Subnet",
               "Remove-EC2SubnetCidrReservation",
               "Remove-EC2Tag",
               "Remove-EC2TrafficMirrorFilter",
               "Remove-EC2TrafficMirrorFilterRule",
               "Remove-EC2TrafficMirrorSession",
               "Remove-EC2TrafficMirrorTarget",
               "Remove-EC2TransitGateway",
               "Remove-EC2TransitGatewayConnect",
               "Remove-EC2TransitGatewayConnectPeer",
               "Remove-EC2TransitGatewayMulticastDomain",
               "Remove-EC2TransitGatewayPeeringAttachment",
               "Remove-EC2TransitGatewayPolicyTable",
               "Remove-EC2TransitGatewayPrefixListReference",
               "Remove-EC2TransitGatewayRoute",
               "Remove-EC2TransitGatewayRouteTable",
               "Remove-EC2TransitGatewayRouteTableAnnouncement",
               "Remove-EC2TransitGatewayVpcAttachment",
               "Remove-EC2VerifiedAccessEndpoint",
               "Remove-EC2VerifiedAccessGroup",
               "Remove-EC2VerifiedAccessInstance",
               "Remove-EC2VerifiedAccessTrustProvider",
               "Remove-EC2Volume",
               "Remove-EC2Vpc",
               "Remove-EC2EndpointConnectionNotification",
               "Remove-EC2VpcEndpoint",
               "Remove-EC2EndpointServiceConfiguration",
               "Remove-EC2VpcPeeringConnection",
               "Remove-EC2VpnConnection",
               "Remove-EC2VpnConnectionRoute",
               "Remove-EC2VpnGateway",
               "Unregister-EC2ByoipCidr",
               "Remove-EC2IpamByoasn",
               "Unregister-EC2IpamPoolCidr",
               "Unregister-EC2PublicIpv4PoolCidr",
               "Unregister-EC2Image",
               "Unregister-EC2InstanceEventNotificationAttribute",
               "Unregister-EC2TransitGatewayMulticastGroupMember",
               "Unregister-EC2TransitGatewayMulticastGroupSource",
               "Get-EC2AccountAttribute",
               "Get-EC2Address",
               "Get-EC2AddressesAttribute",
               "Get-EC2AddressTransfer",
               "Get-EC2AggregateIdFormat",
               "Get-EC2AvailabilityZone",
               "Get-EC2AwsNetworkPerformanceMetricSubscription",
               "Get-EC2BundleTask",
               "Get-EC2ByoipCidr",
               "Get-EC2CapacityBlockOffering",
               "Get-EC2CapacityReservationBillingRequest",
               "Get-EC2CapacityReservationFleet",
               "Get-EC2CapacityReservation",
               "Get-EC2CarrierGateway",
               "Get-EC2ClassicLinkInstance",
               "Get-EC2ClientVpnAuthorizationRule",
               "Get-EC2ClientVpnConnection",
               "Get-EC2ClientVpnEndpoint",
               "Get-EC2ClientVpnRoute",
               "Get-EC2ClientVpnTargetNetwork",
               "Get-EC2CoipPool",
               "Get-EC2CustomerGateway",
               "Get-EC2DhcpOption",
               "Get-EC2EgressOnlyInternetGatewayList",
               "Get-EC2ElasticGpu",
               "Get-EC2ExportImageTask",
               "Get-EC2ExportTask",
               "Get-EC2FastLaunchImage",
               "Get-EC2FastSnapshotRestore",
               "Get-EC2FleetHistory",
               "Get-EC2FleetInstanceList",
               "Get-EC2FleetList",
               "Get-EC2FlowLog",
               "Get-EC2FpgaImageAttribute",
               "Get-EC2FpgaImage",
               "Get-EC2HostReservationOffering",
               "Get-EC2HostReservation",
               "Get-EC2Host",
               "Get-EC2IamInstanceProfileAssociation",
               "Get-EC2IdentityIdFormat",
               "Get-EC2IdFormat",
               "Get-EC2ImageAttribute",
               "Get-EC2Image",
               "Get-EC2ImportImageTask",
               "Get-EC2ImportSnapshotTask",
               "Get-EC2InstanceAttribute",
               "Get-EC2InstanceConnectEndpoint",
               "Get-EC2CreditSpecification",
               "Get-EC2InstanceEventNotificationAttribute",
               "Get-EC2InstanceEventWindow",
               "Get-EC2InstanceImageMetadata",
               "Get-EC2Instance",
               "Get-EC2InstanceStatus",
               "Get-EC2InstanceTopology",
               "Get-EC2InstanceTypeOffering",
               "Get-EC2InstanceType",
               "Get-EC2InternetGateway",
               "Get-EC2IpamByoasn",
               "Get-EC2IpamExternalResourceVerificationToken",
               "Get-EC2IpamPool",
               "Get-EC2IpamResourceDiscovery",
               "Get-EC2IpamResourceDiscoveryAssociation",
               "Get-EC2Ipam",
               "Get-EC2IpamScope",
               "Get-EC2Ipv6Pool",
               "Get-EC2KeyPair",
               "Get-EC2Template",
               "Get-EC2TemplateVersion",
               "Get-EC2LocalGatewayRouteTable",
               "Get-EC2LocalGatewayRouteTableVirtualInterfaceGroupAssociation",
               "Get-EC2LocalGatewayRouteTableVpcAssociation",
               "Get-EC2LocalGateway",
               "Get-EC2LocalGatewayVirtualInterfaceGroup",
               "Get-EC2LocalGatewayVirtualInterface",
               "Get-EC2LockedSnapshot",
               "Get-EC2MacHost",
               "Get-EC2ManagedPrefixList",
               "Get-EC2MovingAddress",
               "Get-EC2NatGateway",
               "Get-EC2NetworkAcl",
               "Get-EC2NetworkInsightsAccessScopeAnalysis",
               "Get-EC2NetworkInsightsAccessScope",
               "Get-EC2NetworkInsightsAnalysis",
               "Get-EC2NetworkInsightsPath",
               "Get-EC2NetworkInterfaceAttribute",
               "Get-EC2NetworkInterfacePermission",
               "Get-EC2NetworkInterface",
               "Get-EC2PlacementGroup",
               "Get-EC2PrefixList",
               "Get-EC2PrincipalIdFormat",
               "Get-EC2PublicIpv4Pool",
               "Get-EC2Region",
               "Get-EC2ReplaceRootVolumeTask",
               "Get-EC2ReservedInstance",
               "Get-EC2ReservedInstancesListing",
               "Get-EC2ReservedInstancesModification",
               "Get-EC2ReservedInstancesOffering",
               "Get-EC2RouteTable",
               "Get-EC2ScheduledInstanceAvailability",
               "Get-EC2ScheduledInstance",
               "Get-EC2SecurityGroupReference",
               "Get-EC2SecurityGroupRule",
               "Get-EC2SecurityGroup",
               "Get-EC2SecurityGroupVpcAssociation",
               "Get-EC2SnapshotAttribute",
               "Get-EC2Snapshot",
               "Get-EC2SnapshotTierStatus",
               "Get-EC2SpotDatafeedSubscription",
               "Get-EC2SpotFleetInstance",
               "Get-EC2SpotFleetRequestHistory",
               "Get-EC2SpotFleetRequest",
               "Get-EC2SpotInstanceRequest",
               "Get-EC2SpotPriceHistory",
               "Get-EC2StaleSecurityGroup",
               "Get-EC2StoreImageTask",
               "Get-EC2Subnet",
               "Get-EC2Tag",
               "Get-EC2TrafficMirrorFilterRule",
               "Get-EC2TrafficMirrorFilter",
               "Get-EC2TrafficMirrorSession",
               "Get-EC2TrafficMirrorTarget",
               "Get-EC2TransitGatewayAttachment",
               "Get-EC2TransitGatewayConnectPeer",
               "Get-EC2TransitGatewayConnect",
               "Get-EC2TransitGatewayMulticastDomain",
               "Get-EC2TransitGatewayPeeringAttachment",
               "Get-EC2TransitGatewayPolicyTable",
               "Get-EC2TransitGatewayRouteTableAnnouncement",
               "Get-EC2TransitGatewayRouteTable",
               "Get-EC2TransitGateway",
               "Get-EC2TransitGatewayVpcAttachment",
               "Get-EC2TrunkInterfaceAssociation",
               "Get-EC2VerifiedAccessEndpoint",
               "Get-EC2VerifiedAccessGroup",
               "Get-EC2VerifiedAccessInstanceLoggingConfiguration",
               "Get-EC2VerifiedAccessInstance",
               "Get-EC2VerifiedAccessTrustProvider",
               "Get-EC2VolumeAttribute",
               "Get-EC2Volume",
               "Get-EC2VolumeModification",
               "Get-EC2VolumeStatus",
               "Get-EC2VpcAttribute",
               "Get-EC2VpcClassicLink",
               "Get-EC2VpcClassicLinkDnsSupport",
               "Get-EC2EndpointConnectionNotification",
               "Get-EC2EndpointConnection",
               "Get-EC2VpcEndpoint",
               "Get-EC2EndpointServiceConfiguration",
               "Get-EC2EndpointServicePermission",
               "Get-EC2VpcEndpointService",
               "Get-EC2VpcPeeringConnection",
               "Get-EC2Vpc",
               "Get-EC2VpnConnection",
               "Get-EC2VpnGateway",
               "Dismount-EC2ClassicLinkVpc",
               "Dismount-EC2InternetGateway",
               "Dismount-EC2NetworkInterface",
               "Dismount-EC2VerifiedAccessTrustProvider",
               "Dismount-EC2Volume",
               "Dismount-EC2VpnGateway",
               "Disable-EC2AddressTransfer",
               "Disable-EC2AwsNetworkPerformanceMetricSubscription",
               "Disable-EC2EbsEncryptionByDefault",
               "Disable-EC2FastLaunch",
               "Disable-EC2FastSnapshotRestore",
               "Disable-EC2Image",
               "Disable-EC2ImageBlockPublicAccess",
               "Disable-EC2ImageDeprecation",
               "Disable-EC2ImageDeregistrationProtection",
               "Disable-EC2IpamOrganizationAdminAccount",
               "Disable-EC2SerialConsoleAccess",
               "Disable-EC2SnapshotBlockPublicAccess",
               "Disable-EC2TransitGatewayRouteTablePropagation",
               "Disable-EC2VgwRoutePropagation",
               "Disable-EC2VpcClassicLink",
               "Disable-EC2VpcClassicLinkDnsSupport",
               "Unregister-EC2Address",
               "Unregister-EC2CapacityReservationBillingOwner",
               "Unregister-EC2ClientVpnTargetNetwork",
               "Unregister-EC2EnclaveCertificateIamRole",
               "Unregister-EC2IamInstanceProfile",
               "Unregister-EC2InstanceEventWindow",
               "Unregister-EC2IpamByoasn",
               "Unregister-EC2IpamResourceDiscovery",
               "Unregister-EC2NatGatewayAddress",
               "Unregister-EC2RouteTable",
               "Unregister-EC2SecurityGroupVpc",
               "Unregister-EC2SubnetCidrBlock",
               "Unregister-EC2TransitGatewayMulticastDomain",
               "Unregister-EC2TransitGatewayPolicyTable",
               "Unregister-EC2TransitGatewayRouteTable",
               "Unregister-EC2TrunkInterface",
               "Unregister-EC2VpcCidrBlock",
               "Enable-EC2AddressTransfer",
               "Enable-EC2AwsNetworkPerformanceMetricSubscription",
               "Enable-EC2EbsEncryptionByDefault",
               "Enable-EC2FastLaunch",
               "Enable-EC2FastSnapshotRestore",
               "Enable-EC2Image",
               "Enable-EC2ImageBlockPublicAccess",
               "Enable-EC2ImageDeprecation",
               "Enable-EC2ImageDeregistrationProtection",
               "Enable-EC2IpamOrganizationAdminAccount",
               "Enable-EC2ReachabilityAnalyzerOrganizationSharing",
               "Enable-EC2SerialConsoleAccess",
               "Enable-EC2SnapshotBlockPublicAccess",
               "Enable-EC2TransitGatewayRouteTablePropagation",
               "Enable-EC2VgwRoutePropagation",
               "Enable-EC2VolumeIO",
               "Enable-EC2VpcClassicLink",
               "Enable-EC2VpcClassicLinkDnsSupport",
               "Export-EC2ClientVpnClientCertificateRevocationList",
               "Export-EC2ClientVpnClientConfiguration",
               "Export-EC2Image",
               "Export-EC2TransitGatewayRoute",
               "Get-EC2AssociatedEnclaveCertificateIamRole",
               "Get-EC2AssociatedIpv6PoolCidr",
               "Get-EC2AwsNetworkPerformanceData",
               "Get-EC2CapacityReservationUsage",
               "Get-EC2CoipPoolUsage",
               "Get-EC2ConsoleOutput",
               "Get-EC2ConsoleScreenshot",
               "Get-EC2DefaultCreditSpecification",
               "Get-EC2EbsDefaultKmsKeyId",
               "Get-EC2EbsEncryptionByDefault",
               "Get-EC2FlowLogsIntegrationTemplate",
               "Get-EC2GroupsForCapacityReservation",
               "Get-EC2HostReservationPurchasePreview",
               "Get-EC2ImageBlockPublicAccessState",
               "Get-EC2InstanceMetadataDefault",
               "Get-EC2InstanceTpmEkPub",
               "Get-EC2InstanceTypesFromInstanceRequirement",
               "Get-EC2InstanceUefiData",
               "Get-EC2IpamAddressHistory",
               "Get-EC2IpamDiscoveredAccount",
               "Get-EC2IpamDiscoveredPublicAddress",
               "Get-EC2IpamDiscoveredResourceCidr",
               "Get-EC2IpamPoolAllocation",
               "Get-EC2IpamPoolCidr",
               "Get-EC2IpamResourceCidr",
               "Get-EC2LaunchTemplateData",
               "Get-EC2ManagedPrefixListAssociation",
               "Get-EC2ManagedPrefixListEntry",
               "Get-EC2NetworkInsightsAccessScopeAnalysisFinding",
               "Get-EC2NetworkInsightsAccessScopeContent",
               "Get-EC2ReservedInstancesExchangeQuote",
               "Get-EC2SecurityGroupsForVpc",
               "Get-EC2SerialConsoleAccessStatus",
               "Get-EC2SnapshotBlockPublicAccessState",
               "Get-EC2SpotPlacementScore",
               "Get-EC2SubnetCidrReservation",
               "Get-EC2TransitGatewayAttachmentPropagation",
               "Get-EC2TransitGatewayMulticastDomainAssociation",
               "Get-EC2TransitGatewayPolicyTableAssociation",
               "Get-EC2TransitGatewayPolicyTableEntry",
               "Get-EC2TransitGatewayPrefixListReference",
               "Get-EC2TransitGatewayRouteTableAssociation",
               "Get-EC2TransitGatewayRouteTablePropagation",
               "Get-EC2VerifiedAccessEndpointPolicy",
               "Get-EC2VerifiedAccessGroupPolicy",
               "Get-EC2VpnConnectionDeviceSampleConfiguration",
               "Get-EC2VpnConnectionDeviceType",
               "Get-EC2VpnTunnelReplacementStatus",
               "Import-EC2ClientVpnClientCertificateRevocationList",
               "Import-EC2Image",
               "Import-EC2KeyPair",
               "Import-EC2Snapshot",
               "Get-EC2ImagesInRecycleBinList",
               "Get-EC2SnapshotsInRecycleBinList",
               "Lock-EC2Snapshot",
               "Edit-EC2AddressAttribute",
               "Edit-EC2AvailabilityZoneGroup",
               "Edit-EC2CapacityReservation",
               "Edit-EC2CapacityReservationFleet",
               "Edit-EC2ClientVpnEndpoint",
               "Edit-EC2DefaultCreditSpecification",
               "Edit-EC2EbsDefaultKmsKeyId",
               "Edit-EC2Fleet",
               "Edit-EC2FpgaImageAttribute",
               "Edit-EC2Host",
               "Edit-EC2IdentityIdFormat",
               "Edit-EC2IdFormat",
               "Edit-EC2ImageAttribute",
               "Edit-EC2InstanceAttribute",
               "Edit-EC2InstanceCapacityReservationAttribute",
               "Edit-EC2InstanceCpuOption",
               "Edit-EC2InstanceCreditSpecification",
               "Edit-EC2InstanceEventStartTime",
               "Edit-EC2InstanceEventWindow",
               "Edit-EC2InstanceMaintenanceOption",
               "Edit-EC2InstanceMetadataDefault",
               "Edit-EC2InstanceMetadataOption",
               "Edit-EC2InstancePlacement",
               "Edit-EC2Ipam",
               "Edit-EC2IpamPool",
               "Edit-EC2IpamResourceCidr",
               "Edit-EC2IpamResourceDiscovery",
               "Edit-EC2IpamScope",
               "Edit-EC2LaunchTemplate",
               "Edit-EC2LocalGatewayRoute",
               "Edit-EC2ManagedPrefixList",
               "Edit-EC2NetworkInterfaceAttribute",
               "Edit-EC2PrivateDnsNameOption",
               "Edit-EC2ReservedInstance",
               "Edit-EC2SecurityGroupRule",
               "Edit-EC2SnapshotAttribute",
               "Edit-EC2SnapshotTier",
               "Edit-EC2SpotFleetRequest",
               "Edit-EC2SubnetAttribute",
               "Edit-EC2TrafficMirrorFilterNetworkService",
               "Edit-EC2TrafficMirrorFilterRule",
               "Edit-EC2TrafficMirrorSession",
               "Edit-EC2TransitGateway",
               "Edit-EC2TransitGatewayPrefixListReference",
               "Edit-EC2TransitGatewayVpcAttachment",
               "Edit-EC2VerifiedAccessEndpoint",
               "Edit-EC2VerifiedAccessEndpointPolicy",
               "Edit-EC2VerifiedAccessGroup",
               "Edit-EC2VerifiedAccessGroupPolicy",
               "Edit-EC2VerifiedAccessInstance",
               "Edit-EC2VerifiedAccessInstanceLoggingConfiguration",
               "Edit-EC2VerifiedAccessTrustProvider",
               "Edit-EC2Volume",
               "Edit-EC2VolumeAttribute",
               "Edit-EC2VpcAttribute",
               "Edit-EC2VpcEndpoint",
               "Edit-EC2VpcEndpointConnectionNotification",
               "Edit-EC2VpcEndpointServiceConfiguration",
               "Edit-EC2VpcEndpointServicePayerResponsibility",
               "Edit-EC2EndpointServicePermission",
               "Edit-EC2VpcPeeringConnectionOption",
               "Edit-EC2VpcTenancy",
               "Edit-EC2VpnConnection",
               "Edit-EC2VpnConnectionOption",
               "Edit-EC2VpnTunnelCertificate",
               "Edit-EC2VpnTunnelOption",
               "Start-EC2InstanceMonitoring",
               "Move-EC2AddressToVpc",
               "Move-EC2ByoipCidrToIpam",
               "Move-EC2CapacityReservationInstance",
               "Register-EC2ByoipCidr",
               "Add-EC2IpamByoasn",
               "Register-EC2IpamPoolCidr",
               "Register-EC2PublicIpv4PoolCidr",
               "New-EC2EC2CapacityBlock",
               "New-EC2HostReservation",
               "New-EC2ReservedInstance",
               "New-EC2ScheduledInstancePurchase",
               "Restart-EC2Instance",
               "Register-EC2Image",
               "Register-EC2InstanceEventNotificationAttribute",
               "Register-EC2TransitGatewayMulticastGroupMember",
               "Register-EC2TransitGatewayMulticastGroupSource",
               "Deny-EC2CapacityReservationBillingOwnership",
               "Deny-EC2TransitGatewayMulticastDomainAssociation",
               "Deny-EC2TransitGatewayPeeringAttachment",
               "Deny-EC2TransitGatewayVpcAttachment",
               "Deny-EC2EndpointConnection",
               "Deny-EC2VpcPeeringConnection",
               "Remove-EC2Address",
               "Remove-EC2Host",
               "Remove-EC2IpamPoolAllocation",
               "Set-EC2IamInstanceProfileAssociation",
               "Set-EC2NetworkAclAssociation",
               "Set-EC2NetworkAclEntry",
               "Set-EC2Route",
               "Set-EC2RouteTableAssociation",
               "Set-EC2TransitGatewayRoute",
               "Set-EC2VpnTunnel",
               "Send-EC2InstanceStatus",
               "Request-EC2SpotFleet",
               "Request-EC2SpotInstance",
               "Reset-EC2AddressAttribute",
               "Reset-EC2EbsDefaultKmsKeyId",
               "Reset-EC2FpgaImageAttribute",
               "Reset-EC2ImageAttribute",
               "Reset-EC2InstanceAttribute",
               "Reset-EC2NetworkInterfaceAttribute",
               "Reset-EC2SnapshotAttribute",
               "Restore-EC2AddressToClassic",
               "Restore-EC2ImageFromRecycleBin",
               "Restore-EC2ManagedPrefixListVersion",
               "Restore-EC2SnapshotFromRecycleBin",
               "Restore-EC2SnapshotTier",
               "Revoke-EC2ClientVpnIngress",
               "Revoke-EC2SecurityGroupEgress",
               "Revoke-EC2SecurityGroupIngress",
               "New-EC2Instance",
               "New-EC2ScheduledInstance",
               "Search-EC2LocalGatewayRoute",
               "Search-EC2TransitGatewayMulticastGroup",
               "Search-EC2TransitGatewayRoute",
               "Send-EC2DiagnosticInterrupt",
               "Start-EC2Instance",
               "Start-EC2NetworkInsightsAccessScopeAnalysis",
               "Start-EC2NetworkInsightsAnalysis",
               "Start-EC2VpcEndpointServicePrivateDnsVerification",
               "Stop-EC2Instance",
               "Stop-EC2ClientVpnConnection",
               "Remove-EC2Instance",
               "Unregister-EC2Ipv6AddressList",
               "Unregister-EC2PrivateIpAddress",
               "Unregister-EC2PrivateNatGatewayAddress",
               "Unlock-EC2Snapshot",
               "Stop-EC2InstanceMonitoring",
               "Update-EC2SecurityGroupRuleEgressDescription",
               "Update-EC2SecurityGroupRuleIngressDescription",
               "Stop-EC2ByoipCidrAdvertisement",
               "Get-EC2ImageByName",
               "Get-EC2InstanceMetadata",
               "Get-EC2PasswordData")
}

_awsArgumentCompleterRegistration $EC2_SelectCompleters $EC2_SelectMap
# Argument completions for service AWS EC2 Instance Connect


$EC2IC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EC2IC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EC2IC_SelectMap = @{
    "Select"=@("Send-EC2ICSerialConsoleSSHPublicKey",
               "Send-EC2ICSSHPublicKey")
}

_awsArgumentCompleterRegistration $EC2IC_SelectCompleters $EC2IC_SelectMap
# Argument completions for service Amazon EC2 Container Registry


$ECR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ECR.EncryptionType
        {
            ($_ -eq "New-ECRRepository/EncryptionConfiguration_EncryptionType") -Or
            ($_ -eq "New-ECRRepositoryCreationTemplate/EncryptionConfiguration_EncryptionType") -Or
            ($_ -eq "Update-ECRRepositoryCreationTemplate/EncryptionConfiguration_EncryptionType")
        }
        {
            $v = "AES256","KMS","KMS_DSSE"
            break
        }

        # Amazon.ECR.ImageTagMutability
        {
            ($_ -eq "New-ECRRepository/ImageTagMutability") -Or
            ($_ -eq "New-ECRRepositoryCreationTemplate/ImageTagMutability") -Or
            ($_ -eq "Update-ECRRepositoryCreationTemplate/ImageTagMutability") -Or
            ($_ -eq "Write-ECRImageTagMutability/ImageTagMutability")
        }
        {
            $v = "IMMUTABLE","MUTABLE"
            break
        }

        # Amazon.ECR.ScanType
        "Write-ECRRegistryScanningConfiguration/ScanType"
        {
            $v = "BASIC","ENHANCED"
            break
        }

        # Amazon.ECR.TagStatus
        {
            ($_ -eq "Get-ECRImage/Filter_TagStatus") -Or
            ($_ -eq "Get-ECRImageMetadata/Filter_TagStatus") -Or
            ($_ -eq "Get-ECRLifecyclePolicyPreview/Filter_TagStatus")
        }
        {
            $v = "ANY","TAGGED","UNTAGGED"
            break
        }

        # Amazon.ECR.UpstreamRegistry
        "New-ECRPullThroughCacheRule/UpstreamRegistry"
        {
            $v = "azure-container-registry","docker-hub","ecr-public","github-container-registry","gitlab-container-registry","k8s","quay"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ECR_map = @{
    "EncryptionConfiguration_EncryptionType"=@("New-ECRRepository","New-ECRRepositoryCreationTemplate","Update-ECRRepositoryCreationTemplate")
    "Filter_TagStatus"=@("Get-ECRImage","Get-ECRImageMetadata","Get-ECRLifecyclePolicyPreview")
    "ImageTagMutability"=@("New-ECRRepository","New-ECRRepositoryCreationTemplate","Update-ECRRepositoryCreationTemplate","Write-ECRImageTagMutability")
    "ScanType"=@("Write-ECRRegistryScanningConfiguration")
    "UpstreamRegistry"=@("New-ECRPullThroughCacheRule")
}

_awsArgumentCompleterRegistration $ECR_Completers $ECR_map

$ECR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ECR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ECR_SelectMap = @{
    "Select"=@("Get-ECRLayerAvailabilityBatch",
               "Remove-ECRImageBatch",
               "Get-ECRImageBatch",
               "Get-ECRRepositoryScanningConfigurationBatch",
               "Complete-ECRLayerUpload",
               "New-ECRPullThroughCacheRule",
               "New-ECRRepository",
               "New-ECRRepositoryCreationTemplate",
               "Remove-ECRLifecyclePolicy",
               "Remove-ECRPullThroughCacheRule",
               "Remove-ECRRegistryPolicy",
               "Remove-ECRRepository",
               "Remove-ECRRepositoryCreationTemplate",
               "Remove-ECRRepositoryPolicy",
               "Get-ECRImageReplicationStatus",
               "Get-ECRImageMetadata",
               "Get-ECRImageScanFinding",
               "Get-ECRPullThroughCacheRule",
               "Get-ECRRegistry",
               "Get-ECRRepository",
               "Get-ECRRepositoryCreationTemplate",
               "Get-ECRAccountSetting",
               "Get-ECRAuthorizationToken",
               "Get-ECRDownloadUrlForLayer",
               "Get-ECRLifecyclePolicy",
               "Get-ECRLifecyclePolicyPreview",
               "Get-ECRRegistryPolicy",
               "Get-ECRRegistryScanningConfiguration",
               "Get-ECRRepositoryPolicy",
               "Start-ECRLayerUpload",
               "Get-ECRImage",
               "Get-ECRResourceTag",
               "Write-ECRAccountSetting",
               "Write-ECRImage",
               "Write-ECRImageScanningConfiguration",
               "Write-ECRImageTagMutability",
               "Write-ECRLifecyclePolicy",
               "Write-ECRRegistryPolicy",
               "Write-ECRRegistryScanningConfiguration",
               "Write-ECRReplicationConfiguration",
               "Set-ECRRepositoryPolicy",
               "Start-ECRImageScan",
               "Start-ECRLifecyclePolicyPreview",
               "Add-ECRResourceTag",
               "Remove-ECRResourceTag",
               "Update-ECRPullThroughCacheRule",
               "Update-ECRRepositoryCreationTemplate",
               "Send-ECRLayerPart",
               "Test-ECRPullThroughCacheRule",
               "Get-ECRLoginCommand")
}

_awsArgumentCompleterRegistration $ECR_SelectCompleters $ECR_SelectMap
# Argument completions for service Amazon Elastic Container Registry Public


$ECRP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ECRP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ECRP_SelectMap = @{
    "Select"=@("Get-ECRPLayerAvailabilityBatch",
               "Remove-ECRPImageBatch",
               "Complete-ECRPLayerUpload",
               "New-ECRPRepository",
               "Remove-ECRPRepository",
               "Remove-ECRPRepositoryPolicy",
               "Get-ECRPImage",
               "Get-ECRPImageTag",
               "Get-ECRPRegistry",
               "Get-ECRPRepository",
               "Get-ECRPAuthorizationToken",
               "Get-ECRPRegistryCatalogData",
               "Get-ECRPRepositoryCatalogData",
               "Get-ECRPRepositoryPolicy",
               "Start-ECRPLayerUpload",
               "Get-ECRPResourceTag",
               "Write-ECRPImage",
               "Write-ECRPRegistryCatalogData",
               "Write-ECRPRepositoryCatalogData",
               "Set-ECRPRepositoryPolicy",
               "Add-ECRPResourceTag",
               "Remove-ECRPResourceTag",
               "Send-ECRPLayerPart")
}

_awsArgumentCompleterRegistration $ECRP_SelectCompleters $ECRP_SelectMap
# Argument completions for service Amazon EC2 Container Service


$ECS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ECS.AssignPublicIp
        {
            ($_ -eq "New-ECSService/AwsvpcConfiguration_AssignPublicIp") -Or
            ($_ -eq "New-ECSTask/AwsvpcConfiguration_AssignPublicIp") -Or
            ($_ -eq "New-ECSTaskSet/AwsvpcConfiguration_AssignPublicIp") -Or
            ($_ -eq "Start-ECSTask/AwsvpcConfiguration_AssignPublicIp") -Or
            ($_ -eq "Update-ECSService/AwsvpcConfiguration_AssignPublicIp")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.ECS.ContainerInstanceStatus
        {
            ($_ -eq "Get-ECSContainerInstanceList/Status") -Or
            ($_ -eq "Update-ECSContainerInstancesState/Status")
        }
        {
            $v = "ACTIVE","DEREGISTERING","DRAINING","REGISTERING","REGISTRATION_FAILED"
            break
        }

        # Amazon.ECS.CPUArchitecture
        "Register-ECSTaskDefinition/RuntimePlatform_CpuArchitecture"
        {
            $v = "ARM64","X86_64"
            break
        }

        # Amazon.ECS.DeploymentControllerType
        "New-ECSService/DeploymentController_Type"
        {
            $v = "CODE_DEPLOY","ECS","EXTERNAL"
            break
        }

        # Amazon.ECS.DesiredStatus
        "Get-ECSTaskList/DesiredStatus"
        {
            $v = "PENDING","RUNNING","STOPPED"
            break
        }

        # Amazon.ECS.ExecuteCommandLogging
        {
            ($_ -eq "New-ECSCluster/ExecuteCommandConfiguration_Logging") -Or
            ($_ -eq "Update-ECSCluster/ExecuteCommandConfiguration_Logging")
        }
        {
            $v = "DEFAULT","NONE","OVERRIDE"
            break
        }

        # Amazon.ECS.IpcMode
        "Register-ECSTaskDefinition/IpcMode"
        {
            $v = "host","none","task"
            break
        }

        # Amazon.ECS.LaunchType
        {
            ($_ -eq "Get-ECSClusterService/LaunchType") -Or
            ($_ -eq "Get-ECSTaskList/LaunchType") -Or
            ($_ -eq "New-ECSService/LaunchType") -Or
            ($_ -eq "New-ECSTask/LaunchType") -Or
            ($_ -eq "New-ECSTaskSet/LaunchType")
        }
        {
            $v = "EC2","EXTERNAL","FARGATE"
            break
        }

        # Amazon.ECS.LogDriver
        {
            ($_ -eq "New-ECSService/LogConfiguration_LogDriver") -Or
            ($_ -eq "Update-ECSService/LogConfiguration_LogDriver")
        }
        {
            $v = "awsfirelens","awslogs","fluentd","gelf","journald","json-file","splunk","syslog"
            break
        }

        # Amazon.ECS.ManagedDraining
        {
            ($_ -eq "New-ECSCapacityProvider/AutoScalingGroupProvider_ManagedDraining") -Or
            ($_ -eq "Update-ECSCapacityProvider/AutoScalingGroupProvider_ManagedDraining")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.ECS.ManagedScalingStatus
        {
            ($_ -eq "New-ECSCapacityProvider/ManagedScaling_Status") -Or
            ($_ -eq "Update-ECSCapacityProvider/ManagedScaling_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.ECS.ManagedTerminationProtection
        {
            ($_ -eq "New-ECSCapacityProvider/AutoScalingGroupProvider_ManagedTerminationProtection") -Or
            ($_ -eq "Update-ECSCapacityProvider/AutoScalingGroupProvider_ManagedTerminationProtection")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.ECS.NetworkMode
        "Register-ECSTaskDefinition/NetworkMode"
        {
            $v = "awsvpc","bridge","host","none"
            break
        }

        # Amazon.ECS.OSFamily
        "Register-ECSTaskDefinition/RuntimePlatform_OperatingSystemFamily"
        {
            $v = "LINUX","WINDOWS_SERVER_2004_CORE","WINDOWS_SERVER_2016_FULL","WINDOWS_SERVER_2019_CORE","WINDOWS_SERVER_2019_FULL","WINDOWS_SERVER_2022_CORE","WINDOWS_SERVER_2022_FULL","WINDOWS_SERVER_20H2_CORE"
            break
        }

        # Amazon.ECS.PidMode
        "Register-ECSTaskDefinition/PidMode"
        {
            $v = "host","task"
            break
        }

        # Amazon.ECS.PropagateTags
        {
            ($_ -eq "New-ECSService/PropagateTag") -Or
            ($_ -eq "New-ECSTask/PropagateTag") -Or
            ($_ -eq "Start-ECSTask/PropagateTag") -Or
            ($_ -eq "Update-ECSService/PropagateTag")
        }
        {
            $v = "NONE","SERVICE","TASK_DEFINITION"
            break
        }

        # Amazon.ECS.ProxyConfigurationType
        "Register-ECSTaskDefinition/ProxyConfiguration_Type"
        {
            $v = "APPMESH"
            break
        }

        # Amazon.ECS.ScaleUnit
        {
            ($_ -eq "New-ECSTaskSet/Scale_Unit") -Or
            ($_ -eq "Update-ECSTaskSet/Scale_Unit")
        }
        {
            $v = "PERCENT"
            break
        }

        # Amazon.ECS.SchedulingStrategy
        {
            ($_ -eq "Get-ECSClusterService/SchedulingStrategy") -Or
            ($_ -eq "New-ECSService/SchedulingStrategy")
        }
        {
            $v = "DAEMON","REPLICA"
            break
        }

        # Amazon.ECS.SettingName
        {
            ($_ -eq "Get-ECSAccountSetting/Name") -Or
            ($_ -eq "Remove-ECSAccountSetting/Name") -Or
            ($_ -eq "Write-ECSAccountSetting/Name") -Or
            ($_ -eq "Write-ECSAccountSettingDefault/Name")
        }
        {
            $v = "awsvpcTrunking","containerInsights","containerInstanceLongArnFormat","fargateFIPSMode","fargateTaskRetirementWaitPeriod","guardDutyActivate","serviceLongArnFormat","tagResourceAuthorization","taskLongArnFormat"
            break
        }

        # Amazon.ECS.SortOrder
        "Get-ECSTaskDefinitionList/Sort"
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.ECS.TargetType
        "Get-ECSAttributeList/TargetType"
        {
            $v = "container-instance"
            break
        }

        # Amazon.ECS.TaskDefinitionFamilyStatus
        "Get-ECSTaskDefinitionFamilyList/Status"
        {
            $v = "ACTIVE","ALL","INACTIVE"
            break
        }

        # Amazon.ECS.TaskDefinitionStatus
        "Get-ECSTaskDefinitionList/Status"
        {
            $v = "ACTIVE","DELETE_IN_PROGRESS","INACTIVE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ECS_map = @{
    "AutoScalingGroupProvider_ManagedDraining"=@("New-ECSCapacityProvider","Update-ECSCapacityProvider")
    "AutoScalingGroupProvider_ManagedTerminationProtection"=@("New-ECSCapacityProvider","Update-ECSCapacityProvider")
    "AwsvpcConfiguration_AssignPublicIp"=@("New-ECSService","New-ECSTask","New-ECSTaskSet","Start-ECSTask","Update-ECSService")
    "DeploymentController_Type"=@("New-ECSService")
    "DesiredStatus"=@("Get-ECSTaskList")
    "ExecuteCommandConfiguration_Logging"=@("New-ECSCluster","Update-ECSCluster")
    "IpcMode"=@("Register-ECSTaskDefinition")
    "LaunchType"=@("Get-ECSClusterService","Get-ECSTaskList","New-ECSService","New-ECSTask","New-ECSTaskSet")
    "LogConfiguration_LogDriver"=@("New-ECSService","Update-ECSService")
    "ManagedScaling_Status"=@("New-ECSCapacityProvider","Update-ECSCapacityProvider")
    "Name"=@("Get-ECSAccountSetting","Remove-ECSAccountSetting","Write-ECSAccountSetting","Write-ECSAccountSettingDefault")
    "NetworkMode"=@("Register-ECSTaskDefinition")
    "PidMode"=@("Register-ECSTaskDefinition")
    "PropagateTag"=@("New-ECSService","New-ECSTask","Start-ECSTask","Update-ECSService")
    "ProxyConfiguration_Type"=@("Register-ECSTaskDefinition")
    "RuntimePlatform_CpuArchitecture"=@("Register-ECSTaskDefinition")
    "RuntimePlatform_OperatingSystemFamily"=@("Register-ECSTaskDefinition")
    "Scale_Unit"=@("New-ECSTaskSet","Update-ECSTaskSet")
    "SchedulingStrategy"=@("Get-ECSClusterService","New-ECSService")
    "Sort"=@("Get-ECSTaskDefinitionList")
    "Status"=@("Get-ECSContainerInstanceList","Get-ECSTaskDefinitionFamilyList","Get-ECSTaskDefinitionList","Update-ECSContainerInstancesState")
    "TargetType"=@("Get-ECSAttributeList")
}

_awsArgumentCompleterRegistration $ECS_Completers $ECS_map

$ECS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ECS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ECS_SelectMap = @{
    "Select"=@("New-ECSCapacityProvider",
               "New-ECSCluster",
               "New-ECSService",
               "New-ECSTaskSet",
               "Remove-ECSAccountSetting",
               "Remove-ECSAttribute",
               "Remove-ECSCapacityProvider",
               "Remove-ECSCluster",
               "Remove-ECSService",
               "Remove-ECSTaskDefinition",
               "Remove-ECSTaskSet",
               "Unregister-ECSContainerInstance",
               "Unregister-ECSTaskDefinition",
               "Get-ECSCapacityProvider",
               "Get-ECSClusterDetail",
               "Get-ECSContainerInstanceDetail",
               "Get-ECSServiceDeploymentDetail",
               "Get-ECSServiceRevision",
               "Get-ECSService",
               "Get-ECSTaskDefinitionDetail",
               "Get-ECSTaskDetail",
               "Get-ECSTaskSet",
               "Invoke-ECSCommand",
               "Get-ECSTaskProtection",
               "Get-ECSAccountSetting",
               "Get-ECSAttributeList",
               "Get-ECSClusterList",
               "Get-ECSContainerInstanceList",
               "Get-ECSServiceDeploymentList",
               "Get-ECSClusterService",
               "Get-ECSServicesByNamespace",
               "Get-ECSTagsForResource",
               "Get-ECSTaskDefinitionFamilyList",
               "Get-ECSTaskDefinitionList",
               "Get-ECSTaskList",
               "Write-ECSAccountSetting",
               "Write-ECSAccountSettingDefault",
               "Write-ECSAttribute",
               "Write-ECSClusterCapacityProvider",
               "Register-ECSTaskDefinition",
               "New-ECSTask",
               "Start-ECSTask",
               "Stop-ECSTask",
               "Submit-ECSAttachmentStateChange",
               "Add-ECSResourceTag",
               "Remove-ECSResourceTag",
               "Update-ECSCapacityProvider",
               "Update-ECSCluster",
               "Update-ECSClusterSetting",
               "Update-ECSContainerAgent",
               "Update-ECSContainerInstancesState",
               "Update-ECSService",
               "Update-ECSServicePrimaryTaskSet",
               "Update-ECSTaskProtection",
               "Update-ECSTaskSet")
}

_awsArgumentCompleterRegistration $ECS_SelectCompleters $ECS_SelectMap
# Argument completions for service Amazon Elastic Container Service for Kubernetes


$EKS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.EKS.AccessScopeType
        "Add-EKSAccessPolicy/AccessScope_Type"
        {
            $v = "cluster","namespace"
            break
        }

        # Amazon.EKS.AMITypes
        "New-EKSNodegroup/AmiType"
        {
            $v = "AL2023_ARM_64_STANDARD","AL2023_x86_64_NEURON","AL2023_x86_64_NVIDIA","AL2023_x86_64_STANDARD","AL2_ARM_64","AL2_x86_64","AL2_x86_64_GPU","BOTTLEROCKET_ARM_64","BOTTLEROCKET_ARM_64_NVIDIA","BOTTLEROCKET_x86_64","BOTTLEROCKET_x86_64_NVIDIA","CUSTOM","WINDOWS_CORE_2019_x86_64","WINDOWS_CORE_2022_x86_64","WINDOWS_FULL_2019_x86_64","WINDOWS_FULL_2022_x86_64"
            break
        }

        # Amazon.EKS.AuthenticationMode
        {
            ($_ -eq "New-EKSCluster/AccessConfig_AuthenticationMode") -Or
            ($_ -eq "Update-EKSClusterConfig/AccessConfig_AuthenticationMode")
        }
        {
            $v = "API","API_AND_CONFIG_MAP","CONFIG_MAP"
            break
        }

        # Amazon.EKS.CapacityTypes
        "New-EKSNodegroup/CapacityType"
        {
            $v = "CAPACITY_BLOCK","ON_DEMAND","SPOT"
            break
        }

        # Amazon.EKS.ConnectorConfigProvider
        "Register-EKSCluster/ConnectorConfig_Provider"
        {
            $v = "AKS","ANTHOS","EC2","EKS_ANYWHERE","GKE","OPENSHIFT","OTHER","RANCHER","TANZU"
            break
        }

        # Amazon.EKS.EksAnywhereSubscriptionLicenseType
        "New-EKSEksAnywhereSubscription/LicenseType"
        {
            $v = "Cluster"
            break
        }

        # Amazon.EKS.EksAnywhereSubscriptionTermUnit
        "New-EKSEksAnywhereSubscription/Term_Unit"
        {
            $v = "MONTHS"
            break
        }

        # Amazon.EKS.IpFamily
        "New-EKSCluster/KubernetesNetworkConfig_IpFamily"
        {
            $v = "ipv4","ipv6"
            break
        }

        # Amazon.EKS.ResolveConflicts
        {
            ($_ -eq "New-EKSAddon/ResolveConflict") -Or
            ($_ -eq "Update-EKSAddon/ResolveConflict")
        }
        {
            $v = "NONE","OVERWRITE","PRESERVE"
            break
        }

        # Amazon.EKS.SupportType
        {
            ($_ -eq "New-EKSCluster/UpgradePolicy_SupportType") -Or
            ($_ -eq "Update-EKSClusterConfig/UpgradePolicy_SupportType")
        }
        {
            $v = "EXTENDED","STANDARD"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EKS_map = @{
    "AccessConfig_AuthenticationMode"=@("New-EKSCluster","Update-EKSClusterConfig")
    "AccessScope_Type"=@("Add-EKSAccessPolicy")
    "AmiType"=@("New-EKSNodegroup")
    "CapacityType"=@("New-EKSNodegroup")
    "ConnectorConfig_Provider"=@("Register-EKSCluster")
    "KubernetesNetworkConfig_IpFamily"=@("New-EKSCluster")
    "LicenseType"=@("New-EKSEksAnywhereSubscription")
    "ResolveConflict"=@("New-EKSAddon","Update-EKSAddon")
    "Term_Unit"=@("New-EKSEksAnywhereSubscription")
    "UpgradePolicy_SupportType"=@("New-EKSCluster","Update-EKSClusterConfig")
}

_awsArgumentCompleterRegistration $EKS_Completers $EKS_map

$EKS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EKS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EKS_SelectMap = @{
    "Select"=@("Add-EKSAccessPolicy",
               "Add-EKSEncryptionConfig",
               "Add-EKSIdentityProviderConfig",
               "New-EKSAccessEntry",
               "New-EKSAddon",
               "New-EKSCluster",
               "New-EKSEksAnywhereSubscription",
               "New-EKSFargateProfile",
               "New-EKSNodegroup",
               "New-EKSPodIdentityAssociation",
               "Remove-EKSAccessEntry",
               "Remove-EKSAddon",
               "Remove-EKSCluster",
               "Remove-EKSEksAnywhereSubscription",
               "Remove-EKSFargateProfile",
               "Remove-EKSNodegroup",
               "Remove-EKSPodIdentityAssociation",
               "Unregister-EKSCluster",
               "Get-EKSAccessEntry",
               "Get-EKSAddon",
               "Get-EKSAddonConfiguration",
               "Get-EKSAddonVersion",
               "Get-EKSCluster",
               "Get-EKSEksAnywhereSubscription",
               "Get-EKSFargateProfile",
               "Get-EKSIdentityProviderConfig",
               "Get-EKSInsight",
               "Get-EKSNodegroup",
               "Get-EKSPodIdentityAssociation",
               "Get-EKSUpdate",
               "Remove-EKSAccessPolicy",
               "Remove-EKSIdentityProviderConfig",
               "Get-EKSAccessEntryList",
               "Get-EKSAccessPolicyList",
               "Get-EKSAddonList",
               "Get-EKSAssociatedAccessPolicyList",
               "Get-EKSClusterList",
               "Get-EKSEksAnywhereSubscriptionList",
               "Get-EKSFargateProfileList",
               "Get-EKSIdentityProviderConfigList",
               "Get-EKSInsightList",
               "Get-EKSNodegroupList",
               "Get-EKSPodIdentityAssociationList",
               "Get-EKSResourceTag",
               "Get-EKSUpdateList",
               "Register-EKSCluster",
               "Add-EKSResourceTag",
               "Remove-EKSResourceTag",
               "Update-EKSAccessEntry",
               "Update-EKSAddon",
               "Update-EKSClusterConfig",
               "Update-EKSClusterVersion",
               "Update-EKSEksAnywhereSubscription",
               "Update-EKSNodegroupConfig",
               "Update-EKSNodegroupVersion",
               "Update-EKSPodIdentityAssociation")
}

_awsArgumentCompleterRegistration $EKS_SelectCompleters $EKS_SelectMap
# Argument completions for service Amazon EKS Auth


$EKSAU_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EKSAU.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EKSAU_SelectMap = @{
    "Select"=@("Use-EKSAURoleForPodIdentity")
}

_awsArgumentCompleterRegistration $EKSAU_SelectCompleters $EKSAU_SelectMap
# Argument completions for service Amazon ElastiCache


$EC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ElastiCache.AuthTokenUpdateStrategyType
        {
            ($_ -eq "Edit-ECCacheCluster/AuthTokenUpdateStrategy") -Or
            ($_ -eq "Edit-ECReplicationGroup/AuthTokenUpdateStrategy")
        }
        {
            $v = "DELETE","ROTATE","SET"
            break
        }

        # Amazon.ElastiCache.AZMode
        {
            ($_ -eq "Edit-ECCacheCluster/AZMode") -Or
            ($_ -eq "New-ECCacheCluster/AZMode")
        }
        {
            $v = "cross-az","single-az"
            break
        }

        # Amazon.ElastiCache.ClusterMode
        {
            ($_ -eq "Edit-ECReplicationGroup/ClusterMode") -Or
            ($_ -eq "New-ECReplicationGroup/ClusterMode")
        }
        {
            $v = "compatible","disabled","enabled"
            break
        }

        # Amazon.ElastiCache.DataStorageUnit
        {
            ($_ -eq "Edit-ECServerlessCache/DataStorage_Unit") -Or
            ($_ -eq "New-ECServerlessCache/DataStorage_Unit")
        }
        {
            $v = "GB"
            break
        }

        # Amazon.ElastiCache.InputAuthenticationType
        {
            ($_ -eq "Edit-ECUser/AuthenticationMode_Type") -Or
            ($_ -eq "New-ECUser/AuthenticationMode_Type")
        }
        {
            $v = "iam","no-password-required","password"
            break
        }

        # Amazon.ElastiCache.IpDiscovery
        {
            ($_ -eq "Edit-ECCacheCluster/IpDiscovery") -Or
            ($_ -eq "Edit-ECReplicationGroup/IpDiscovery") -Or
            ($_ -eq "New-ECCacheCluster/IpDiscovery") -Or
            ($_ -eq "New-ECReplicationGroup/IpDiscovery")
        }
        {
            $v = "ipv4","ipv6"
            break
        }

        # Amazon.ElastiCache.NetworkType
        {
            ($_ -eq "New-ECCacheCluster/NetworkType") -Or
            ($_ -eq "New-ECReplicationGroup/NetworkType")
        }
        {
            $v = "dual_stack","ipv4","ipv6"
            break
        }

        # Amazon.ElastiCache.OutpostMode
        "New-ECCacheCluster/OutpostMode"
        {
            $v = "cross-outpost","single-outpost"
            break
        }

        # Amazon.ElastiCache.SourceType
        "Get-ECEvent/SourceType"
        {
            $v = "cache-cluster","cache-parameter-group","cache-security-group","cache-subnet-group","replication-group","serverless-cache","serverless-cache-snapshot","user","user-group"
            break
        }

        # Amazon.ElastiCache.TransitEncryptionMode
        {
            ($_ -eq "Edit-ECReplicationGroup/TransitEncryptionMode") -Or
            ($_ -eq "New-ECReplicationGroup/TransitEncryptionMode")
        }
        {
            $v = "preferred","required"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EC_map = @{
    "AuthenticationMode_Type"=@("Edit-ECUser","New-ECUser")
    "AuthTokenUpdateStrategy"=@("Edit-ECCacheCluster","Edit-ECReplicationGroup")
    "AZMode"=@("Edit-ECCacheCluster","New-ECCacheCluster")
    "ClusterMode"=@("Edit-ECReplicationGroup","New-ECReplicationGroup")
    "DataStorage_Unit"=@("Edit-ECServerlessCache","New-ECServerlessCache")
    "IpDiscovery"=@("Edit-ECCacheCluster","Edit-ECReplicationGroup","New-ECCacheCluster","New-ECReplicationGroup")
    "NetworkType"=@("New-ECCacheCluster","New-ECReplicationGroup")
    "OutpostMode"=@("New-ECCacheCluster")
    "SourceType"=@("Get-ECEvent")
    "TransitEncryptionMode"=@("Edit-ECReplicationGroup","New-ECReplicationGroup")
}

_awsArgumentCompleterRegistration $EC_Completers $EC_map

$EC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EC_SelectMap = @{
    "Select"=@("Add-ECTag",
               "Approve-ECCacheSecurityGroupIngress",
               "Start-ECUpdateActionBatch",
               "Stop-ECUpdateActionBatch",
               "Complete-ECMigration",
               "Copy-ECServerlessCacheSnapshot",
               "Copy-ECSnapshot",
               "New-ECCacheCluster",
               "New-ECCacheParameterGroup",
               "New-ECCacheSecurityGroup",
               "New-ECCacheSubnetGroup",
               "New-ECGlobalReplicationGroup",
               "New-ECReplicationGroup",
               "New-ECServerlessCache",
               "New-ECServerlessCacheSnapshot",
               "New-ECSnapshot",
               "New-ECUser",
               "New-ECUserGroup",
               "Request-ECNodeGroupDecreaseInGlobalReplicationGroup",
               "Request-ECReplicaCountDecrease",
               "Remove-ECCacheCluster",
               "Remove-ECCacheParameterGroup",
               "Remove-ECCacheSecurityGroup",
               "Remove-ECCacheSubnetGroup",
               "Remove-ECGlobalReplicationGroup",
               "Remove-ECReplicationGroup",
               "Remove-ECServerlessCache",
               "Remove-ECServerlessCacheSnapshot",
               "Remove-ECSnapshot",
               "Remove-ECUser",
               "Remove-ECUserGroup",
               "Get-ECCacheCluster",
               "Get-ECCacheEngineVersion",
               "Get-ECCacheParameterGroup",
               "Get-ECCacheParameter",
               "Get-ECCacheSecurityGroup",
               "Get-ECCacheSubnetGroup",
               "Get-ECEngineDefaultParameter",
               "Get-ECEvent",
               "Get-ECGlobalReplicationGroup",
               "Get-ECReplicationGroup",
               "Get-ECReservedCacheNode",
               "Get-ECReservedCacheNodesOffering",
               "Get-ECServerlessCache",
               "Get-ECServerlessCacheSnapshot",
               "Get-ECServiceUpdate",
               "Get-ECSnapshot",
               "Get-ECUpdateAction",
               "Get-ECUserGroup",
               "Get-ECUser",
               "Remove-ECReplicationGroupFromGlobalReplicationGroup",
               "Export-ECServerlessCacheSnapshot",
               "Request-ECGlobalReplicationGroupFailover",
               "Request-ECNodeGroupIncreaseInGlobalReplicationGroup",
               "Request-ECReplicaCountIncrease",
               "Get-ECAllowedNodeTypeModification",
               "Get-ECTag",
               "Edit-ECCacheCluster",
               "Edit-ECCacheParameterGroup",
               "Edit-ECCacheSubnetGroup",
               "Edit-ECGlobalReplicationGroup",
               "Edit-ECReplicationGroup",
               "Edit-ECReplicationGroupShardConfiguration",
               "Edit-ECServerlessCache",
               "Edit-ECUser",
               "Edit-ECUserGroup",
               "Request-ECReservedCacheNodesOffering",
               "Request-ECSlotRebalanceInGlobalReplicationGroup",
               "Restart-ECCacheCluster",
               "Remove-ECTag",
               "Reset-ECCacheParameterGroup",
               "Revoke-ECCacheSecurityGroupIngress",
               "Start-ECMigration",
               "Test-ECFailover",
               "Test-ECMigration")
}

_awsArgumentCompleterRegistration $EC_SelectCompleters $EC_SelectMap
# Argument completions for service AWS Elastic Beanstalk


$EB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ElasticBeanstalk.ActionStatus
        "Get-EBEnvironmentManagedAction/Status"
        {
            $v = "Pending","Running","Scheduled","Unknown"
            break
        }

        # Amazon.ElasticBeanstalk.ComputeType
        "New-EBApplicationVersion/BuildConfiguration_ComputeType"
        {
            $v = "BUILD_GENERAL1_LARGE","BUILD_GENERAL1_MEDIUM","BUILD_GENERAL1_SMALL"
            break
        }

        # Amazon.ElasticBeanstalk.EnvironmentInfoType
        {
            ($_ -eq "Get-EBEnvironmentInfo/InfoType") -Or
            ($_ -eq "Request-EBEnvironmentInfo/InfoType")
        }
        {
            $v = "bundle","tail"
            break
        }

        # Amazon.ElasticBeanstalk.EventSeverity
        "Get-EBEvent/Severity"
        {
            $v = "DEBUG","ERROR","FATAL","INFO","TRACE","WARN"
            break
        }

        # Amazon.ElasticBeanstalk.SourceRepository
        "New-EBApplicationVersion/SourceBuildInformation_SourceRepository"
        {
            $v = "CodeCommit","S3"
            break
        }

        # Amazon.ElasticBeanstalk.SourceType
        "New-EBApplicationVersion/SourceBuildInformation_SourceType"
        {
            $v = "Git","Zip"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EB_map = @{
    "BuildConfiguration_ComputeType"=@("New-EBApplicationVersion")
    "InfoType"=@("Get-EBEnvironmentInfo","Request-EBEnvironmentInfo")
    "Severity"=@("Get-EBEvent")
    "SourceBuildInformation_SourceRepository"=@("New-EBApplicationVersion")
    "SourceBuildInformation_SourceType"=@("New-EBApplicationVersion")
    "Status"=@("Get-EBEnvironmentManagedAction")
}

_awsArgumentCompleterRegistration $EB_Completers $EB_map

$EB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EB_SelectMap = @{
    "Select"=@("Stop-EBEnvironmentUpdate",
               "Submit-EBEnvironmentManagedAction",
               "Register-EBEnvironmentOperationsRole",
               "Get-EBDNSAvailability",
               "Group-EBEnvironment",
               "New-EBApplication",
               "New-EBApplicationVersion",
               "New-EBConfigurationTemplate",
               "New-EBEnvironment",
               "New-EBPlatformVersion",
               "New-EBStorageLocation",
               "Remove-EBApplication",
               "Remove-EBApplicationVersion",
               "Remove-EBConfigurationTemplate",
               "Remove-EBEnvironmentConfiguration",
               "Remove-EBPlatformVersion",
               "Get-EBAccountAttribute",
               "Get-EBApplication",
               "Get-EBApplicationVersion",
               "Get-EBConfigurationOption",
               "Get-EBConfigurationSetting",
               "Get-EBEnvironmentHealth",
               "Get-EBEnvironmentManagedActionHistory",
               "Get-EBEnvironmentManagedAction",
               "Get-EBEnvironmentResource",
               "Get-EBEnvironment",
               "Get-EBEvent",
               "Get-EBInstanceHealth",
               "Get-EBPlatformVersionDetail",
               "Unregister-EBEnvironmentOperationsRole",
               "Get-EBAvailableSolutionStackList",
               "Get-EBPlatformBranch",
               "Get-EBPlatformVersion",
               "Get-EBResourceTag",
               "Start-EBEnvironmentRebuild",
               "Request-EBEnvironmentInfo",
               "Restart-EBAppServer",
               "Get-EBEnvironmentInfo",
               "Set-EBEnvironmentCNAME",
               "Stop-EBEnvironment",
               "Update-EBApplication",
               "Update-EBApplicationResourceLifecycle",
               "Update-EBApplicationVersion",
               "Update-EBConfigurationTemplate",
               "Update-EBEnvironment",
               "Update-EBResourceTag",
               "Test-EBConfigurationSetting")
}

_awsArgumentCompleterRegistration $EB_SelectCompleters $EB_SelectMap
# Argument completions for service Amazon Elastic File System


$EFS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ElasticFileSystem.PerformanceMode
        "New-EFSFileSystem/PerformanceMode"
        {
            $v = "generalPurpose","maxIO"
            break
        }

        # Amazon.ElasticFileSystem.ReplicationOverwriteProtection
        "Update-EFSFileSystemProtection/ReplicationOverwriteProtection"
        {
            $v = "DISABLED","ENABLED","REPLICATING"
            break
        }

        # Amazon.ElasticFileSystem.ResourceIdType
        "Write-EFSAccountPreference/ResourceIdType"
        {
            $v = "LONG_ID","SHORT_ID"
            break
        }

        # Amazon.ElasticFileSystem.Status
        "Write-EFSBackupPolicy/BackupPolicy_Status"
        {
            $v = "DISABLED","DISABLING","ENABLED","ENABLING"
            break
        }

        # Amazon.ElasticFileSystem.ThroughputMode
        {
            ($_ -eq "New-EFSFileSystem/ThroughputMode") -Or
            ($_ -eq "Update-EFSFileSystem/ThroughputMode")
        }
        {
            $v = "bursting","elastic","provisioned"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EFS_map = @{
    "BackupPolicy_Status"=@("Write-EFSBackupPolicy")
    "PerformanceMode"=@("New-EFSFileSystem")
    "ReplicationOverwriteProtection"=@("Update-EFSFileSystemProtection")
    "ResourceIdType"=@("Write-EFSAccountPreference")
    "ThroughputMode"=@("New-EFSFileSystem","Update-EFSFileSystem")
}

_awsArgumentCompleterRegistration $EFS_Completers $EFS_map

$EFS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EFS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EFS_SelectMap = @{
    "Select"=@("New-EFSAccessPoint",
               "New-EFSFileSystem",
               "New-EFSMountTarget",
               "New-EFSReplicationConfiguration",
               "New-EFSTag",
               "Remove-EFSAccessPoint",
               "Remove-EFSFileSystem",
               "Remove-EFSFileSystemPolicy",
               "Remove-EFSMountTarget",
               "Remove-EFSReplicationConfiguration",
               "Remove-EFSTag",
               "Get-EFSAccessPoint",
               "Get-EFSAccountPreference",
               "Get-EFSBackupPolicy",
               "Get-EFSFileSystemPolicy",
               "Get-EFSFileSystem",
               "Get-EFSLifecycleConfiguration",
               "Get-EFSMountTarget",
               "Get-EFSMountTargetSecurityGroup",
               "Get-EFSReplicationConfiguration",
               "Get-EFSTag",
               "Get-EFSResourceTag",
               "Edit-EFSMountTargetSecurityGroup",
               "Write-EFSAccountPreference",
               "Write-EFSBackupPolicy",
               "Write-EFSFileSystemPolicy",
               "Write-EFSLifecycleConfiguration",
               "Add-EFSResourceTag",
               "Remove-EFSResourceTag",
               "Update-EFSFileSystem",
               "Update-EFSFileSystemProtection")
}

_awsArgumentCompleterRegistration $EFS_SelectCompleters $EFS_SelectMap
# Argument completions for service Amazon Elastic Inference


$EI_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ElasticInference.LocationType
        "Get-EIAcceleratorOffering/LocationType"
        {
            $v = "availability-zone","availability-zone-id","region"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EI_map = @{
    "LocationType"=@("Get-EIAcceleratorOffering")
}

_awsArgumentCompleterRegistration $EI_Completers $EI_map

$EI_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EI.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EI_SelectMap = @{
    "Select"=@("Get-EIAcceleratorOffering",
               "Get-EIAccelerator",
               "Get-EIAcceleratorType",
               "Get-EIResourceTag",
               "Add-EIResourceTag",
               "Remove-EIResourceTag")
}

_awsArgumentCompleterRegistration $EI_SelectCompleters $EI_SelectMap
# Argument completions for service Elastic Load Balancing


$ELB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ELB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ELB_SelectMap = @{
    "Select"=@("Add-ELBResourceTag",
               "Join-ELBSecurityGroupToLoadBalancer",
               "Add-ELBLoadBalancerToSubnet",
               "Set-ELBHealthCheck",
               "New-ELBAppCookieStickinessPolicy",
               "New-ELBLBCookieStickinessPolicy",
               "New-ELBLoadBalancer",
               "New-ELBLoadBalancerListener",
               "New-ELBLoadBalancerPolicy",
               "Remove-ELBLoadBalancer",
               "Remove-ELBLoadBalancerListener",
               "Remove-ELBLoadBalancerPolicy",
               "Remove-ELBInstanceFromLoadBalancer",
               "Get-ELBAccountLimit",
               "Get-ELBInstanceHealth",
               "Get-ELBLoadBalancerAttribute",
               "Get-ELBLoadBalancerPolicy",
               "Get-ELBLoadBalancerPolicyType",
               "Get-ELBLoadBalancer",
               "Get-ELBResourceTag",
               "Dismount-ELBLoadBalancerFromSubnet",
               "Disable-ELBAvailabilityZoneForLoadBalancer",
               "Enable-ELBAvailabilityZoneForLoadBalancer",
               "Edit-ELBLoadBalancerAttribute",
               "Register-ELBInstanceWithLoadBalancer",
               "Remove-ELBResourceTag",
               "Set-ELBLoadBalancerListenerSSLCertificate",
               "Set-ELBLoadBalancerPolicyForBackendServer",
               "Set-ELBLoadBalancerPolicyOfListener")
}

_awsArgumentCompleterRegistration $ELB_SelectCompleters $ELB_SelectMap
# Argument completions for service Elastic Load Balancing V2


$ELB2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ElasticLoadBalancingV2.EnablePrefixForIpv6SourceNatEnum
        {
            ($_ -eq "New-ELB2LoadBalancer/EnablePrefixForIpv6SourceNat") -Or
            ($_ -eq "Set-ELB2Subnet/EnablePrefixForIpv6SourceNat")
        }
        {
            $v = "off","on"
            break
        }

        # Amazon.ElasticLoadBalancingV2.EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum
        "Set-ELB2SecurityGroup/EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic"
        {
            $v = "off","on"
            break
        }

        # Amazon.ElasticLoadBalancingV2.IpAddressType
        {
            ($_ -eq "New-ELB2LoadBalancer/IpAddressType") -Or
            ($_ -eq "Set-ELB2IpAddressType/IpAddressType") -Or
            ($_ -eq "Set-ELB2Subnet/IpAddressType")
        }
        {
            $v = "dualstack","dualstack-without-public-ipv4","ipv4"
            break
        }

        # Amazon.ElasticLoadBalancingV2.LoadBalancerSchemeEnum
        "New-ELB2LoadBalancer/Scheme"
        {
            $v = "internal","internet-facing"
            break
        }

        # Amazon.ElasticLoadBalancingV2.LoadBalancerTypeEnum
        {
            ($_ -eq "Get-ELB2SSLPolicy/LoadBalancerType") -Or
            ($_ -eq "New-ELB2LoadBalancer/Type")
        }
        {
            $v = "application","gateway","network"
            break
        }

        # Amazon.ElasticLoadBalancingV2.ProtocolEnum
        {
            ($_ -eq "Edit-ELB2TargetGroup/HealthCheckProtocol") -Or
            ($_ -eq "New-ELB2TargetGroup/HealthCheckProtocol") -Or
            ($_ -eq "Edit-ELB2Listener/Protocol") -Or
            ($_ -eq "New-ELB2Listener/Protocol") -Or
            ($_ -eq "New-ELB2TargetGroup/Protocol")
        }
        {
            $v = "GENEVE","HTTP","HTTPS","TCP","TCP_UDP","TLS","UDP"
            break
        }

        # Amazon.ElasticLoadBalancingV2.TargetGroupIpAddressTypeEnum
        "New-ELB2TargetGroup/IpAddressType"
        {
            $v = "ipv4","ipv6"
            break
        }

        # Amazon.ElasticLoadBalancingV2.TargetTypeEnum
        "New-ELB2TargetGroup/TargetType"
        {
            $v = "alb","instance","ip","lambda"
            break
        }

        # Amazon.ElasticLoadBalancingV2.TrustStoreAssociationStatusEnum
        {
            ($_ -eq "Edit-ELB2Listener/MutualAuthentication_TrustStoreAssociationStatus") -Or
            ($_ -eq "New-ELB2Listener/MutualAuthentication_TrustStoreAssociationStatus")
        }
        {
            $v = "active","removed"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ELB2_map = @{
    "EnablePrefixForIpv6SourceNat"=@("New-ELB2LoadBalancer","Set-ELB2Subnet")
    "EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic"=@("Set-ELB2SecurityGroup")
    "HealthCheckProtocol"=@("Edit-ELB2TargetGroup","New-ELB2TargetGroup")
    "IpAddressType"=@("New-ELB2LoadBalancer","New-ELB2TargetGroup","Set-ELB2IpAddressType","Set-ELB2Subnet")
    "LoadBalancerType"=@("Get-ELB2SSLPolicy")
    "MutualAuthentication_TrustStoreAssociationStatus"=@("Edit-ELB2Listener","New-ELB2Listener")
    "Protocol"=@("Edit-ELB2Listener","New-ELB2Listener","New-ELB2TargetGroup")
    "Scheme"=@("New-ELB2LoadBalancer")
    "TargetType"=@("New-ELB2TargetGroup")
    "Type"=@("New-ELB2LoadBalancer")
}

_awsArgumentCompleterRegistration $ELB2_Completers $ELB2_map

$ELB2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ELB2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ELB2_SelectMap = @{
    "Select"=@("Add-ELB2ListenerCertificate",
               "Add-ELB2Tag",
               "Add-ELB2TrustStoreRevocation",
               "New-ELB2Listener",
               "New-ELB2LoadBalancer",
               "New-ELB2Rule",
               "New-ELB2TargetGroup",
               "New-ELB2TrustStore",
               "Remove-ELB2Listener",
               "Remove-ELB2LoadBalancer",
               "Remove-ELB2Rule",
               "Remove-ELB2SharedTrustStoreAssociation",
               "Remove-ELB2TargetGroup",
               "Remove-ELB2TrustStore",
               "Unregister-ELB2Target",
               "Get-ELB2AccountLimit",
               "Get-ELB2ListenerAttribute",
               "Get-ELB2ListenerCertificate",
               "Get-ELB2Listener",
               "Get-ELB2LoadBalancerAttribute",
               "Get-ELB2LoadBalancer",
               "Get-ELB2Rule",
               "Get-ELB2SSLPolicy",
               "Get-ELB2Tag",
               "Get-ELB2TargetGroupAttribute",
               "Get-ELB2TargetGroup",
               "Get-ELB2TargetHealth",
               "Get-ELB2TrustStoreAssociation",
               "Get-ELB2TrustStoreRevocation",
               "Get-ELB2TrustStore",
               "Get-ELB2ResourcePolicy",
               "Get-ELB2TrustStoreCaCertificatesBundle",
               "Get-ELB2TrustStoreRevocationContent",
               "Edit-ELB2Listener",
               "Edit-ELB2ListenerAttribute",
               "Edit-ELB2LoadBalancerAttribute",
               "Edit-ELB2Rule",
               "Edit-ELB2TargetGroup",
               "Edit-ELB2TargetGroupAttribute",
               "Edit-ELB2TrustStore",
               "Register-ELB2Target",
               "Remove-ELB2ListenerCertificate",
               "Remove-ELB2Tag",
               "Remove-ELB2TrustStoreRevocation",
               "Set-ELB2IpAddressType",
               "Set-ELB2RulePriority",
               "Set-ELB2SecurityGroup",
               "Set-ELB2Subnet")
}

_awsArgumentCompleterRegistration $ELB2_SelectCompleters $ELB2_SelectMap
# Argument completions for service Amazon Elastic MapReduce


$EMR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ElasticMapReduce.AuthMode
        "New-EMRStudio/AuthMode"
        {
            $v = "IAM","SSO"
            break
        }

        # Amazon.ElasticMapReduce.ComputeLimitsUnitType
        {
            ($_ -eq "Start-EMRJobFlow/ComputeLimits_UnitType") -Or
            ($_ -eq "Write-EMRManagedScalingPolicy/ComputeLimits_UnitType")
        }
        {
            $v = "InstanceFleetUnits","Instances","VCPU"
            break
        }

        # Amazon.ElasticMapReduce.ExecutionEngineType
        "Start-EMRNotebookExecution/ExecutionEngine_Type"
        {
            $v = "EMR"
            break
        }

        # Amazon.ElasticMapReduce.IdcUserAssignment
        "New-EMRStudio/IdcUserAssignment"
        {
            $v = "OPTIONAL","REQUIRED"
            break
        }

        # Amazon.ElasticMapReduce.IdentityType
        {
            ($_ -eq "Get-EMRStudioSessionMapping/IdentityType") -Or
            ($_ -eq "Get-EMRStudioSessionMappingList/IdentityType") -Or
            ($_ -eq "New-EMRStudioSessionMapping/IdentityType") -Or
            ($_ -eq "Remove-EMRStudioSessionMapping/IdentityType") -Or
            ($_ -eq "Update-EMRStudioSessionMapping/IdentityType")
        }
        {
            $v = "GROUP","USER"
            break
        }

        # Amazon.ElasticMapReduce.InstanceFleetType
        {
            ($_ -eq "Add-EMRInstanceFleet/InstanceFleet_InstanceFleetType") -Or
            ($_ -eq "Get-EMRInstanceList/InstanceFleetType")
        }
        {
            $v = "CORE","MASTER","TASK"
            break
        }

        # Amazon.ElasticMapReduce.NotebookExecutionStatus
        "Get-EMRNotebookExecutionList/Status"
        {
            $v = "FAILED","FAILING","FINISHED","FINISHING","RUNNING","STARTING","START_PENDING","STOPPED","STOPPING","STOP_PENDING"
            break
        }

        # Amazon.ElasticMapReduce.OnDemandCapacityReservationPreference
        {
            ($_ -eq "Add-EMRInstanceFleet/CapacityReservationOptions_CapacityReservationPreference") -Or
            ($_ -eq "Edit-EMRInstanceFleet/CapacityReservationOptions_CapacityReservationPreference") -Or
            ($_ -eq "Add-EMRInstanceFleet/InstanceFleet_ResizeSpecifications_OnDemandResizeSpecification_CapacityReservationOptions_CapacityReservationPreference")
        }
        {
            $v = "none","open"
            break
        }

        # Amazon.ElasticMapReduce.OnDemandCapacityReservationUsageStrategy
        {
            ($_ -eq "Add-EMRInstanceFleet/CapacityReservationOptions_UsageStrategy") -Or
            ($_ -eq "Edit-EMRInstanceFleet/CapacityReservationOptions_UsageStrategy") -Or
            ($_ -eq "Add-EMRInstanceFleet/InstanceFleet_ResizeSpecifications_OnDemandResizeSpecification_CapacityReservationOptions_UsageStrategy")
        }
        {
            $v = "use-capacity-reservations-first"
            break
        }

        # Amazon.ElasticMapReduce.OnDemandProvisioningAllocationStrategy
        {
            ($_ -eq "Add-EMRInstanceFleet/OnDemandResizeSpecification_AllocationStrategy") -Or
            ($_ -eq "Edit-EMRInstanceFleet/OnDemandResizeSpecification_AllocationStrategy") -Or
            ($_ -eq "Add-EMRInstanceFleet/OnDemandSpecification_AllocationStrategy")
        }
        {
            $v = "lowest-price","prioritized"
            break
        }

        # Amazon.ElasticMapReduce.OutputNotebookFormat
        "Start-EMRNotebookExecution/OutputNotebookFormat"
        {
            $v = "HTML"
            break
        }

        # Amazon.ElasticMapReduce.RepoUpgradeOnBoot
        "Start-EMRJobFlow/RepoUpgradeOnBoot"
        {
            $v = "NONE","SECURITY"
            break
        }

        # Amazon.ElasticMapReduce.ScaleDownBehavior
        "Start-EMRJobFlow/ScaleDownBehavior"
        {
            $v = "TERMINATE_AT_INSTANCE_HOUR","TERMINATE_AT_TASK_COMPLETION"
            break
        }

        # Amazon.ElasticMapReduce.SpotProvisioningAllocationStrategy
        {
            ($_ -eq "Add-EMRInstanceFleet/SpotResizeSpecification_AllocationStrategy") -Or
            ($_ -eq "Edit-EMRInstanceFleet/SpotResizeSpecification_AllocationStrategy") -Or
            ($_ -eq "Add-EMRInstanceFleet/SpotSpecification_AllocationStrategy")
        }
        {
            $v = "capacity-optimized","capacity-optimized-prioritized","diversified","lowest-price","price-capacity-optimized"
            break
        }

        # Amazon.ElasticMapReduce.SpotProvisioningTimeoutAction
        "Add-EMRInstanceFleet/SpotSpecification_TimeoutAction"
        {
            $v = "SWITCH_TO_ON_DEMAND","TERMINATE_CLUSTER"
            break
        }

        # Amazon.ElasticMapReduce.StepCancellationOption
        "Stop-EMRStep/StepCancellationOption"
        {
            $v = "SEND_INTERRUPT","TERMINATE_PROCESS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMR_map = @{
    "AuthMode"=@("New-EMRStudio")
    "CapacityReservationOptions_CapacityReservationPreference"=@("Add-EMRInstanceFleet","Edit-EMRInstanceFleet")
    "CapacityReservationOptions_UsageStrategy"=@("Add-EMRInstanceFleet","Edit-EMRInstanceFleet")
    "ComputeLimits_UnitType"=@("Start-EMRJobFlow","Write-EMRManagedScalingPolicy")
    "ExecutionEngine_Type"=@("Start-EMRNotebookExecution")
    "IdcUserAssignment"=@("New-EMRStudio")
    "IdentityType"=@("Get-EMRStudioSessionMapping","Get-EMRStudioSessionMappingList","New-EMRStudioSessionMapping","Remove-EMRStudioSessionMapping","Update-EMRStudioSessionMapping")
    "InstanceFleet_InstanceFleetType"=@("Add-EMRInstanceFleet")
    "InstanceFleet_ResizeSpecifications_OnDemandResizeSpecification_CapacityReservationOptions_CapacityReservationPreference"=@("Add-EMRInstanceFleet")
    "InstanceFleet_ResizeSpecifications_OnDemandResizeSpecification_CapacityReservationOptions_UsageStrategy"=@("Add-EMRInstanceFleet")
    "InstanceFleetType"=@("Get-EMRInstanceList")
    "OnDemandResizeSpecification_AllocationStrategy"=@("Add-EMRInstanceFleet","Edit-EMRInstanceFleet")
    "OnDemandSpecification_AllocationStrategy"=@("Add-EMRInstanceFleet")
    "OutputNotebookFormat"=@("Start-EMRNotebookExecution")
    "RepoUpgradeOnBoot"=@("Start-EMRJobFlow")
    "ScaleDownBehavior"=@("Start-EMRJobFlow")
    "SpotResizeSpecification_AllocationStrategy"=@("Add-EMRInstanceFleet","Edit-EMRInstanceFleet")
    "SpotSpecification_AllocationStrategy"=@("Add-EMRInstanceFleet")
    "SpotSpecification_TimeoutAction"=@("Add-EMRInstanceFleet")
    "Status"=@("Get-EMRNotebookExecutionList")
    "StepCancellationOption"=@("Stop-EMRStep")
}

_awsArgumentCompleterRegistration $EMR_Completers $EMR_map

$EMR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EMR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMR_SelectMap = @{
    "Select"=@("Add-EMRInstanceFleet",
               "Add-EMRInstanceGroup",
               "Add-EMRJobFlowStep",
               "Add-EMRResourceTag",
               "Stop-EMRStep",
               "New-EMRSecurityConfiguration",
               "New-EMRStudio",
               "New-EMRStudioSessionMapping",
               "Remove-EMRSecurityConfiguration",
               "Remove-EMRStudio",
               "Remove-EMRStudioSessionMapping",
               "Get-EMRCluster",
               "Get-EMRJobFlow",
               "Get-EMRNotebookExecution",
               "Get-EMRReleaseLabel",
               "Get-EMRSecurityConfiguration",
               "Get-EMRStep",
               "Get-EMRStudio",
               "Get-EMRAutoTerminationPolicy",
               "Get-EMRBlockPublicAccessConfiguration",
               "Get-EMRClusterSessionCredential",
               "Get-EMRManagedScalingPolicy",
               "Get-EMRStudioSessionMapping",
               "Get-EMRBootstrapActionList",
               "Get-EMRClusterList",
               "Get-EMRInstanceFleetList",
               "Get-EMRInstanceGroupList",
               "Get-EMRInstanceList",
               "Get-EMRNotebookExecutionList",
               "Find-EMRReleaseLabel",
               "Get-EMRSecurityConfigurationList",
               "Get-EMRStepList",
               "Get-EMRStudioList",
               "Get-EMRStudioSessionMappingList",
               "Get-EMRSupportedInstanceType",
               "Edit-EMRCluster",
               "Edit-EMRInstanceFleet",
               "Edit-EMRInstanceGroup",
               "Write-EMRAutoScalingPolicy",
               "Write-EMRAutoTerminationPolicy",
               "Write-EMRBlockPublicAccessConfiguration",
               "Write-EMRManagedScalingPolicy",
               "Remove-EMRAutoScalingPolicy",
               "Remove-EMRAutoTerminationPolicy",
               "Remove-EMRManagedScalingPolicy",
               "Remove-EMRResourceTag",
               "Start-EMRJobFlow",
               "Set-EMRKeepJobFlowAliveWhenNoStep",
               "Set-EMRTerminationProtection",
               "Set-EMRUnhealthyNodeReplacement",
               "Set-EMRVisibleToAllUser",
               "Start-EMRNotebookExecution",
               "Stop-EMRNotebookExecution",
               "Stop-EMRJobFlow",
               "Update-EMRStudio",
               "Update-EMRStudioSessionMapping")
}

_awsArgumentCompleterRegistration $EMR_SelectCompleters $EMR_SelectMap
# Argument completions for service Amazon Elastic Transcoder


$ETS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ETS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ETS_SelectMap = @{
    "Select"=@("Stop-ETSJob",
               "New-ETSJob",
               "New-ETSPipeline",
               "New-ETSPreset",
               "Remove-ETSPipeline",
               "Remove-ETSPreset",
               "Get-ETSJobsByPipeline",
               "Get-ETSJobsByStatus",
               "Get-ETSPipeline",
               "Get-ETSPreset",
               "Read-ETSJob",
               "Read-ETSPipeline",
               "Read-ETSPreset",
               "Test-ETSRole",
               "Update-ETSPipeline",
               "Update-ETSPipelineNotification",
               "Update-ETSPipelineStatus")
}

_awsArgumentCompleterRegistration $ETS_SelectCompleters $ETS_SelectMap
# Argument completions for service Amazon Simple Email Service (SES)


$SES_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SimpleEmail.BehaviorOnMXFailure
        "Set-SESIdentityMailFromDomain/BehaviorOnMXFailure"
        {
            $v = "RejectMessage","UseDefaultValue"
            break
        }

        # Amazon.SimpleEmail.IdentityType
        "Get-SESIdentity/IdentityType"
        {
            $v = "Domain","EmailAddress"
            break
        }

        # Amazon.SimpleEmail.NotificationType
        {
            ($_ -eq "Set-SESIdentityHeadersInNotificationsEnabled/NotificationType") -Or
            ($_ -eq "Set-SESIdentityNotificationTopic/NotificationType")
        }
        {
            $v = "Bounce","Complaint","Delivery"
            break
        }

        # Amazon.SimpleEmail.ReceiptFilterPolicy
        "New-SESReceiptFilter/IpFilter_Policy"
        {
            $v = "Allow","Block"
            break
        }

        # Amazon.SimpleEmail.TlsPolicy
        {
            ($_ -eq "Write-SESConfigurationSetDeliveryOption/DeliveryOptions_TlsPolicy") -Or
            ($_ -eq "New-SESReceiptRule/Rule_TlsPolicy") -Or
            ($_ -eq "Update-SESReceiptRule/Rule_TlsPolicy")
        }
        {
            $v = "Optional","Require"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SES_map = @{
    "BehaviorOnMXFailure"=@("Set-SESIdentityMailFromDomain")
    "DeliveryOptions_TlsPolicy"=@("Write-SESConfigurationSetDeliveryOption")
    "IdentityType"=@("Get-SESIdentity")
    "IpFilter_Policy"=@("New-SESReceiptFilter")
    "NotificationType"=@("Set-SESIdentityHeadersInNotificationsEnabled","Set-SESIdentityNotificationTopic")
    "Rule_TlsPolicy"=@("New-SESReceiptRule","Update-SESReceiptRule")
}

_awsArgumentCompleterRegistration $SES_Completers $SES_map

$SES_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SES.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SES_SelectMap = @{
    "Select"=@("Copy-SESReceiptRuleSet",
               "New-SESConfigurationSet",
               "New-SESConfigurationSetEventDestination",
               "New-SESConfigurationSetTrackingOption",
               "New-SESCustomVerificationEmailTemplate",
               "New-SESReceiptFilter",
               "New-SESReceiptRule",
               "New-SESReceiptRuleSet",
               "New-SESTemplate",
               "Remove-SESConfigurationSet",
               "Remove-SESConfigurationSetEventDestination",
               "Remove-SESConfigurationSetTrackingOption",
               "Remove-SESCustomVerificationEmailTemplate",
               "Remove-SESIdentity",
               "Remove-SESIdentityPolicy",
               "Remove-SESReceiptFilter",
               "Remove-SESReceiptRule",
               "Remove-SESReceiptRuleSet",
               "Remove-SESTemplate",
               "Remove-SESVerifiedEmailAddress",
               "Get-SESActiveReceiptRuleSet",
               "Get-SESConfigurationSet",
               "Get-SESReceiptRule",
               "Get-SESReceiptRuleSet",
               "Get-SESAccountSendingEnabled",
               "Get-SESCustomVerificationEmailTemplate",
               "Get-SESIdentityDkimAttribute",
               "Get-SESIdentityMailFromDomainAttribute",
               "Get-SESIdentityNotificationAttribute",
               "Get-SESIdentityPolicy",
               "Get-SESIdentityVerificationAttribute",
               "Get-SESSendQuota",
               "Get-SESSendStatistic",
               "Get-SESTemplate",
               "Get-SESConfigurationSetList",
               "Get-SESCustomVerificationEmailTemplateList",
               "Get-SESIdentity",
               "Get-SESIdentityPolicyList",
               "Get-SESReceiptFilterList",
               "Get-SESReceiptRuleSetList",
               "Get-SESTemplateList",
               "Get-SESVerifiedEmailAddress",
               "Write-SESConfigurationSetDeliveryOption",
               "Write-SESIdentityPolicy",
               "Set-SESReceiptRuleSetOrder",
               "Send-SESBounce",
               "Send-SESBulkTemplatedEmail",
               "Send-SESCustomVerificationEmail",
               "Send-SESEmail",
               "Send-SESRawEmail",
               "Send-SESTemplatedEmail",
               "Set-SESActiveReceiptRuleSet",
               "Set-SESIdentityDkimEnabled",
               "Set-SESIdentityFeedbackForwardingEnabled",
               "Set-SESIdentityHeadersInNotificationsEnabled",
               "Set-SESIdentityMailFromDomain",
               "Set-SESIdentityNotificationTopic",
               "Set-SESReceiptRulePosition",
               "Test-SESRenderTemplate",
               "Update-SESAccountSendingEnabled",
               "Update-SESConfigurationSetEventDestination",
               "Update-SESConfigurationSetReputationMetricsEnabled",
               "Update-SESConfigurationSetSendingEnabled",
               "Update-SESConfigurationSetTrackingOption",
               "Update-SESCustomVerificationEmailTemplate",
               "Update-SESReceiptRule",
               "Update-SESTemplate",
               "Confirm-SESDomainDkim",
               "Confirm-SESDomainIdentity",
               "Confirm-SESEmailAddress",
               "Confirm-SESEmailIdentity")
}

_awsArgumentCompleterRegistration $SES_SelectCompleters $SES_SelectMap
# Argument completions for service Amazon EMR Containers


$EMRC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.EMRContainers.CertificateProviderType
        "New-EMRCSecurityConfiguration/TlsCertificateConfiguration_CertificateProviderType"
        {
            $v = "PEM"
            break
        }

        # Amazon.EMRContainers.ContainerProviderType
        {
            ($_ -eq "New-EMRCVirtualCluster/ContainerProvider_Type") -Or
            ($_ -eq "Get-EMRCVirtualClusterList/ContainerProviderType")
        }
        {
            $v = "EKS"
            break
        }

        # Amazon.EMRContainers.PersistentAppUI
        {
            ($_ -eq "New-EMRCManagedEndpoint/MonitoringConfiguration_PersistentAppUI") -Or
            ($_ -eq "Start-EMRCJobRun/MonitoringConfiguration_PersistentAppUI")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMRC_map = @{
    "ContainerProvider_Type"=@("New-EMRCVirtualCluster")
    "ContainerProviderType"=@("Get-EMRCVirtualClusterList")
    "MonitoringConfiguration_PersistentAppUI"=@("New-EMRCManagedEndpoint","Start-EMRCJobRun")
    "TlsCertificateConfiguration_CertificateProviderType"=@("New-EMRCSecurityConfiguration")
}

_awsArgumentCompleterRegistration $EMRC_Completers $EMRC_map

$EMRC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EMRC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMRC_SelectMap = @{
    "Select"=@("Stop-EMRCJobRun",
               "New-EMRCJobTemplate",
               "New-EMRCManagedEndpoint",
               "New-EMRCSecurityConfiguration",
               "New-EMRCVirtualCluster",
               "Remove-EMRCJobTemplate",
               "Remove-EMRCManagedEndpoint",
               "Remove-EMRCVirtualCluster",
               "Get-EMRCJobRun",
               "Get-EMRCJobTemplate",
               "Get-EMRCManagedEndpoint",
               "Get-EMRCSecurityConfiguration",
               "Get-EMRCVirtualCluster",
               "Get-EMRCManagedEndpointSessionCredential",
               "Get-EMRCJobRunList",
               "Get-EMRCJobTemplateList",
               "Get-EMRCManagedEndpointList",
               "Get-EMRCSecurityConfigurationList",
               "Get-EMRCResourceTag",
               "Get-EMRCVirtualClusterList",
               "Start-EMRCJobRun",
               "Add-EMRCResourceTag",
               "Remove-EMRCResourceTag")
}

_awsArgumentCompleterRegistration $EMRC_SelectCompleters $EMRC_SelectMap
# Argument completions for service EMR Serverless


$EMRServerless_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.EMRServerless.Architecture
        {
            ($_ -eq "New-EMRServerlessApplication/Architecture") -Or
            ($_ -eq "Update-EMRServerlessApplication/Architecture")
        }
        {
            $v = "ARM64","X86_64"
            break
        }

        # Amazon.EMRServerless.JobRunMode
        {
            ($_ -eq "Get-EMRServerlessJobRunList/Mode") -Or
            ($_ -eq "Start-EMRServerlessJobRun/Mode")
        }
        {
            $v = "BATCH","STREAMING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMRServerless_map = @{
    "Architecture"=@("New-EMRServerlessApplication","Update-EMRServerlessApplication")
    "Mode"=@("Get-EMRServerlessJobRunList","Start-EMRServerlessJobRun")
}

_awsArgumentCompleterRegistration $EMRServerless_Completers $EMRServerless_map

$EMRServerless_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EMRServerless.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMRServerless_SelectMap = @{
    "Select"=@("Stop-EMRServerlessJobRun",
               "New-EMRServerlessApplication",
               "Remove-EMRServerlessApplication",
               "Get-EMRServerlessApplication",
               "Get-EMRServerlessDashboardForJobRun",
               "Get-EMRServerlessJobRun",
               "Get-EMRServerlessApplicationList",
               "Get-EMRServerlessJobRunAttemptList",
               "Get-EMRServerlessJobRunList",
               "Get-EMRServerlessResourceTagList",
               "Start-EMRServerlessApplication",
               "Start-EMRServerlessJobRun",
               "Stop-EMRServerlessApplication",
               "Add-EMRServerlessResourceTag",
               "Remove-EMRServerlessResourceTag",
               "Update-EMRServerlessApplication")
}

_awsArgumentCompleterRegistration $EMRServerless_SelectCompleters $EMRServerless_SelectMap
# Argument completions for service AWS Marketplace Entitlement Service


$MES_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MES.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MES_SelectMap = @{
    "Select"=@("Get-MESEntitlementList")
}

_awsArgumentCompleterRegistration $MES_SelectCompleters $MES_SelectMap
# Argument completions for service AWS EntityResolution


$ERES_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.EntityResolution.AttributeMatchingModel
        {
            ($_ -eq "New-ERESIdMappingWorkflow/RuleBasedProperties_AttributeMatchingModel") -Or
            ($_ -eq "New-ERESMatchingWorkflow/RuleBasedProperties_AttributeMatchingModel") -Or
            ($_ -eq "Update-ERESIdMappingWorkflow/RuleBasedProperties_AttributeMatchingModel") -Or
            ($_ -eq "Update-ERESMatchingWorkflow/RuleBasedProperties_AttributeMatchingModel")
        }
        {
            $v = "MANY_TO_MANY","ONE_TO_ONE"
            break
        }

        # Amazon.EntityResolution.IdMappingType
        {
            ($_ -eq "New-ERESIdMappingWorkflow/IdMappingTechniques_IdMappingType") -Or
            ($_ -eq "Update-ERESIdMappingWorkflow/IdMappingTechniques_IdMappingType")
        }
        {
            $v = "PROVIDER","RULE_BASED"
            break
        }

        # Amazon.EntityResolution.IdMappingWorkflowRuleDefinitionType
        {
            ($_ -eq "New-ERESIdMappingWorkflow/RuleBasedProperties_RuleDefinitionType") -Or
            ($_ -eq "Update-ERESIdMappingWorkflow/RuleBasedProperties_RuleDefinitionType")
        }
        {
            $v = "SOURCE","TARGET"
            break
        }

        # Amazon.EntityResolution.IdNamespaceType
        "New-ERESIdNamespace/Type"
        {
            $v = "SOURCE","TARGET"
            break
        }

        # Amazon.EntityResolution.IncrementalRunType
        {
            ($_ -eq "New-ERESMatchingWorkflow/IncrementalRunConfig_IncrementalRunType") -Or
            ($_ -eq "Update-ERESMatchingWorkflow/IncrementalRunConfig_IncrementalRunType")
        }
        {
            $v = "IMMEDIATE"
            break
        }

        # Amazon.EntityResolution.MatchPurpose
        {
            ($_ -eq "New-ERESMatchingWorkflow/RuleBasedProperties_MatchPurpose") -Or
            ($_ -eq "Update-ERESMatchingWorkflow/RuleBasedProperties_MatchPurpose")
        }
        {
            $v = "IDENTIFIER_GENERATION","INDEXING"
            break
        }

        # Amazon.EntityResolution.RecordMatchingModel
        {
            ($_ -eq "New-ERESIdMappingWorkflow/RuleBasedProperties_RecordMatchingModel") -Or
            ($_ -eq "Update-ERESIdMappingWorkflow/RuleBasedProperties_RecordMatchingModel")
        }
        {
            $v = "MANY_SOURCE_TO_ONE_TARGET","ONE_SOURCE_TO_ONE_TARGET"
            break
        }

        # Amazon.EntityResolution.ResolutionType
        {
            ($_ -eq "New-ERESMatchingWorkflow/ResolutionTechniques_ResolutionType") -Or
            ($_ -eq "Update-ERESMatchingWorkflow/ResolutionTechniques_ResolutionType")
        }
        {
            $v = "ML_MATCHING","PROVIDER","RULE_MATCHING"
            break
        }

        # Amazon.EntityResolution.StatementEffect
        "Add-ERESPolicyStatement/Effect"
        {
            $v = "Allow","Deny"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ERES_map = @{
    "Effect"=@("Add-ERESPolicyStatement")
    "IdMappingTechniques_IdMappingType"=@("New-ERESIdMappingWorkflow","Update-ERESIdMappingWorkflow")
    "IncrementalRunConfig_IncrementalRunType"=@("New-ERESMatchingWorkflow","Update-ERESMatchingWorkflow")
    "ResolutionTechniques_ResolutionType"=@("New-ERESMatchingWorkflow","Update-ERESMatchingWorkflow")
    "RuleBasedProperties_AttributeMatchingModel"=@("New-ERESIdMappingWorkflow","New-ERESMatchingWorkflow","Update-ERESIdMappingWorkflow","Update-ERESMatchingWorkflow")
    "RuleBasedProperties_MatchPurpose"=@("New-ERESMatchingWorkflow","Update-ERESMatchingWorkflow")
    "RuleBasedProperties_RecordMatchingModel"=@("New-ERESIdMappingWorkflow","Update-ERESIdMappingWorkflow")
    "RuleBasedProperties_RuleDefinitionType"=@("New-ERESIdMappingWorkflow","Update-ERESIdMappingWorkflow")
    "Type"=@("New-ERESIdNamespace")
}

_awsArgumentCompleterRegistration $ERES_Completers $ERES_map

$ERES_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ERES.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ERES_SelectMap = @{
    "Select"=@("Add-ERESPolicyStatement",
               "Remove-ERESDeleteUniqueId",
               "New-ERESIdMappingWorkflow",
               "New-ERESIdNamespace",
               "New-ERESMatchingWorkflow",
               "New-ERESSchemaMapping",
               "Remove-ERESIdMappingWorkflow",
               "Remove-ERESIdNamespace",
               "Remove-ERESMatchingWorkflow",
               "Remove-ERESPolicyStatement",
               "Remove-ERESSchemaMapping",
               "Get-ERESIdMappingJob",
               "Get-ERESIdMappingWorkflow",
               "Get-ERESIdNamespace",
               "Get-ERESMatchId",
               "Get-ERESMatchingJob",
               "Get-ERESMatchingWorkflow",
               "Get-ERESPolicy",
               "Get-ERESProviderService",
               "Get-ERESSchemaMapping",
               "Get-ERESIdMappingJobList",
               "Get-ERESIdMappingWorkflowList",
               "Get-ERESIdNamespaceList",
               "Get-ERESMatchingJobList",
               "Get-ERESMatchingWorkflowList",
               "Get-ERESProviderServiceList",
               "Get-ERESSchemaMappingList",
               "Get-ERESResourceTag",
               "Write-ERESPolicy",
               "Start-ERESIdMappingJob",
               "Start-ERESMatchingJob",
               "Add-ERESResourceTag",
               "Remove-ERESResourceTag",
               "Update-ERESIdMappingWorkflow",
               "Update-ERESIdNamespace",
               "Update-ERESMatchingWorkflow",
               "Update-ERESSchemaMapping")
}

_awsArgumentCompleterRegistration $ERES_SelectCompleters $ERES_SelectMap
# Argument completions for service Amazon Elasticsearch


$ES_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Elasticsearch.AutoTuneDesiredState
        {
            ($_ -eq "New-ESDomain/AutoTuneOptions_DesiredState") -Or
            ($_ -eq "Update-ESDomainConfig/AutoTuneOptions_DesiredState")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Elasticsearch.EngineType
        "Get-ESDomainNameList/EngineType"
        {
            $v = "Elasticsearch","OpenSearch"
            break
        }

        # Amazon.Elasticsearch.ESPartitionInstanceType
        {
            ($_ -eq "New-ESDomain/ElasticsearchClusterConfig_DedicatedMasterType") -Or
            ($_ -eq "Update-ESDomainConfig/ElasticsearchClusterConfig_DedicatedMasterType") -Or
            ($_ -eq "New-ESDomain/ElasticsearchClusterConfig_InstanceType") -Or
            ($_ -eq "Update-ESDomainConfig/ElasticsearchClusterConfig_InstanceType") -Or
            ($_ -eq "Get-ESInstanceTypeLimit/InstanceType")
        }
        {
            $v = "c4.2xlarge.elasticsearch","c4.4xlarge.elasticsearch","c4.8xlarge.elasticsearch","c4.large.elasticsearch","c4.xlarge.elasticsearch","c5.18xlarge.elasticsearch","c5.2xlarge.elasticsearch","c5.4xlarge.elasticsearch","c5.9xlarge.elasticsearch","c5.large.elasticsearch","c5.xlarge.elasticsearch","d2.2xlarge.elasticsearch","d2.4xlarge.elasticsearch","d2.8xlarge.elasticsearch","d2.xlarge.elasticsearch","i2.2xlarge.elasticsearch","i2.xlarge.elasticsearch","i3.16xlarge.elasticsearch","i3.2xlarge.elasticsearch","i3.4xlarge.elasticsearch","i3.8xlarge.elasticsearch","i3.large.elasticsearch","i3.xlarge.elasticsearch","m3.2xlarge.elasticsearch","m3.large.elasticsearch","m3.medium.elasticsearch","m3.xlarge.elasticsearch","m4.10xlarge.elasticsearch","m4.2xlarge.elasticsearch","m4.4xlarge.elasticsearch","m4.large.elasticsearch","m4.xlarge.elasticsearch","m5.12xlarge.elasticsearch","m5.2xlarge.elasticsearch","m5.4xlarge.elasticsearch","m5.large.elasticsearch","m5.xlarge.elasticsearch","r3.2xlarge.elasticsearch","r3.4xlarge.elasticsearch","r3.8xlarge.elasticsearch","r3.large.elasticsearch","r3.xlarge.elasticsearch","r4.16xlarge.elasticsearch","r4.2xlarge.elasticsearch","r4.4xlarge.elasticsearch","r4.8xlarge.elasticsearch","r4.large.elasticsearch","r4.xlarge.elasticsearch","r5.12xlarge.elasticsearch","r5.2xlarge.elasticsearch","r5.4xlarge.elasticsearch","r5.large.elasticsearch","r5.xlarge.elasticsearch","t2.medium.elasticsearch","t2.micro.elasticsearch","t2.small.elasticsearch","ultrawarm1.large.elasticsearch","ultrawarm1.medium.elasticsearch"
            break
        }

        # Amazon.Elasticsearch.ESWarmPartitionInstanceType
        {
            ($_ -eq "New-ESDomain/ElasticsearchClusterConfig_WarmType") -Or
            ($_ -eq "Update-ESDomainConfig/ElasticsearchClusterConfig_WarmType")
        }
        {
            $v = "ultrawarm1.large.elasticsearch","ultrawarm1.medium.elasticsearch"
            break
        }

        # Amazon.Elasticsearch.PackageType
        "New-ESPackage/PackageType"
        {
            $v = "TXT-DICTIONARY"
            break
        }

        # Amazon.Elasticsearch.RollbackOnDisable
        "Update-ESDomainConfig/AutoTuneOptions_RollbackOnDisable"
        {
            $v = "DEFAULT_ROLLBACK","NO_ROLLBACK"
            break
        }

        # Amazon.Elasticsearch.TLSSecurityPolicy
        {
            ($_ -eq "New-ESDomain/DomainEndpointOptions_TLSSecurityPolicy") -Or
            ($_ -eq "Update-ESDomainConfig/DomainEndpointOptions_TLSSecurityPolicy")
        }
        {
            $v = "Policy-Min-TLS-1-0-2019-07","Policy-Min-TLS-1-2-2019-07","Policy-Min-TLS-1-2-PFS-2023-10"
            break
        }

        # Amazon.Elasticsearch.VolumeType
        {
            ($_ -eq "New-ESDomain/EBSOptions_VolumeType") -Or
            ($_ -eq "Update-ESDomainConfig/EBSOptions_VolumeType")
        }
        {
            $v = "gp2","gp3","io1","standard"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ES_map = @{
    "AutoTuneOptions_DesiredState"=@("New-ESDomain","Update-ESDomainConfig")
    "AutoTuneOptions_RollbackOnDisable"=@("Update-ESDomainConfig")
    "DomainEndpointOptions_TLSSecurityPolicy"=@("New-ESDomain","Update-ESDomainConfig")
    "EBSOptions_VolumeType"=@("New-ESDomain","Update-ESDomainConfig")
    "ElasticsearchClusterConfig_DedicatedMasterType"=@("New-ESDomain","Update-ESDomainConfig")
    "ElasticsearchClusterConfig_InstanceType"=@("New-ESDomain","Update-ESDomainConfig")
    "ElasticsearchClusterConfig_WarmType"=@("New-ESDomain","Update-ESDomainConfig")
    "EngineType"=@("Get-ESDomainNameList")
    "InstanceType"=@("Get-ESInstanceTypeLimit")
    "PackageType"=@("New-ESPackage")
}

_awsArgumentCompleterRegistration $ES_Completers $ES_map

$ES_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ES.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ES_SelectMap = @{
    "Select"=@("Approve-ESInboundCrossClusterSearchConnection",
               "Add-ESResourceTag",
               "Start-ESAssociatePackage",
               "Approve-ESVpcEndpointAccess",
               "Stop-ESDomainConfigChange",
               "Stop-ESElasticsearchServiceSoftwareUpdate",
               "New-ESDomain",
               "New-ESOutboundCrossClusterSearchConnection",
               "New-ESPackage",
               "New-ESVpcEndpoint",
               "Remove-ESDomain",
               "Remove-ESElasticsearchServiceRole",
               "Remove-ESInboundCrossClusterSearchConnection",
               "Remove-ESOutboundCrossClusterSearchConnection",
               "Remove-ESPackage",
               "Remove-ESVpcEndpoint",
               "Get-ESDomainAutoTune",
               "Get-ESDomainChangeProgress",
               "Get-ESDomain",
               "Get-ESDomainConfig",
               "Get-ESDomainList",
               "Get-ESInstanceTypeLimit",
               "Get-ESInboundCrossClusterSearchConnection",
               "Get-ESOutboundCrossClusterSearchConnection",
               "Get-ESPackage",
               "Get-ESReservedElasticsearchInstanceOfferingList",
               "Get-ESReservedElasticsearchInstanceList",
               "Get-ESVpcEndpoint",
               "Start-ESDissociatePackage",
               "Get-ESCompatibleElasticsearchVersion",
               "Get-ESPackageVersionHistory",
               "Get-ESUpgradeHistory",
               "Get-ESUpgradeStatus",
               "Get-ESDomainNameList",
               "Get-ESDomainsForPackageList",
               "Get-ESInstanceTypeList",
               "Get-ESVersionList",
               "Get-ESPackagesForDomainList",
               "Get-ESResourceTag",
               "Get-ESVpcEndpointAccessList",
               "Get-ESVpcEndpointList",
               "Get-ESVpcEndpointsForDomainList",
               "New-ESReservedElasticsearchInstanceOffering",
               "Deny-ESInboundCrossClusterSearchConnection",
               "Remove-ESResourceTag",
               "Revoke-ESVpcEndpointAccess",
               "Start-ESElasticsearchServiceSoftwareUpdate",
               "Update-ESDomainConfig",
               "Update-ESPackage",
               "Update-ESVpcEndpoint",
               "Update-ESElasticsearchDomain")
}

_awsArgumentCompleterRegistration $ES_SelectCompleters $ES_SelectMap
# Argument completions for service Amazon EventBridge


$EVB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.EventBridge.ApiDestinationHttpMethod
        {
            ($_ -eq "New-EVBApiDestination/HttpMethod") -Or
            ($_ -eq "Update-EVBApiDestination/HttpMethod")
        }
        {
            $v = "DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT"
            break
        }

        # Amazon.EventBridge.ArchiveState
        "Get-EVBArchiveList/State"
        {
            $v = "CREATE_FAILED","CREATING","DISABLED","ENABLED","UPDATE_FAILED","UPDATING"
            break
        }

        # Amazon.EventBridge.ConnectionAuthorizationType
        {
            ($_ -eq "New-EVBConnection/AuthorizationType") -Or
            ($_ -eq "Update-EVBConnection/AuthorizationType")
        }
        {
            $v = "API_KEY","BASIC","OAUTH_CLIENT_CREDENTIALS"
            break
        }

        # Amazon.EventBridge.ConnectionOAuthHttpMethod
        {
            ($_ -eq "New-EVBConnection/OAuthParameters_HttpMethod") -Or
            ($_ -eq "Update-EVBConnection/OAuthParameters_HttpMethod")
        }
        {
            $v = "GET","POST","PUT"
            break
        }

        # Amazon.EventBridge.ConnectionState
        "Get-EVBConnectionList/ConnectionState"
        {
            $v = "AUTHORIZED","AUTHORIZING","CREATING","DEAUTHORIZED","DEAUTHORIZING","DELETING","UPDATING"
            break
        }

        # Amazon.EventBridge.ReplayState
        "Get-EVBReplayList/State"
        {
            $v = "CANCELLED","CANCELLING","COMPLETED","FAILED","RUNNING","STARTING"
            break
        }

        # Amazon.EventBridge.ReplicationState
        {
            ($_ -eq "New-EVBEndpoint/ReplicationConfig_State") -Or
            ($_ -eq "Update-EVBEndpoint/ReplicationConfig_State")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.EventBridge.RuleState
        "Write-EVBRule/State"
        {
            $v = "DISABLED","ENABLED","ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EVB_map = @{
    "AuthorizationType"=@("New-EVBConnection","Update-EVBConnection")
    "ConnectionState"=@("Get-EVBConnectionList")
    "HttpMethod"=@("New-EVBApiDestination","Update-EVBApiDestination")
    "OAuthParameters_HttpMethod"=@("New-EVBConnection","Update-EVBConnection")
    "ReplicationConfig_State"=@("New-EVBEndpoint","Update-EVBEndpoint")
    "State"=@("Get-EVBArchiveList","Get-EVBReplayList","Write-EVBRule")
}

_awsArgumentCompleterRegistration $EVB_Completers $EVB_map

$EVB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EVB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EVB_SelectMap = @{
    "Select"=@("Enable-EVBEventSource",
               "Stop-EVBReplay",
               "New-EVBApiDestination",
               "New-EVBArchive",
               "New-EVBConnection",
               "New-EVBEndpoint",
               "New-EVBEventBus",
               "New-EVBPartnerEventSource",
               "Disable-EVBEventSource",
               "Clear-EVBConnection",
               "Remove-EVBApiDestination",
               "Remove-EVBArchive",
               "Remove-EVBConnection",
               "Remove-EVBEndpoint",
               "Remove-EVBEventBus",
               "Remove-EVBPartnerEventSource",
               "Remove-EVBRule",
               "Get-EVBApiDestination",
               "Get-EVBArchive",
               "Get-EVBConnection",
               "Get-EVBEndpoint",
               "Get-EVBEventBus",
               "Get-EVBEventSource",
               "Get-EVBPartnerEventSource",
               "Get-EVBReplay",
               "Get-EVBRuleDetail",
               "Disable-EVBRule",
               "Enable-EVBRule",
               "Get-EVBApiDestinationList",
               "Get-EVBArchiveList",
               "Get-EVBConnectionList",
               "Get-EVBEndpointList",
               "Get-EVBEventBusList",
               "Get-EVBEventSourceList",
               "Get-EVBPartnerEventSourceAccountList",
               "Get-EVBPartnerEventSourceList",
               "Get-EVBReplayList",
               "Get-EVBRuleNamesByTarget",
               "Get-EVBRule",
               "Get-EVBResourceTag",
               "Get-EVBTargetsByRule",
               "Write-EVBEvent",
               "Write-EVBPartnerEvent",
               "Write-EVBPermission",
               "Write-EVBRule",
               "Write-EVBTarget",
               "Remove-EVBPermission",
               "Remove-EVBTarget",
               "Start-EVBReplay",
               "Add-EVBResourceTag",
               "Test-EVBEventPattern",
               "Remove-EVBResourceTag",
               "Update-EVBApiDestination",
               "Update-EVBArchive",
               "Update-EVBConnection",
               "Update-EVBEndpoint",
               "Update-EVBEventBus")
}

_awsArgumentCompleterRegistration $EVB_SelectCompleters $EVB_SelectMap
# Argument completions for service Amazon CloudWatch Events


$CWE_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudWatchEvents.ApiDestinationHttpMethod
        {
            ($_ -eq "New-CWEApiDestination/HttpMethod") -Or
            ($_ -eq "Update-CWEApiDestination/HttpMethod")
        }
        {
            $v = "DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT"
            break
        }

        # Amazon.CloudWatchEvents.ArchiveState
        "Get-CWEArchiveList/State"
        {
            $v = "CREATE_FAILED","CREATING","DISABLED","ENABLED","UPDATE_FAILED","UPDATING"
            break
        }

        # Amazon.CloudWatchEvents.ConnectionAuthorizationType
        {
            ($_ -eq "New-CWEConnection/AuthorizationType") -Or
            ($_ -eq "Update-CWEConnection/AuthorizationType")
        }
        {
            $v = "API_KEY","BASIC","OAUTH_CLIENT_CREDENTIALS"
            break
        }

        # Amazon.CloudWatchEvents.ConnectionOAuthHttpMethod
        {
            ($_ -eq "New-CWEConnection/OAuthParameters_HttpMethod") -Or
            ($_ -eq "Update-CWEConnection/OAuthParameters_HttpMethod")
        }
        {
            $v = "GET","POST","PUT"
            break
        }

        # Amazon.CloudWatchEvents.ConnectionState
        "Get-CWEConnectionList/ConnectionState"
        {
            $v = "AUTHORIZED","AUTHORIZING","CREATING","DEAUTHORIZED","DEAUTHORIZING","DELETING","UPDATING"
            break
        }

        # Amazon.CloudWatchEvents.ReplayState
        "Get-CWEReplayList/State"
        {
            $v = "CANCELLED","CANCELLING","COMPLETED","FAILED","RUNNING","STARTING"
            break
        }

        # Amazon.CloudWatchEvents.RuleState
        "Write-CWERule/State"
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWE_map = @{
    "AuthorizationType"=@("New-CWEConnection","Update-CWEConnection")
    "ConnectionState"=@("Get-CWEConnectionList")
    "HttpMethod"=@("New-CWEApiDestination","Update-CWEApiDestination")
    "OAuthParameters_HttpMethod"=@("New-CWEConnection","Update-CWEConnection")
    "State"=@("Get-CWEArchiveList","Get-CWEReplayList","Write-CWERule")
}

_awsArgumentCompleterRegistration $CWE_Completers $CWE_map

$CWE_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CWE.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWE_SelectMap = @{
    "Select"=@("Enable-CWEEventSource",
               "Stop-CWEReplay",
               "New-CWEApiDestination",
               "New-CWEArchive",
               "New-CWEConnection",
               "New-CWEEventBus",
               "New-CWEPartnerEventSource",
               "Disable-CWEEventSource",
               "Clear-CWEConnection",
               "Remove-CWEApiDestination",
               "Remove-CWEArchive",
               "Remove-CWEConnection",
               "Remove-CWEEventBus",
               "Remove-CWEPartnerEventSource",
               "Remove-CWERule",
               "Get-CWEApiDestination",
               "Get-CWEArchive",
               "Get-CWEConnection",
               "Get-CWEEventBus",
               "Get-CWEEventSource",
               "Get-CWEPartnerEventSource",
               "Get-CWEReplay",
               "Get-CWERuleDetail",
               "Disable-CWERule",
               "Enable-CWERule",
               "Get-CWEApiDestinationList",
               "Get-CWEArchiveList",
               "Get-CWEConnectionList",
               "Get-CWEEventBusList",
               "Get-CWEEventSourceList",
               "Get-CWEPartnerEventSourceAccountList",
               "Get-CWEPartnerEventSourceList",
               "Get-CWEReplayList",
               "Get-CWERuleNamesByTarget",
               "Get-CWERule",
               "Get-CWEResourceTag",
               "Get-CWETargetsByRule",
               "Write-CWEEvent",
               "Write-CWEPartnerEvent",
               "Write-CWEPermission",
               "Write-CWERule",
               "Write-CWETarget",
               "Remove-CWEPermission",
               "Remove-CWETarget",
               "Start-CWEReplay",
               "Add-CWEResourceTag",
               "Test-CWEEventPattern",
               "Remove-CWEResourceTag",
               "Update-CWEApiDestination",
               "Update-CWEArchive",
               "Update-CWEConnection")
}

_awsArgumentCompleterRegistration $CWE_SelectCompleters $CWE_SelectMap
# Argument completions for service Amazon CloudWatch Evidently


$CWEVD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudWatchEvidently.ExperimentBaseStat
        "Get-CWEVDExperimentResult/BaseStat"
        {
            $v = "Mean"
            break
        }

        # Amazon.CloudWatchEvidently.ExperimentStatus
        "Get-CWEVDExperimentList/Status"
        {
            $v = "CANCELLED","COMPLETED","CREATED","RUNNING","UPDATING"
            break
        }

        # Amazon.CloudWatchEvidently.ExperimentStopDesiredState
        "Stop-CWEVDExperiment/DesiredState"
        {
            $v = "CANCELLED","COMPLETED"
            break
        }

        # Amazon.CloudWatchEvidently.FeatureEvaluationStrategy
        {
            ($_ -eq "New-CWEVDFeature/EvaluationStrategy") -Or
            ($_ -eq "Update-CWEVDFeature/EvaluationStrategy")
        }
        {
            $v = "ALL_RULES","DEFAULT_VARIATION"
            break
        }

        # Amazon.CloudWatchEvidently.LaunchStatus
        "Get-CWEVDLaunchList/Status"
        {
            $v = "CANCELLED","COMPLETED","CREATED","RUNNING","UPDATING"
            break
        }

        # Amazon.CloudWatchEvidently.LaunchStopDesiredState
        "Stop-CWEVDLaunch/DesiredState"
        {
            $v = "CANCELLED","COMPLETED"
            break
        }

        # Amazon.CloudWatchEvidently.SegmentReferenceResourceType
        "Get-CWEVDSegmentReferenceList/Type"
        {
            $v = "EXPERIMENT","LAUNCH"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWEVD_map = @{
    "BaseStat"=@("Get-CWEVDExperimentResult")
    "DesiredState"=@("Stop-CWEVDExperiment","Stop-CWEVDLaunch")
    "EvaluationStrategy"=@("New-CWEVDFeature","Update-CWEVDFeature")
    "Status"=@("Get-CWEVDExperimentList","Get-CWEVDLaunchList")
    "Type"=@("Get-CWEVDSegmentReferenceList")
}

_awsArgumentCompleterRegistration $CWEVD_Completers $CWEVD_map

$CWEVD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CWEVD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWEVD_SelectMap = @{
    "Select"=@("Get-CWEVDFeatureEvaluationBatch",
               "New-CWEVDExperiment",
               "New-CWEVDFeature",
               "New-CWEVDLaunch",
               "New-CWEVDProject",
               "New-CWEVDSegment",
               "Remove-CWEVDExperiment",
               "Remove-CWEVDFeature",
               "Remove-CWEVDLaunch",
               "Remove-CWEVDProject",
               "Remove-CWEVDSegment",
               "Get-CWEVDFeatureEvaluation",
               "Get-CWEVDExperiment",
               "Get-CWEVDExperimentResult",
               "Get-CWEVDFeature",
               "Get-CWEVDLaunch",
               "Get-CWEVDProject",
               "Get-CWEVDSegment",
               "Get-CWEVDExperimentList",
               "Get-CWEVDFeatureList",
               "Get-CWEVDLaunchList",
               "Get-CWEVDProjectList",
               "Get-CWEVDSegmentReferenceList",
               "Get-CWEVDSegmentList",
               "Get-CWEVDResourceTag",
               "Write-CWEVDProjectEvent",
               "Start-CWEVDExperiment",
               "Start-CWEVDLaunch",
               "Stop-CWEVDExperiment",
               "Stop-CWEVDLaunch",
               "Add-CWEVDResourceTag",
               "Test-CWEVDSegmentPattern",
               "Remove-CWEVDResourceTag",
               "Update-CWEVDExperiment",
               "Update-CWEVDFeature",
               "Update-CWEVDLaunch",
               "Update-CWEVDProject",
               "Update-CWEVDProjectDataDelivery")
}

_awsArgumentCompleterRegistration $CWEVD_SelectCompleters $CWEVD_SelectMap
# Argument completions for service FinSpace User Environment Management Service


$FINSP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Finspace.AutoScalingMetric
        "New-FINSPKxCluster/AutoScalingConfiguration_AutoScalingMetric"
        {
            $v = "CPU_UTILIZATION_PERCENTAGE"
            break
        }

        # Amazon.Finspace.FederationMode
        {
            ($_ -eq "New-FINSPEnvironment/FederationMode") -Or
            ($_ -eq "Update-FINSPEnvironment/FederationMode")
        }
        {
            $v = "FEDERATED","LOCAL"
            break
        }

        # Amazon.Finspace.IPAddressType
        "New-FINSPKxCluster/VpcConfiguration_IpAddressType"
        {
            $v = "IP_V4"
            break
        }

        # Amazon.Finspace.KxAzMode
        {
            ($_ -eq "New-FINSPKxCluster/AzMode") -Or
            ($_ -eq "New-FINSPKxDataview/AzMode") -Or
            ($_ -eq "New-FINSPKxVolume/AzMode")
        }
        {
            $v = "MULTI","SINGLE"
            break
        }

        # Amazon.Finspace.KxClusterCodeDeploymentStrategy
        "Update-FINSPKxClusterCodeConfiguration/DeploymentConfiguration_DeploymentStrategy"
        {
            $v = "FORCE","NO_RESTART","ROLLING"
            break
        }

        # Amazon.Finspace.KxClusterType
        {
            ($_ -eq "Get-FINSPKxClusterList/ClusterType") -Or
            ($_ -eq "New-FINSPKxCluster/ClusterType")
        }
        {
            $v = "GATEWAY","GP","HDB","RDB","TICKERPLANT"
            break
        }

        # Amazon.Finspace.KxDeploymentStrategy
        "Update-FINSPKxClusterDatabasis/DeploymentConfiguration_DeploymentStrategy"
        {
            $v = "NO_RESTART","ROLLING"
            break
        }

        # Amazon.Finspace.KxNAS1Type
        {
            ($_ -eq "New-FINSPKxVolume/Nas1Configuration_Type") -Or
            ($_ -eq "Update-FINSPKxVolume/Nas1Configuration_Type")
        }
        {
            $v = "HDD_12","SSD_1000","SSD_250"
            break
        }

        # Amazon.Finspace.KxSavedownStorageType
        "New-FINSPKxCluster/SavedownStorageConfiguration_Type"
        {
            $v = "SDS01"
            break
        }

        # Amazon.Finspace.KxVolumeType
        {
            ($_ -eq "Get-FINSPKxVolumeList/VolumeType") -Or
            ($_ -eq "New-FINSPKxVolume/VolumeType")
        }
        {
            $v = "NAS_1"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FINSP_map = @{
    "AutoScalingConfiguration_AutoScalingMetric"=@("New-FINSPKxCluster")
    "AzMode"=@("New-FINSPKxCluster","New-FINSPKxDataview","New-FINSPKxVolume")
    "ClusterType"=@("Get-FINSPKxClusterList","New-FINSPKxCluster")
    "DeploymentConfiguration_DeploymentStrategy"=@("Update-FINSPKxClusterCodeConfiguration","Update-FINSPKxClusterDatabasis")
    "FederationMode"=@("New-FINSPEnvironment","Update-FINSPEnvironment")
    "Nas1Configuration_Type"=@("New-FINSPKxVolume","Update-FINSPKxVolume")
    "SavedownStorageConfiguration_Type"=@("New-FINSPKxCluster")
    "VolumeType"=@("Get-FINSPKxVolumeList","New-FINSPKxVolume")
    "VpcConfiguration_IpAddressType"=@("New-FINSPKxCluster")
}

_awsArgumentCompleterRegistration $FINSP_Completers $FINSP_map

$FINSP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.FINSP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FINSP_SelectMap = @{
    "Select"=@("New-FINSPEnvironment",
               "New-FINSPKxChangeset",
               "New-FINSPKxCluster",
               "New-FINSPKxDatabase",
               "New-FINSPKxDataview",
               "New-FINSPKxEnvironment",
               "New-FINSPKxScalingGroup",
               "New-FINSPKxUser",
               "New-FINSPKxVolume",
               "Remove-FINSPEnvironment",
               "Remove-FINSPKxCluster",
               "Remove-FINSPKxClusterNode",
               "Remove-FINSPKxDatabase",
               "Remove-FINSPKxDataview",
               "Remove-FINSPKxEnvironment",
               "Remove-FINSPKxScalingGroup",
               "Remove-FINSPKxUser",
               "Remove-FINSPKxVolume",
               "Get-FINSPEnvironment",
               "Get-FINSPKxChangeset",
               "Get-FINSPKxCluster",
               "Get-FINSPKxConnectionString",
               "Get-FINSPKxDatabase",
               "Get-FINSPKxDataview",
               "Get-FINSPKxEnvironment",
               "Get-FINSPKxScalingGroup",
               "Get-FINSPKxUser",
               "Get-FINSPKxVolume",
               "Get-FINSPEnvironmentList",
               "Get-FINSPKxChangesetList",
               "Get-FINSPKxClusterNodeList",
               "Get-FINSPKxClusterList",
               "Get-FINSPKxDatabasisList",
               "Get-FINSPKxDataviewList",
               "Get-FINSPKxEnvironmentList",
               "Get-FINSPKxScalingGroupList",
               "Get-FINSPKxUserList",
               "Get-FINSPKxVolumeList",
               "Get-FINSPResourceTag",
               "Add-FINSPResourceTag",
               "Remove-FINSPResourceTag",
               "Update-FINSPEnvironment",
               "Update-FINSPKxClusterCodeConfiguration",
               "Update-FINSPKxClusterDatabasis",
               "Update-FINSPKxDatabase",
               "Update-FINSPKxDataview",
               "Update-FINSPKxEnvironment",
               "Update-FINSPKxEnvironmentNetwork",
               "Update-FINSPKxUser",
               "Update-FINSPKxVolume")
}

_awsArgumentCompleterRegistration $FINSP_SelectCompleters $FINSP_SelectMap
# Argument completions for service FinSpace Public API


$FNSP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.FinSpaceData.ApiAccess
        {
            ($_ -eq "New-FNSPUser/ApiAccess") -Or
            ($_ -eq "Update-FNSPUser/ApiAccess")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.FinSpaceData.ChangeType
        "New-FNSPChangeset/ChangeType"
        {
            $v = "APPEND","MODIFY","REPLACE"
            break
        }

        # Amazon.FinSpaceData.DatasetKind
        {
            ($_ -eq "New-FNSPDataset/Kind") -Or
            ($_ -eq "Update-FNSPDataset/Kind")
        }
        {
            $v = "NON_TABULAR","TABULAR"
            break
        }

        # Amazon.FinSpaceData.ExportFileFormat
        "New-FNSPDataView/DestinationTypeParams_S3DestinationExportFileFormat"
        {
            $v = "DELIMITED_TEXT","PARQUET"
            break
        }

        # Amazon.FinSpaceData.LocationType
        "Get-FNSPWorkingLocation/LocationType"
        {
            $v = "INGESTION","SAGEMAKER"
            break
        }

        # Amazon.FinSpaceData.UserType
        {
            ($_ -eq "New-FNSPUser/Type") -Or
            ($_ -eq "Update-FNSPUser/Type")
        }
        {
            $v = "APP_USER","SUPER_USER"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FNSP_map = @{
    "ApiAccess"=@("New-FNSPUser","Update-FNSPUser")
    "ChangeType"=@("New-FNSPChangeset")
    "DestinationTypeParams_S3DestinationExportFileFormat"=@("New-FNSPDataView")
    "Kind"=@("New-FNSPDataset","Update-FNSPDataset")
    "LocationType"=@("Get-FNSPWorkingLocation")
    "Type"=@("New-FNSPUser","Update-FNSPUser")
}

_awsArgumentCompleterRegistration $FNSP_Completers $FNSP_map

$FNSP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.FNSP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FNSP_SelectMap = @{
    "Select"=@("Add-FNSPUserToPermissionGroup",
               "New-FNSPChangeset",
               "New-FNSPDataset",
               "New-FNSPDataView",
               "New-FNSPPermissionGroup",
               "New-FNSPUser",
               "Remove-FNSPDataset",
               "Remove-FNSPPermissionGroup",
               "Disable-FNSPUser",
               "Remove-FNSPUserFromPermissionGroup",
               "Enable-FNSPUser",
               "Get-FNSPChangeset",
               "Get-FNSPDataset",
               "Get-FNSPDataView",
               "Get-FNSPExternalDataViewAccessDetail",
               "Get-FNSPPermissionGroup",
               "Get-FNSPProgrammaticAccessCredential",
               "Get-FNSPUser",
               "Get-FNSPWorkingLocation",
               "Get-FNSPChangesetList",
               "Get-FNSPDatasetList",
               "Get-FNSPDataViewList",
               "Get-FNSPPermissionGroupList",
               "Get-FNSPPermissionGroupsByUserList",
               "Get-FNSPUserList",
               "Get-FNSPUsersByPermissionGroupList",
               "Reset-FNSPUserPassword",
               "Update-FNSPChangeset",
               "Update-FNSPDataset",
               "Update-FNSPPermissionGroup",
               "Update-FNSPUser")
}

_awsArgumentCompleterRegistration $FNSP_SelectCompleters $FNSP_SelectMap
# Argument completions for service Amazon Kinesis Firehose


$KINF_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.KinesisFirehose.AmazonOpenSearchServerlessS3BackupMode
        "New-KINFDeliveryStream/AmazonOpenSearchServerlessDestinationConfiguration_S3BackupMode"
        {
            $v = "AllDocuments","FailedDocumentsOnly"
            break
        }

        # Amazon.KinesisFirehose.AmazonopensearchserviceIndexRotationPeriod
        {
            ($_ -eq "New-KINFDeliveryStream/AmazonopensearchserviceDestinationConfiguration_IndexRotationPeriod") -Or
            ($_ -eq "Update-KINFDestination/AmazonopensearchserviceDestinationUpdate_IndexRotationPeriod")
        }
        {
            $v = "NoRotation","OneDay","OneHour","OneMonth","OneWeek"
            break
        }

        # Amazon.KinesisFirehose.AmazonopensearchserviceS3BackupMode
        "New-KINFDeliveryStream/AmazonopensearchserviceDestinationConfiguration_S3BackupMode"
        {
            $v = "AllDocuments","FailedDocumentsOnly"
            break
        }

        # Amazon.KinesisFirehose.Connectivity
        "New-KINFDeliveryStream/AuthenticationConfiguration_Connectivity"
        {
            $v = "PRIVATE","PUBLIC"
            break
        }

        # Amazon.KinesisFirehose.ContentEncoding
        {
            ($_ -eq "New-KINFDeliveryStream/HttpEndpointDestinationConfiguration_RequestConfiguration_ContentEncoding") -Or
            ($_ -eq "Update-KINFDestination/HttpEndpointDestinationUpdate_RequestConfiguration_ContentEncoding")
        }
        {
            $v = "GZIP","NONE"
            break
        }

        # Amazon.KinesisFirehose.DefaultDocumentIdFormat
        {
            ($_ -eq "New-KINFDeliveryStream/AmazonopensearchserviceDestinationConfiguration_DocumentIdOptions_DefaultDocumentIdFormat") -Or
            ($_ -eq "Update-KINFDestination/AmazonopensearchserviceDestinationUpdate_DocumentIdOptions_DefaultDocumentIdFormat") -Or
            ($_ -eq "New-KINFDeliveryStream/DocumentIdOptions_DefaultDocumentIdFormat") -Or
            ($_ -eq "Update-KINFDestination/DocumentIdOptions_DefaultDocumentIdFormat")
        }
        {
            $v = "FIREHOSE_DEFAULT","NO_DOCUMENT_ID"
            break
        }

        # Amazon.KinesisFirehose.DeliveryStreamType
        {
            ($_ -eq "Get-KINFDeliveryStreamList/DeliveryStreamType") -Or
            ($_ -eq "New-KINFDeliveryStream/DeliveryStreamType")
        }
        {
            $v = "DirectPut","KinesisStreamAsSource","MSKAsSource"
            break
        }

        # Amazon.KinesisFirehose.ElasticsearchIndexRotationPeriod
        {
            ($_ -eq "New-KINFDeliveryStream/ElasticsearchDestinationConfiguration_IndexRotationPeriod") -Or
            ($_ -eq "Update-KINFDestination/ElasticsearchDestinationUpdate_IndexRotationPeriod")
        }
        {
            $v = "NoRotation","OneDay","OneHour","OneMonth","OneWeek"
            break
        }

        # Amazon.KinesisFirehose.ElasticsearchS3BackupMode
        "New-KINFDeliveryStream/ElasticsearchDestinationConfiguration_S3BackupMode"
        {
            $v = "AllDocuments","FailedDocumentsOnly"
            break
        }

        # Amazon.KinesisFirehose.HttpEndpointS3BackupMode
        {
            ($_ -eq "New-KINFDeliveryStream/HttpEndpointDestinationConfiguration_S3BackupMode") -Or
            ($_ -eq "Update-KINFDestination/HttpEndpointDestinationUpdate_S3BackupMode")
        }
        {
            $v = "AllData","FailedDataOnly"
            break
        }

        # Amazon.KinesisFirehose.IcebergS3BackupMode
        {
            ($_ -eq "New-KINFDeliveryStream/IcebergDestinationConfiguration_S3BackupMode") -Or
            ($_ -eq "Update-KINFDestination/IcebergDestinationUpdate_S3BackupMode")
        }
        {
            $v = "AllData","FailedDataOnly"
            break
        }

        # Amazon.KinesisFirehose.KeyType
        {
            ($_ -eq "New-KINFDeliveryStream/DeliveryStreamEncryptionConfigurationInput_KeyType") -Or
            ($_ -eq "Start-KINFDeliveryStreamEncryption/DeliveryStreamEncryptionConfigurationInput_KeyType")
        }
        {
            $v = "AWS_OWNED_CMK","CUSTOMER_MANAGED_CMK"
            break
        }

        # Amazon.KinesisFirehose.SnowflakeDataLoadingOption
        {
            ($_ -eq "New-KINFDeliveryStream/SnowflakeDestinationConfiguration_DataLoadingOption") -Or
            ($_ -eq "Update-KINFDestination/SnowflakeDestinationUpdate_DataLoadingOption")
        }
        {
            $v = "JSON_MAPPING","VARIANT_CONTENT_AND_METADATA_MAPPING","VARIANT_CONTENT_MAPPING"
            break
        }

        # Amazon.KinesisFirehose.SnowflakeS3BackupMode
        {
            ($_ -eq "New-KINFDeliveryStream/SnowflakeDestinationConfiguration_S3BackupMode") -Or
            ($_ -eq "Update-KINFDestination/SnowflakeDestinationUpdate_S3BackupMode")
        }
        {
            $v = "AllData","FailedDataOnly"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KINF_map = @{
    "AmazonOpenSearchServerlessDestinationConfiguration_S3BackupMode"=@("New-KINFDeliveryStream")
    "AmazonopensearchserviceDestinationConfiguration_DocumentIdOptions_DefaultDocumentIdFormat"=@("New-KINFDeliveryStream")
    "AmazonopensearchserviceDestinationConfiguration_IndexRotationPeriod"=@("New-KINFDeliveryStream")
    "AmazonopensearchserviceDestinationConfiguration_S3BackupMode"=@("New-KINFDeliveryStream")
    "AmazonopensearchserviceDestinationUpdate_DocumentIdOptions_DefaultDocumentIdFormat"=@("Update-KINFDestination")
    "AmazonopensearchserviceDestinationUpdate_IndexRotationPeriod"=@("Update-KINFDestination")
    "AuthenticationConfiguration_Connectivity"=@("New-KINFDeliveryStream")
    "DeliveryStreamEncryptionConfigurationInput_KeyType"=@("New-KINFDeliveryStream","Start-KINFDeliveryStreamEncryption")
    "DeliveryStreamType"=@("Get-KINFDeliveryStreamList","New-KINFDeliveryStream")
    "DocumentIdOptions_DefaultDocumentIdFormat"=@("New-KINFDeliveryStream","Update-KINFDestination")
    "ElasticsearchDestinationConfiguration_IndexRotationPeriod"=@("New-KINFDeliveryStream")
    "ElasticsearchDestinationConfiguration_S3BackupMode"=@("New-KINFDeliveryStream")
    "ElasticsearchDestinationUpdate_IndexRotationPeriod"=@("Update-KINFDestination")
    "HttpEndpointDestinationConfiguration_RequestConfiguration_ContentEncoding"=@("New-KINFDeliveryStream")
    "HttpEndpointDestinationConfiguration_S3BackupMode"=@("New-KINFDeliveryStream")
    "HttpEndpointDestinationUpdate_RequestConfiguration_ContentEncoding"=@("Update-KINFDestination")
    "HttpEndpointDestinationUpdate_S3BackupMode"=@("Update-KINFDestination")
    "IcebergDestinationConfiguration_S3BackupMode"=@("New-KINFDeliveryStream")
    "IcebergDestinationUpdate_S3BackupMode"=@("Update-KINFDestination")
    "SnowflakeDestinationConfiguration_DataLoadingOption"=@("New-KINFDeliveryStream")
    "SnowflakeDestinationConfiguration_S3BackupMode"=@("New-KINFDeliveryStream")
    "SnowflakeDestinationUpdate_DataLoadingOption"=@("Update-KINFDestination")
    "SnowflakeDestinationUpdate_S3BackupMode"=@("Update-KINFDestination")
}

_awsArgumentCompleterRegistration $KINF_Completers $KINF_map

$KINF_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KINF.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KINF_SelectMap = @{
    "Select"=@("New-KINFDeliveryStream",
               "Remove-KINFDeliveryStream",
               "Get-KINFDeliveryStream",
               "Get-KINFDeliveryStreamList",
               "Get-KINFTagsForDeliveryStream",
               "Write-KINFRecord",
               "Write-KINFRecordBatch",
               "Start-KINFDeliveryStreamEncryption",
               "Stop-KINFDeliveryStreamEncryption",
               "Add-KINFDeliveryStreamTag",
               "Remove-KINFDeliveryStreamTag",
               "Update-KINFDestination")
}

_awsArgumentCompleterRegistration $KINF_SelectCompleters $KINF_SelectMap
# Argument completions for service AWS Fault Injection Simulator


$FIS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.FIS.AccountTargeting
        "New-FISExperimentTemplate/ExperimentOptions_AccountTargeting"
        {
            $v = "multi-account","single-account"
            break
        }

        # Amazon.FIS.ActionsMode
        "Start-FISExperiment/ExperimentOptions_ActionsMode"
        {
            $v = "run-all","skip-all"
            break
        }

        # Amazon.FIS.EmptyTargetResolutionMode
        {
            ($_ -eq "New-FISExperimentTemplate/ExperimentOptions_EmptyTargetResolutionMode") -Or
            ($_ -eq "Update-FISExperimentTemplate/ExperimentOptions_EmptyTargetResolutionMode")
        }
        {
            $v = "fail","skip"
            break
        }

        # Amazon.FIS.SafetyLeverStatusInput
        "Update-FISSafetyLeverState/State_Status"
        {
            $v = "disengaged","engaged"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FIS_map = @{
    "ExperimentOptions_AccountTargeting"=@("New-FISExperimentTemplate")
    "ExperimentOptions_ActionsMode"=@("Start-FISExperiment")
    "ExperimentOptions_EmptyTargetResolutionMode"=@("New-FISExperimentTemplate","Update-FISExperimentTemplate")
    "State_Status"=@("Update-FISSafetyLeverState")
}

_awsArgumentCompleterRegistration $FIS_Completers $FIS_map

$FIS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.FIS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FIS_SelectMap = @{
    "Select"=@("New-FISExperimentTemplate",
               "New-FISTargetAccountConfiguration",
               "Remove-FISExperimentTemplate",
               "Remove-FISTargetAccountConfiguration",
               "Get-FISAction",
               "Get-FISExperiment",
               "Get-FISExperimentTargetAccountConfiguration",
               "Get-FISExperimentTemplate",
               "Get-FISSafetyLever",
               "Get-FISTargetAccountConfiguration",
               "Get-FISTargetResourceType",
               "Get-FISActionList",
               "Get-FISExperimentResolvedTargetList",
               "Get-FISExperimentList",
               "Get-FISExperimentTargetAccountConfigurationList",
               "Get-FISExperimentTemplateList",
               "Get-FISResourceTag",
               "Get-FISTargetAccountConfigurationList",
               "Get-FISTargetResourceTypeList",
               "Start-FISExperiment",
               "Stop-FISExperiment",
               "Add-FISResourceTag",
               "Remove-FISResourceTag",
               "Update-FISExperimentTemplate",
               "Update-FISSafetyLeverState",
               "Update-FISTargetAccountConfiguration")
}

_awsArgumentCompleterRegistration $FIS_SelectCompleters $FIS_SelectMap
# Argument completions for service Firewall Management Service


$FMS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.FMS.ResourceSetStatus
        "Write-FMSResourceSet/ResourceSet_ResourceSetStatus"
        {
            $v = "ACTIVE","OUT_OF_ADMIN_SCOPE"
            break
        }

        # Amazon.FMS.ThirdPartyFirewall
        {
            ($_ -eq "Get-FMSThirdPartyFirewallAssociationStatus/ThirdPartyFirewall") -Or
            ($_ -eq "Get-FMSThirdPartyFirewallFirewallPolicyList/ThirdPartyFirewall") -Or
            ($_ -eq "Register-FMSThirdPartyFirewall/ThirdPartyFirewall") -Or
            ($_ -eq "Unregister-FMSThirdPartyFirewall/ThirdPartyFirewall")
        }
        {
            $v = "FORTIGATE_CLOUD_NATIVE_FIREWALL","PALO_ALTO_NETWORKS_CLOUD_NGFW"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FMS_map = @{
    "ResourceSet_ResourceSetStatus"=@("Write-FMSResourceSet")
    "ThirdPartyFirewall"=@("Get-FMSThirdPartyFirewallAssociationStatus","Get-FMSThirdPartyFirewallFirewallPolicyList","Register-FMSThirdPartyFirewall","Unregister-FMSThirdPartyFirewall")
}

_awsArgumentCompleterRegistration $FMS_Completers $FMS_map

$FMS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.FMS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FMS_SelectMap = @{
    "Select"=@("Add-FMSAdminAccountAssociation",
               "Register-FMSThirdPartyFirewall",
               "Add-FMSAssociatedResource",
               "Remove-FMSAssociatedResource",
               "Remove-FMSAppList",
               "Remove-FMSNotificationChannel",
               "Remove-FMSPolicy",
               "Remove-FMSProtocolList",
               "Remove-FMSResourceSet",
               "Remove-FMSAdminAccountAssociation",
               "Unregister-FMSThirdPartyFirewall",
               "Get-FMSAdminAccount",
               "Get-FMSAdminScope",
               "Get-FMSAppList",
               "Get-FMSComplianceDetail",
               "Get-FMSNotificationChannel",
               "Get-FMSPolicy",
               "Get-FMSProtectionStatus",
               "Get-FMSProtocolList",
               "Get-FMSResourceSet",
               "Get-FMSThirdPartyFirewallAssociationStatus",
               "Get-FMSViolationDetail",
               "Get-FMSAdminAccountsForOrganizationList",
               "Get-FMSAdminsManagingAccountList",
               "Get-FMSAppsListList",
               "Get-FMSComplianceStatusList",
               "Read-FMSDiscoveredResourceList",
               "Get-FMSMemberAccountList",
               "Get-FMSPolicyList",
               "Get-FMSProtocolsListList",
               "Read-FMSResourceSetResourceList",
               "Get-FMSResourceSetList",
               "Get-FMSResourceTag",
               "Get-FMSThirdPartyFirewallFirewallPolicyList",
               "Write-FMSAdminAccount",
               "Write-FMSAppList",
               "Write-FMSNotificationChannel",
               "Set-FMSPolicy",
               "Write-FMSProtocolList",
               "Write-FMSResourceSet",
               "Add-FMSResourceTag",
               "Remove-FMSResourceTag")
}

_awsArgumentCompleterRegistration $FMS_SelectCompleters $FMS_SelectMap
# Argument completions for service Amazon Forecast Service


$FRC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ForecastService.AutoMLOverrideStrategy
        "New-FRCPredictor/AutoMLOverrideStrategy"
        {
            $v = "AccuracyOptimized","LatencyOptimized"
            break
        }

        # Amazon.ForecastService.DatasetType
        "New-FRCDataset/DatasetType"
        {
            $v = "ITEM_METADATA","RELATED_TIME_SERIES","TARGET_TIME_SERIES"
            break
        }

        # Amazon.ForecastService.DayOfWeek
        "New-FRCAutoPredictor/TimeAlignmentBoundary_DayOfWeek"
        {
            $v = "FRIDAY","MONDAY","SATURDAY","SUNDAY","THURSDAY","TUESDAY","WEDNESDAY"
            break
        }

        # Amazon.ForecastService.Domain
        {
            ($_ -eq "New-FRCDataset/Domain") -Or
            ($_ -eq "New-FRCDatasetGroup/Domain")
        }
        {
            $v = "CUSTOM","EC2_CAPACITY","INVENTORY_PLANNING","METRICS","RETAIL","WEB_TRAFFIC","WORK_FORCE"
            break
        }

        # Amazon.ForecastService.ImportMode
        "New-FRCDatasetImportJob/ImportMode"
        {
            $v = "FULL","INCREMENTAL"
            break
        }

        # Amazon.ForecastService.Month
        "New-FRCAutoPredictor/TimeAlignmentBoundary_Month"
        {
            $v = "APRIL","AUGUST","DECEMBER","FEBRUARY","JANUARY","JULY","JUNE","MARCH","MAY","NOVEMBER","OCTOBER","SEPTEMBER"
            break
        }

        # Amazon.ForecastService.OptimizationMetric
        {
            ($_ -eq "New-FRCAutoPredictor/OptimizationMetric") -Or
            ($_ -eq "New-FRCPredictor/OptimizationMetric")
        }
        {
            $v = "AverageWeightedQuantileLoss","MAPE","MASE","RMSE","WAPE"
            break
        }

        # Amazon.ForecastService.TimePointGranularity
        "New-FRCExplainability/ExplainabilityConfig_TimePointGranularity"
        {
            $v = "ALL","SPECIFIC"
            break
        }

        # Amazon.ForecastService.TimeSeriesGranularity
        "New-FRCExplainability/ExplainabilityConfig_TimeSeriesGranularity"
        {
            $v = "ALL","SPECIFIC"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FRC_map = @{
    "AutoMLOverrideStrategy"=@("New-FRCPredictor")
    "DatasetType"=@("New-FRCDataset")
    "Domain"=@("New-FRCDataset","New-FRCDatasetGroup")
    "ExplainabilityConfig_TimePointGranularity"=@("New-FRCExplainability")
    "ExplainabilityConfig_TimeSeriesGranularity"=@("New-FRCExplainability")
    "ImportMode"=@("New-FRCDatasetImportJob")
    "OptimizationMetric"=@("New-FRCAutoPredictor","New-FRCPredictor")
    "TimeAlignmentBoundary_DayOfWeek"=@("New-FRCAutoPredictor")
    "TimeAlignmentBoundary_Month"=@("New-FRCAutoPredictor")
}

_awsArgumentCompleterRegistration $FRC_Completers $FRC_map

$FRC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.FRC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FRC_SelectMap = @{
    "Select"=@("New-FRCAutoPredictor",
               "New-FRCDataset",
               "New-FRCDatasetGroup",
               "New-FRCDatasetImportJob",
               "New-FRCExplainability",
               "New-FRCExplainabilityExport",
               "New-FRCForecast",
               "New-FRCForecastExportJob",
               "New-FRCMonitor",
               "New-FRCPredictor",
               "New-FRCPredictorBacktestExportJob",
               "New-FRCWhatIfAnalysis",
               "New-FRCWhatIfForecast",
               "New-FRCWhatIfForecastExport",
               "Remove-FRCDataset",
               "Remove-FRCDatasetGroup",
               "Remove-FRCDatasetImportJob",
               "Remove-FRCExplainability",
               "Remove-FRCExplainabilityExport",
               "Remove-FRCForecast",
               "Remove-FRCForecastExportJob",
               "Remove-FRCMonitor",
               "Remove-FRCPredictor",
               "Remove-FRCPredictorBacktestExportJob",
               "Remove-FRCResourceTree",
               "Remove-FRCWhatIfAnalysis",
               "Remove-FRCWhatIfForecast",
               "Remove-FRCWhatIfForecastExport",
               "Get-FRCAutoPredictor",
               "Get-FRCDataset",
               "Get-FRCDatasetGroup",
               "Get-FRCDatasetImportJob",
               "Get-FRCExplainability",
               "Get-FRCExplainabilityExport",
               "Get-FRCForecast",
               "Get-FRCForecastExportJob",
               "Get-FRCMonitor",
               "Get-FRCPredictor",
               "Get-FRCPredictorBacktestExportJob",
               "Get-FRCWhatIfAnalysis",
               "Get-FRCWhatIfForecast",
               "Get-FRCWhatIfForecastExport",
               "Get-FRCAccuracyMetric",
               "Get-FRCDatasetGroupList",
               "Get-FRCDatasetImportJobList",
               "Get-FRCDatasetList",
               "Get-FRCExplainabilityList",
               "Get-FRCExplainabilityExportList",
               "Get-FRCForecastExportJobList",
               "Get-FRCForecastList",
               "Get-FRCMonitorEvaluationList",
               "Get-FRCMonitorList",
               "Get-FRCPredictorBacktestExportJobList",
               "Get-FRCPredictorList",
               "Get-FRCResourceTag",
               "Get-FRCWhatIfAnalysisList",
               "Get-FRCWhatIfForecastExportList",
               "Get-FRCWhatIfForecastList",
               "Resume-FRCResource",
               "Stop-FRCResource",
               "Add-FRCResourceTag",
               "Remove-FRCResourceTag",
               "Update-FRCDatasetGroup")
}

_awsArgumentCompleterRegistration $FRC_SelectCompleters $FRC_SelectMap
# Argument completions for service Amazon Forecast Query Service


$FRCQ_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.FRCQ.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FRCQ_SelectMap = @{
    "Select"=@("Select-FRCQForecast",
               "Select-FRCQWhatIfForecast")
}

_awsArgumentCompleterRegistration $FRCQ_SelectCompleters $FRCQ_SelectMap
# Argument completions for service Amazon Fraud Detector


$FD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.FraudDetector.DataSource
        "New-FDVariable/DataSource"
        {
            $v = "EVENT","EXTERNAL_MODEL_SCORE","MODEL_SCORE"
            break
        }

        # Amazon.FraudDetector.DataType
        "New-FDVariable/DataType"
        {
            $v = "BOOLEAN","DATETIME","FLOAT","INTEGER","STRING"
            break
        }

        # Amazon.FraudDetector.DetectorVersionStatus
        "Update-FDDetectorVersionStatus/Status"
        {
            $v = "ACTIVE","DRAFT","INACTIVE"
            break
        }

        # Amazon.FraudDetector.EventIngestion
        "Write-FDEventType/EventIngestion"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.FraudDetector.Language
        {
            ($_ -eq "New-FDRule/Language") -Or
            ($_ -eq "Update-FDRuleVersion/Language")
        }
        {
            $v = "DETECTORPL"
            break
        }

        # Amazon.FraudDetector.ListUpdateMode
        "Update-FDList/UpdateMode"
        {
            $v = "APPEND","REMOVE","REPLACE"
            break
        }

        # Amazon.FraudDetector.ModelEndpointStatus
        "Write-FDExternalModel/ModelEndpointStatus"
        {
            $v = "ASSOCIATED","DISSOCIATED"
            break
        }

        # Amazon.FraudDetector.ModelInputDataFormat
        "Write-FDExternalModel/InputConfiguration_Format"
        {
            $v = "APPLICATION_JSON","TEXT_CSV"
            break
        }

        # Amazon.FraudDetector.ModelOutputDataFormat
        "Write-FDExternalModel/OutputConfiguration_Format"
        {
            $v = "APPLICATION_JSONLINES","TEXT_CSV"
            break
        }

        # Amazon.FraudDetector.ModelSource
        "Write-FDExternalModel/ModelSource"
        {
            $v = "SAGEMAKER"
            break
        }

        # Amazon.FraudDetector.ModelTypeEnum
        {
            ($_ -eq "Get-FDModel/ModelType") -Or
            ($_ -eq "Get-FDModelVersion/ModelType") -Or
            ($_ -eq "Get-FDModelVersionList/ModelType") -Or
            ($_ -eq "New-FDModel/ModelType") -Or
            ($_ -eq "New-FDModelVersion/ModelType") -Or
            ($_ -eq "Remove-FDModel/ModelType") -Or
            ($_ -eq "Remove-FDModelVersion/ModelType") -Or
            ($_ -eq "Update-FDModel/ModelType") -Or
            ($_ -eq "Update-FDModelVersion/ModelType") -Or
            ($_ -eq "Update-FDModelVersionStatus/ModelType")
        }
        {
            $v = "ACCOUNT_TAKEOVER_INSIGHTS","ONLINE_FRAUD_INSIGHTS","TRANSACTION_FRAUD_INSIGHTS"
            break
        }

        # Amazon.FraudDetector.ModelVersionStatus
        "Update-FDModelVersionStatus/Status"
        {
            $v = "ACTIVE","INACTIVE","TRAINING_CANCELLED"
            break
        }

        # Amazon.FraudDetector.RuleExecutionMode
        {
            ($_ -eq "New-FDDetectorVersion/RuleExecutionMode") -Or
            ($_ -eq "Update-FDDetectorVersion/RuleExecutionMode")
        }
        {
            $v = "ALL_MATCHED","FIRST_MATCHED"
            break
        }

        # Amazon.FraudDetector.TrainingDataSourceEnum
        "New-FDModelVersion/TrainingDataSource"
        {
            $v = "EXTERNAL_EVENTS","INGESTED_EVENTS"
            break
        }

        # Amazon.FraudDetector.UnlabeledEventsTreatment
        "New-FDModelVersion/LabelSchema_UnlabeledEventsTreatment"
        {
            $v = "AUTO","FRAUD","IGNORE","LEGIT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FD_map = @{
    "DataSource"=@("New-FDVariable")
    "DataType"=@("New-FDVariable")
    "EventIngestion"=@("Write-FDEventType")
    "InputConfiguration_Format"=@("Write-FDExternalModel")
    "LabelSchema_UnlabeledEventsTreatment"=@("New-FDModelVersion")
    "Language"=@("New-FDRule","Update-FDRuleVersion")
    "ModelEndpointStatus"=@("Write-FDExternalModel")
    "ModelSource"=@("Write-FDExternalModel")
    "ModelType"=@("Get-FDModel","Get-FDModelVersion","Get-FDModelVersionList","New-FDModel","New-FDModelVersion","Remove-FDModel","Remove-FDModelVersion","Update-FDModel","Update-FDModelVersion","Update-FDModelVersionStatus")
    "OutputConfiguration_Format"=@("Write-FDExternalModel")
    "RuleExecutionMode"=@("New-FDDetectorVersion","Update-FDDetectorVersion")
    "Status"=@("Update-FDDetectorVersionStatus","Update-FDModelVersionStatus")
    "TrainingDataSource"=@("New-FDModelVersion")
    "UpdateMode"=@("Update-FDList")
}

_awsArgumentCompleterRegistration $FD_Completers $FD_map

$FD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.FD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FD_SelectMap = @{
    "Select"=@("New-FDVariableBatch",
               "Get-FDVariableBatch",
               "Stop-FDBatchImportJob",
               "Stop-FDBatchPredictionJob",
               "New-FDBatchImportJob",
               "New-FDBatchPredictionJob",
               "New-FDDetectorVersion",
               "New-FDList",
               "New-FDModel",
               "New-FDModelVersion",
               "New-FDRule",
               "New-FDVariable",
               "Remove-FDBatchImportJob",
               "Remove-FDBatchPredictionJob",
               "Remove-FDDetector",
               "Remove-FDDetectorVersion",
               "Remove-FDEntityType",
               "Remove-FDEvent",
               "Remove-FDEventsByEventType",
               "Remove-FDEventType",
               "Remove-FDExternalModel",
               "Remove-FDLabel",
               "Remove-FDList",
               "Remove-FDModel",
               "Remove-FDModelVersion",
               "Remove-FDOutcome",
               "Remove-FDRule",
               "Remove-FDVariable",
               "Get-FDDetectorVersionList",
               "Get-FDModelVersionList",
               "Get-FDBatchImportJob",
               "Get-FDBatchPredictionJob",
               "Get-FDDeleteEventsByEventTypeStatus",
               "Get-FDDetector",
               "Get-FDDetectorVersion",
               "Get-FDEntityType",
               "Get-FDEvent",
               "Get-FDEventPrediction",
               "Get-FDEventPredictionMetadata",
               "Get-FDEventType",
               "Get-FDExternalModel",
               "Get-FDKMSEncryptionKey",
               "Get-FDLabel",
               "Get-FDListElement",
               "Get-FDListsMetadata",
               "Get-FDModel",
               "Get-FDModelVersion",
               "Get-FDOutcome",
               "Get-FDRule",
               "Get-FDVariable",
               "Get-FDEventPredictionList",
               "Get-FDResourceTag",
               "Write-FDDetector",
               "Write-FDEntityType",
               "Write-FDEventType",
               "Write-FDExternalModel",
               "Write-FDKMSEncryptionKey",
               "Write-FDLabel",
               "Write-FDOutcome",
               "Send-FDEvent",
               "Add-FDResourceTag",
               "Remove-FDResourceTag",
               "Update-FDDetectorVersion",
               "Update-FDDetectorVersionMetadata",
               "Update-FDDetectorVersionStatus",
               "Update-FDEventLabel",
               "Update-FDList",
               "Update-FDModel",
               "Update-FDModelVersion",
               "Update-FDModelVersionStatus",
               "Update-FDRuleMetadata",
               "Update-FDRuleVersion",
               "Update-FDVariable")
}

_awsArgumentCompleterRegistration $FD_SelectCompleters $FD_SelectMap
# Argument completions for service AWS Free Tier


$FT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.FT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FT_SelectMap = @{
    "Select"=@("Get-FTFreeTierUsage")
}

_awsArgumentCompleterRegistration $FT_SelectCompleters $FT_SelectMap
# Argument completions for service Amazon FSx


$FSX_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.FSx.AutocommitPeriodType
        {
            ($_ -eq "New-FSXVolume/AutocommitPeriod_Type") -Or
            ($_ -eq "New-FSXVolumeFromBackup/AutocommitPeriod_Type") -Or
            ($_ -eq "Update-FSXVolume/AutocommitPeriod_Type")
        }
        {
            $v = "DAYS","HOURS","MINUTES","MONTHS","NONE","YEARS"
            break
        }

        # Amazon.FSx.DataRepositoryTaskType
        "New-FSXDataRepositoryTask/Type"
        {
            $v = "AUTO_RELEASE_DATA","EXPORT_TO_REPOSITORY","IMPORT_METADATA_FROM_REPOSITORY","RELEASE_DATA_FROM_FILESYSTEM"
            break
        }

        # Amazon.FSx.DiskIopsConfigurationMode
        {
            ($_ -eq "New-FSXFileSystemFromBackup/DiskIopsConfiguration_Mode") -Or
            ($_ -eq "New-FSXFileSystem/OntapConfiguration_DiskIopsConfiguration_Mode") -Or
            ($_ -eq "Update-FSXFileSystem/OntapConfiguration_DiskIopsConfiguration_Mode") -Or
            ($_ -eq "New-FSXFileSystem/OpenZFSConfiguration_DiskIopsConfiguration_Mode") -Or
            ($_ -eq "Update-FSXFileSystem/OpenZFSConfiguration_DiskIopsConfiguration_Mode")
        }
        {
            $v = "AUTOMATIC","USER_PROVISIONED"
            break
        }

        # Amazon.FSx.FileCacheLustreDeploymentType
        "New-FSXFileCache/LustreConfiguration_DeploymentType"
        {
            $v = "CACHE_1"
            break
        }

        # Amazon.FSx.FileCacheType
        "New-FSXFileCache/FileCacheType"
        {
            $v = "LUSTRE"
            break
        }

        # Amazon.FSx.FileSystemType
        "New-FSXFileSystem/FileSystemType"
        {
            $v = "LUSTRE","ONTAP","OPENZFS","WINDOWS"
            break
        }

        # Amazon.FSx.InputOntapVolumeType
        {
            ($_ -eq "New-FSXVolume/OntapConfiguration_OntapVolumeType") -Or
            ($_ -eq "New-FSXVolumeFromBackup/OntapConfiguration_OntapVolumeType")
        }
        {
            $v = "DP","RW"
            break
        }

        # Amazon.FSx.OntapDeploymentType
        "New-FSXFileSystem/OntapConfiguration_DeploymentType"
        {
            $v = "MULTI_AZ_1","MULTI_AZ_2","SINGLE_AZ_1","SINGLE_AZ_2"
            break
        }

        # Amazon.FSx.OpenZFSCopyStrategy
        {
            ($_ -eq "Copy-FSXSnapshotAndUpdateVolume/CopyStrategy") -Or
            ($_ -eq "New-FSXVolume/OriginSnapshot_CopyStrategy")
        }
        {
            $v = "CLONE","FULL_COPY","INCREMENTAL_COPY"
            break
        }

        # Amazon.FSx.OpenZFSDataCompressionType
        {
            ($_ -eq "New-FSXVolume/OpenZFSConfiguration_DataCompressionType") -Or
            ($_ -eq "Update-FSXVolume/OpenZFSConfiguration_DataCompressionType") -Or
            ($_ -eq "New-FSXFileSystem/RootVolumeConfiguration_DataCompressionType") -Or
            ($_ -eq "New-FSXFileSystemFromBackup/RootVolumeConfiguration_DataCompressionType")
        }
        {
            $v = "LZ4","NONE","ZSTD"
            break
        }

        # Amazon.FSx.OpenZFSDeploymentType
        {
            ($_ -eq "New-FSXFileSystem/OpenZFSConfiguration_DeploymentType") -Or
            ($_ -eq "New-FSXFileSystemFromBackup/OpenZFSConfiguration_DeploymentType")
        }
        {
            $v = "MULTI_AZ_1","SINGLE_AZ_1","SINGLE_AZ_2","SINGLE_AZ_HA_1","SINGLE_AZ_HA_2"
            break
        }

        # Amazon.FSx.PrivilegedDelete
        {
            ($_ -eq "New-FSXVolume/SnaplockConfiguration_PrivilegedDelete") -Or
            ($_ -eq "New-FSXVolumeFromBackup/SnaplockConfiguration_PrivilegedDelete") -Or
            ($_ -eq "Update-FSXVolume/SnaplockConfiguration_PrivilegedDelete")
        }
        {
            $v = "DISABLED","ENABLED","PERMANENTLY_DISABLED"
            break
        }

        # Amazon.FSx.ReportFormat
        "New-FSXDataRepositoryTask/Report_Format"
        {
            $v = "REPORT_CSV_20191124"
            break
        }

        # Amazon.FSx.ReportScope
        "New-FSXDataRepositoryTask/Report_Scope"
        {
            $v = "FAILED_FILES_ONLY"
            break
        }

        # Amazon.FSx.RetentionPeriodType
        {
            ($_ -eq "New-FSXVolume/DefaultRetention_Type") -Or
            ($_ -eq "New-FSXVolumeFromBackup/DefaultRetention_Type") -Or
            ($_ -eq "Update-FSXVolume/DefaultRetention_Type") -Or
            ($_ -eq "New-FSXVolume/MaximumRetention_Type") -Or
            ($_ -eq "New-FSXVolumeFromBackup/MaximumRetention_Type") -Or
            ($_ -eq "Update-FSXVolume/MaximumRetention_Type") -Or
            ($_ -eq "New-FSXVolume/MinimumRetention_Type") -Or
            ($_ -eq "New-FSXVolumeFromBackup/MinimumRetention_Type") -Or
            ($_ -eq "Update-FSXVolume/MinimumRetention_Type")
        }
        {
            $v = "DAYS","HOURS","INFINITE","MINUTES","MONTHS","SECONDS","UNSPECIFIED","YEARS"
            break
        }

        # Amazon.FSx.SecurityStyle
        {
            ($_ -eq "New-FSXVolume/OntapConfiguration_SecurityStyle") -Or
            ($_ -eq "New-FSXVolumeFromBackup/OntapConfiguration_SecurityStyle") -Or
            ($_ -eq "Update-FSXVolume/OntapConfiguration_SecurityStyle")
        }
        {
            $v = "MIXED","NTFS","UNIX"
            break
        }

        # Amazon.FSx.SnaplockType
        {
            ($_ -eq "New-FSXVolume/SnaplockConfiguration_SnaplockType") -Or
            ($_ -eq "New-FSXVolumeFromBackup/SnaplockConfiguration_SnaplockType")
        }
        {
            $v = "COMPLIANCE","ENTERPRISE"
            break
        }

        # Amazon.FSx.StorageType
        {
            ($_ -eq "New-FSXFileSystem/StorageType") -Or
            ($_ -eq "New-FSXFileSystemFromBackup/StorageType") -Or
            ($_ -eq "Update-FSXFileSystem/StorageType")
        }
        {
            $v = "HDD","SSD"
            break
        }

        # Amazon.FSx.StorageVirtualMachineRootVolumeSecurityStyle
        "New-FSXStorageVirtualMachine/RootVolumeSecurityStyle"
        {
            $v = "MIXED","NTFS","UNIX"
            break
        }

        # Amazon.FSx.TieringPolicyName
        {
            ($_ -eq "New-FSXVolume/TieringPolicy_Name") -Or
            ($_ -eq "New-FSXVolumeFromBackup/TieringPolicy_Name") -Or
            ($_ -eq "Update-FSXVolume/TieringPolicy_Name")
        }
        {
            $v = "ALL","AUTO","NONE","SNAPSHOT_ONLY"
            break
        }

        # Amazon.FSx.Unit
        "New-FSXDataRepositoryTask/DurationSinceLastAccess_Unit"
        {
            $v = "DAYS"
            break
        }

        # Amazon.FSx.VolumeStyle
        {
            ($_ -eq "New-FSXVolume/OntapConfiguration_VolumeStyle") -Or
            ($_ -eq "New-FSXVolumeFromBackup/OntapConfiguration_VolumeStyle")
        }
        {
            $v = "FLEXGROUP","FLEXVOL"
            break
        }

        # Amazon.FSx.VolumeType
        "New-FSXVolume/VolumeType"
        {
            $v = "ONTAP","OPENZFS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FSX_map = @{
    "AutocommitPeriod_Type"=@("New-FSXVolume","New-FSXVolumeFromBackup","Update-FSXVolume")
    "CopyStrategy"=@("Copy-FSXSnapshotAndUpdateVolume")
    "DefaultRetention_Type"=@("New-FSXVolume","New-FSXVolumeFromBackup","Update-FSXVolume")
    "DiskIopsConfiguration_Mode"=@("New-FSXFileSystemFromBackup")
    "DurationSinceLastAccess_Unit"=@("New-FSXDataRepositoryTask")
    "FileCacheType"=@("New-FSXFileCache")
    "FileSystemType"=@("New-FSXFileSystem")
    "LustreConfiguration_DeploymentType"=@("New-FSXFileCache")
    "MaximumRetention_Type"=@("New-FSXVolume","New-FSXVolumeFromBackup","Update-FSXVolume")
    "MinimumRetention_Type"=@("New-FSXVolume","New-FSXVolumeFromBackup","Update-FSXVolume")
    "OntapConfiguration_DeploymentType"=@("New-FSXFileSystem")
    "OntapConfiguration_DiskIopsConfiguration_Mode"=@("New-FSXFileSystem","Update-FSXFileSystem")
    "OntapConfiguration_OntapVolumeType"=@("New-FSXVolume","New-FSXVolumeFromBackup")
    "OntapConfiguration_SecurityStyle"=@("New-FSXVolume","New-FSXVolumeFromBackup","Update-FSXVolume")
    "OntapConfiguration_VolumeStyle"=@("New-FSXVolume","New-FSXVolumeFromBackup")
    "OpenZFSConfiguration_DataCompressionType"=@("New-FSXVolume","Update-FSXVolume")
    "OpenZFSConfiguration_DeploymentType"=@("New-FSXFileSystem","New-FSXFileSystemFromBackup")
    "OpenZFSConfiguration_DiskIopsConfiguration_Mode"=@("New-FSXFileSystem","Update-FSXFileSystem")
    "OriginSnapshot_CopyStrategy"=@("New-FSXVolume")
    "Report_Format"=@("New-FSXDataRepositoryTask")
    "Report_Scope"=@("New-FSXDataRepositoryTask")
    "RootVolumeConfiguration_DataCompressionType"=@("New-FSXFileSystem","New-FSXFileSystemFromBackup")
    "RootVolumeSecurityStyle"=@("New-FSXStorageVirtualMachine")
    "SnaplockConfiguration_PrivilegedDelete"=@("New-FSXVolume","New-FSXVolumeFromBackup","Update-FSXVolume")
    "SnaplockConfiguration_SnaplockType"=@("New-FSXVolume","New-FSXVolumeFromBackup")
    "StorageType"=@("New-FSXFileSystem","New-FSXFileSystemFromBackup","Update-FSXFileSystem")
    "TieringPolicy_Name"=@("New-FSXVolume","New-FSXVolumeFromBackup","Update-FSXVolume")
    "Type"=@("New-FSXDataRepositoryTask")
    "VolumeType"=@("New-FSXVolume")
}

_awsArgumentCompleterRegistration $FSX_Completers $FSX_map

$FSX_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.FSX.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$FSX_SelectMap = @{
    "Select"=@("Register-FSXFileSystemAlias",
               "Stop-FSXDataRepositoryTask",
               "Copy-FSXBackup",
               "Copy-FSXSnapshotAndUpdateVolume",
               "New-FSXBackup",
               "New-FSXDataRepositoryAssociation",
               "New-FSXDataRepositoryTask",
               "New-FSXFileCache",
               "New-FSXFileSystem",
               "New-FSXFileSystemFromBackup",
               "New-FSXSnapshot",
               "New-FSXStorageVirtualMachine",
               "New-FSXVolume",
               "New-FSXVolumeFromBackup",
               "Remove-FSXBackup",
               "Remove-FSXDataRepositoryAssociation",
               "Remove-FSXFileCache",
               "Remove-FSXFileSystem",
               "Remove-FSXSnapshot",
               "Remove-FSXStorageVirtualMachine",
               "Remove-FSXVolume",
               "Get-FSXBackup",
               "Get-FSXDataRepositoryAssociation",
               "Get-FSXDataRepositoryTask",
               "Get-FSXFileCach",
               "Get-FSXFileSystemAlias",
               "Get-FSXFileSystem",
               "Get-FSXSharedVpcConfiguration",
               "Get-FSXSnapshot",
               "Get-FSXStorageVirtualMachine",
               "Get-FSXVolume",
               "Unregister-FSXFileSystemAlias",
               "Get-FSXResourceTagList",
               "Clear-FSXFileSystemNfsV3Lock",
               "Restore-FSXVolumeFromSnapshot",
               "Start-FSXMisconfiguredStateRecovery",
               "Add-FSXResourceTag",
               "Remove-FSXResourceTag",
               "Update-FSXDataRepositoryAssociation",
               "Update-FSXFileCache",
               "Update-FSXFileSystem",
               "Update-FSXSharedVpcConfiguration",
               "Update-FSXSnapshot",
               "Update-FSXStorageVirtualMachine",
               "Update-FSXVolume")
}

_awsArgumentCompleterRegistration $FSX_SelectCompleters $FSX_SelectMap
# Argument completions for service Amazon GameLift Service


$GML_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.GameLift.AcceptanceType
        "Confirm-GMLMatch/AcceptanceType"
        {
            $v = "ACCEPT","REJECT"
            break
        }

        # Amazon.GameLift.BackfillMode
        {
            ($_ -eq "New-GMLMatchmakingConfiguration/BackfillMode") -Or
            ($_ -eq "Update-GMLMatchmakingConfiguration/BackfillMode")
        }
        {
            $v = "AUTOMATIC","MANUAL"
            break
        }

        # Amazon.GameLift.BalancingStrategy
        {
            ($_ -eq "New-GMLGameServerGroup/BalancingStrategy") -Or
            ($_ -eq "Update-GMLGameServerGroup/BalancingStrategy")
        }
        {
            $v = "ON_DEMAND_ONLY","SPOT_ONLY","SPOT_PREFERRED"
            break
        }

        # Amazon.GameLift.BuildStatus
        "Get-GMLBuild/Status"
        {
            $v = "FAILED","INITIALIZED","READY"
            break
        }

        # Amazon.GameLift.CertificateType
        "New-GMLFleet/CertificateConfiguration_CertificateType"
        {
            $v = "DISABLED","GENERATED"
            break
        }

        # Amazon.GameLift.ComparisonOperatorType
        "Write-GMLScalingPolicy/ComparisonOperator"
        {
            $v = "GreaterThanOrEqualToThreshold","GreaterThanThreshold","LessThanOrEqualToThreshold","LessThanThreshold"
            break
        }

        # Amazon.GameLift.ComputeType
        "New-GMLFleet/ComputeType"
        {
            $v = "ANYWHERE","CONTAINER","EC2"
            break
        }

        # Amazon.GameLift.ContainerOperatingSystem
        "New-GMLContainerGroupDefinition/OperatingSystem"
        {
            $v = "AMAZON_LINUX_2023"
            break
        }

        # Amazon.GameLift.ContainerSchedulingStrategy
        {
            ($_ -eq "Get-GMLContainerGroupDefinitionList/SchedulingStrategy") -Or
            ($_ -eq "New-GMLContainerGroupDefinition/SchedulingStrategy")
        }
        {
            $v = "DAEMON","REPLICA"
            break
        }

        # Amazon.GameLift.EC2InstanceType
        {
            ($_ -eq "Get-GMLEC2InstanceLimit/EC2InstanceType") -Or
            ($_ -eq "New-GMLFleet/EC2InstanceType")
        }
        {
            $v = "c3.2xlarge","c3.4xlarge","c3.8xlarge","c3.large","c3.xlarge","c4.2xlarge","c4.4xlarge","c4.8xlarge","c4.large","c4.xlarge","c5.12xlarge","c5.18xlarge","c5.24xlarge","c5.2xlarge","c5.4xlarge","c5.9xlarge","c5.large","c5.xlarge","c5a.12xlarge","c5a.16xlarge","c5a.24xlarge","c5a.2xlarge","c5a.4xlarge","c5a.8xlarge","c5a.large","c5a.xlarge","c5d.12xlarge","c5d.18xlarge","c5d.24xlarge","c5d.2xlarge","c5d.4xlarge","c5d.9xlarge","c5d.large","c5d.xlarge","c6a.12xlarge","c6a.16xlarge","c6a.24xlarge","c6a.2xlarge","c6a.4xlarge","c6a.8xlarge","c6a.large","c6a.xlarge","c6g.12xlarge","c6g.16xlarge","c6g.2xlarge","c6g.4xlarge","c6g.8xlarge","c6g.large","c6g.medium","c6g.xlarge","c6gn.12xlarge","c6gn.16xlarge","c6gn.2xlarge","c6gn.4xlarge","c6gn.8xlarge","c6gn.large","c6gn.medium","c6gn.xlarge","c6i.12xlarge","c6i.16xlarge","c6i.24xlarge","c6i.2xlarge","c6i.4xlarge","c6i.8xlarge","c6i.large","c6i.xlarge","c7g.12xlarge","c7g.16xlarge","c7g.2xlarge","c7g.4xlarge","c7g.8xlarge","c7g.large","c7g.medium","c7g.xlarge","g5g.16xlarge","g5g.2xlarge","g5g.4xlarge","g5g.8xlarge","g5g.xlarge","m3.2xlarge","m3.large","m3.medium","m3.xlarge","m4.10xlarge","m4.2xlarge","m4.4xlarge","m4.large","m4.xlarge","m5.12xlarge","m5.16xlarge","m5.24xlarge","m5.2xlarge","m5.4xlarge","m5.8xlarge","m5.large","m5.xlarge","m5a.12xlarge","m5a.16xlarge","m5a.24xlarge","m5a.2xlarge","m5a.4xlarge","m5a.8xlarge","m5a.large","m5a.xlarge","m6g.12xlarge","m6g.16xlarge","m6g.2xlarge","m6g.4xlarge","m6g.8xlarge","m6g.large","m6g.medium","m6g.xlarge","m7g.12xlarge","m7g.16xlarge","m7g.2xlarge","m7g.4xlarge","m7g.8xlarge","m7g.large","m7g.medium","m7g.xlarge","r3.2xlarge","r3.4xlarge","r3.8xlarge","r3.large","r3.xlarge","r4.16xlarge","r4.2xlarge","r4.4xlarge","r4.8xlarge","r4.large","r4.xlarge","r5.12xlarge","r5.16xlarge","r5.24xlarge","r5.2xlarge","r5.4xlarge","r5.8xlarge","r5.large","r5.xlarge","r5a.12xlarge","r5a.16xlarge","r5a.24xlarge","r5a.2xlarge","r5a.4xlarge","r5a.8xlarge","r5a.large","r5a.xlarge","r5d.12xlarge","r5d.16xlarge","r5d.24xlarge","r5d.2xlarge","r5d.4xlarge","r5d.8xlarge","r5d.large","r5d.xlarge","r6g.12xlarge","r6g.16xlarge","r6g.2xlarge","r6g.4xlarge","r6g.8xlarge","r6g.large","r6g.medium","r6g.xlarge","r7g.12xlarge","r7g.16xlarge","r7g.2xlarge","r7g.4xlarge","r7g.8xlarge","r7g.large","r7g.medium","r7g.xlarge","t2.large","t2.medium","t2.micro","t2.small"
            break
        }

        # Amazon.GameLift.FleetType
        "New-GMLFleet/FleetType"
        {
            $v = "ON_DEMAND","SPOT"
            break
        }

        # Amazon.GameLift.FlexMatchMode
        {
            ($_ -eq "New-GMLMatchmakingConfiguration/FlexMatchMode") -Or
            ($_ -eq "Update-GMLMatchmakingConfiguration/FlexMatchMode")
        }
        {
            $v = "STANDALONE","WITH_QUEUE"
            break
        }

        # Amazon.GameLift.GameServerGroupDeleteOption
        "Remove-GMLGameServerGroup/DeleteOption"
        {
            $v = "FORCE_DELETE","RETAIN","SAFE_DELETE"
            break
        }

        # Amazon.GameLift.GameServerHealthCheck
        "Update-GMLGameServer/HealthCheck"
        {
            $v = "HEALTHY"
            break
        }

        # Amazon.GameLift.GameServerProtectionPolicy
        {
            ($_ -eq "New-GMLGameServerGroup/GameServerProtectionPolicy") -Or
            ($_ -eq "Update-GMLGameServerGroup/GameServerProtectionPolicy")
        }
        {
            $v = "FULL_PROTECTION","NO_PROTECTION"
            break
        }

        # Amazon.GameLift.GameServerUtilizationStatus
        "Update-GMLGameServer/UtilizationStatus"
        {
            $v = "AVAILABLE","UTILIZED"
            break
        }

        # Amazon.GameLift.InstanceRoleCredentialsProvider
        "New-GMLFleet/InstanceRoleCredentialsProvider"
        {
            $v = "SHARED_CREDENTIAL_FILE"
            break
        }

        # Amazon.GameLift.MetricName
        "Write-GMLScalingPolicy/MetricName"
        {
            $v = "ActivatingGameSessions","ActiveGameSessions","ActiveInstances","AvailableGameSessions","AvailablePlayerSessions","ConcurrentActivatableGameSessions","CurrentPlayerSessions","IdleInstances","PercentAvailableGameSessions","PercentIdleInstances","QueueDepth","WaitTime"
            break
        }

        # Amazon.GameLift.OperatingSystem
        "New-GMLBuild/OperatingSystem"
        {
            $v = "AMAZON_LINUX","AMAZON_LINUX_2","AMAZON_LINUX_2023","WINDOWS_2012","WINDOWS_2016"
            break
        }

        # Amazon.GameLift.PlayerSessionCreationPolicy
        "Update-GMLGameSession/PlayerSessionCreationPolicy"
        {
            $v = "ACCEPT_ALL","DENY_ALL"
            break
        }

        # Amazon.GameLift.PolicyType
        "Write-GMLScalingPolicy/PolicyType"
        {
            $v = "RuleBased","TargetBased"
            break
        }

        # Amazon.GameLift.ProtectionPolicy
        {
            ($_ -eq "New-GMLFleet/NewGameSessionProtectionPolicy") -Or
            ($_ -eq "Update-GMLFleetAttribute/NewGameSessionProtectionPolicy") -Or
            ($_ -eq "Update-GMLGameSession/ProtectionPolicy")
        }
        {
            $v = "FullProtection","NoProtection"
            break
        }

        # Amazon.GameLift.RoutingStrategyType
        {
            ($_ -eq "New-GMLAlias/RoutingStrategy_Type") -Or
            ($_ -eq "Update-GMLAlias/RoutingStrategy_Type") -Or
            ($_ -eq "Get-GMLAlias/RoutingStrategyType")
        }
        {
            $v = "SIMPLE","TERMINAL"
            break
        }

        # Amazon.GameLift.ScalingAdjustmentType
        "Write-GMLScalingPolicy/ScalingAdjustmentType"
        {
            $v = "ChangeInCapacity","ExactCapacity","PercentChangeInCapacity"
            break
        }

        # Amazon.GameLift.ScalingStatusType
        "Get-GMLScalingPolicy/StatusFilter"
        {
            $v = "ACTIVE","DELETED","DELETE_REQUESTED","DELETING","ERROR","UPDATE_REQUESTED","UPDATING"
            break
        }

        # Amazon.GameLift.SortOrder
        "Get-GMLGameServerList/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GML_map = @{
    "AcceptanceType"=@("Confirm-GMLMatch")
    "BackfillMode"=@("New-GMLMatchmakingConfiguration","Update-GMLMatchmakingConfiguration")
    "BalancingStrategy"=@("New-GMLGameServerGroup","Update-GMLGameServerGroup")
    "CertificateConfiguration_CertificateType"=@("New-GMLFleet")
    "ComparisonOperator"=@("Write-GMLScalingPolicy")
    "ComputeType"=@("New-GMLFleet")
    "DeleteOption"=@("Remove-GMLGameServerGroup")
    "EC2InstanceType"=@("Get-GMLEC2InstanceLimit","New-GMLFleet")
    "FleetType"=@("New-GMLFleet")
    "FlexMatchMode"=@("New-GMLMatchmakingConfiguration","Update-GMLMatchmakingConfiguration")
    "GameServerProtectionPolicy"=@("New-GMLGameServerGroup","Update-GMLGameServerGroup")
    "HealthCheck"=@("Update-GMLGameServer")
    "InstanceRoleCredentialsProvider"=@("New-GMLFleet")
    "MetricName"=@("Write-GMLScalingPolicy")
    "NewGameSessionProtectionPolicy"=@("New-GMLFleet","Update-GMLFleetAttribute")
    "OperatingSystem"=@("New-GMLBuild","New-GMLContainerGroupDefinition")
    "PlayerSessionCreationPolicy"=@("Update-GMLGameSession")
    "PolicyType"=@("Write-GMLScalingPolicy")
    "ProtectionPolicy"=@("Update-GMLGameSession")
    "RoutingStrategy_Type"=@("New-GMLAlias","Update-GMLAlias")
    "RoutingStrategyType"=@("Get-GMLAlias")
    "ScalingAdjustmentType"=@("Write-GMLScalingPolicy")
    "SchedulingStrategy"=@("Get-GMLContainerGroupDefinitionList","New-GMLContainerGroupDefinition")
    "SortOrder"=@("Get-GMLGameServerList")
    "Status"=@("Get-GMLBuild")
    "StatusFilter"=@("Get-GMLScalingPolicy")
    "UtilizationStatus"=@("Update-GMLGameServer")
}

_awsArgumentCompleterRegistration $GML_Completers $GML_map

$GML_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GML.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GML_SelectMap = @{
    "Select"=@("Confirm-GMLMatch",
               "Request-GMLGameServer",
               "New-GMLAlias",
               "New-GMLBuild",
               "New-GMLContainerGroupDefinition",
               "New-GMLFleet",
               "New-GMLFleetLocation",
               "New-GMLGameServerGroup",
               "New-GMLGameSession",
               "New-GMLGameSessionQueue",
               "New-GMLLocation",
               "New-GMLMatchmakingConfiguration",
               "New-GMLMatchmakingRuleSet",
               "New-GMLPlayerSession",
               "New-GMLScript",
               "New-GMLVpcPeeringAuthorization",
               "New-GMLVpcPeeringConnection",
               "Remove-GMLAlias",
               "Remove-GMLBuild",
               "Remove-GMLContainerGroupDefinition",
               "Remove-GMLFleet",
               "Remove-GMLFleetLocation",
               "Remove-GMLGameServerGroup",
               "Remove-GMLGameSessionQueue",
               "Remove-GMLLocation",
               "Remove-GMLMatchmakingConfiguration",
               "Remove-GMLMatchmakingRuleSet",
               "Remove-GMLScalingPolicy",
               "Remove-GMLScript",
               "Remove-GMLVpcPeeringAuthorization",
               "Remove-GMLVpcPeeringConnection",
               "Unregister-GMLCompute",
               "Unregister-GMLGameServer",
               "Get-GMLAliasDetail",
               "Get-GMLBuildDetail",
               "Get-GMLCompute",
               "Get-GMLContainerGroupDefinition",
               "Get-GMLEC2InstanceLimit",
               "Get-GMLFleetAttribute",
               "Get-GMLFleetCapacity",
               "Get-GMLFleetEvent",
               "Get-GMLFleetLocationAttribute",
               "Get-GMLFleetLocationCapacity",
               "Get-GMLFleetLocationUtilization",
               "Get-GMLFleetPortSetting",
               "Get-GMLFleetUtilization",
               "Get-GMLGameServer",
               "Get-GMLGameServerGroup",
               "Get-GMLGameServerInstance",
               "Get-GMLGameSessionDetail",
               "Get-GMLGameSessionPlacement",
               "Get-GMLGameSessionQueue",
               "Get-GMLGameSession",
               "Get-GMLInstance",
               "Get-GMLMatchmaking",
               "Get-GMLMatchmakingConfiguration",
               "Get-GMLMatchmakingRuleSet",
               "Get-GMLPlayerSession",
               "Get-GMLRuntimeConfiguration",
               "Get-GMLScalingPolicy",
               "Get-GMLScript",
               "Get-GMLVpcPeeringAuthorization",
               "Get-GMLVpcPeeringConnection",
               "Get-GMLComputeAccess",
               "Get-GMLComputeAuthToken",
               "Get-GMLGameSessionLogUrl",
               "Get-GMLInstanceAccess",
               "Get-GMLAlias",
               "Get-GMLBuild",
               "Get-GMLComputeList",
               "Get-GMLContainerGroupDefinitionList",
               "Get-GMLFleet",
               "Get-GMLGameServerGroupList",
               "Get-GMLGameServerList",
               "Get-GMLLocationList",
               "Get-GMLScriptList",
               "Get-GMLResourceTag",
               "Write-GMLScalingPolicy",
               "Register-GMLCompute",
               "Register-GMLGameServer",
               "Request-GMLUploadCredential",
               "Resolve-GMLAlias",
               "Resume-GMLGameServerGroup",
               "Find-GMLGameSession",
               "Start-GMLFleetAction",
               "Start-GMLGameSessionPlacement",
               "Start-GMLMatchBackfill",
               "Start-GMLMatchmaking",
               "Stop-GMLFleetAction",
               "Stop-GMLGameSessionPlacement",
               "Stop-GMLMatchmaking",
               "Suspend-GMLGameServerGroup",
               "Add-GMLResourceTag",
               "Remove-GMLResourceTag",
               "Update-GMLAlias",
               "Update-GMLBuild",
               "Update-GMLFleetAttribute",
               "Update-GMLFleetCapacity",
               "Update-GMLFleetPortSetting",
               "Update-GMLGameServer",
               "Update-GMLGameServerGroup",
               "Update-GMLGameSession",
               "Update-GMLGameSessionQueue",
               "Update-GMLMatchmakingConfiguration",
               "Update-GMLRuntimeConfiguration",
               "Update-GMLScript",
               "Test-GMLMatchmakingRuleSetValidity")
}

_awsArgumentCompleterRegistration $GML_SelectCompleters $GML_SelectMap
# Argument completions for service Amazon Location Service Maps V2


$GEOM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.GeoMaps.ColorScheme
        {
            ($_ -eq "Get-GEOMSprite/ColorScheme") -Or
            ($_ -eq "Get-GEOMStyleDescriptor/ColorScheme")
        }
        {
            $v = "Dark","Light"
            break
        }

        # Amazon.GeoMaps.MapStyle
        {
            ($_ -eq "Get-GEOMSprite/Style") -Or
            ($_ -eq "Get-GEOMStyleDescriptor/Style")
        }
        {
            $v = "Hybrid","Monochrome","Satellite","Standard"
            break
        }

        # Amazon.GeoMaps.ScaleBarUnit
        "Get-GEOMStaticMap/ScaleBarUnit"
        {
            $v = "Kilometers","KilometersMiles","Miles","MilesKilometers"
            break
        }

        # Amazon.GeoMaps.StaticMapStyle
        "Get-GEOMStaticMap/Style"
        {
            $v = "Satellite"
            break
        }

        # Amazon.GeoMaps.Variant
        "Get-GEOMSprite/Variant"
        {
            $v = "Default"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GEOM_map = @{
    "ColorScheme"=@("Get-GEOMSprite","Get-GEOMStyleDescriptor")
    "ScaleBarUnit"=@("Get-GEOMStaticMap")
    "Style"=@("Get-GEOMSprite","Get-GEOMStaticMap","Get-GEOMStyleDescriptor")
    "Variant"=@("Get-GEOMSprite")
}

_awsArgumentCompleterRegistration $GEOM_Completers $GEOM_map

$GEOM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GEOM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GEOM_SelectMap = @{
    "Select"=@("Get-GEOMGlyph",
               "Get-GEOMSprite",
               "Get-GEOMStaticMap",
               "Get-GEOMStyleDescriptor",
               "Get-GEOMTile")
}

_awsArgumentCompleterRegistration $GEOM_SelectCompleters $GEOM_SelectMap
# Argument completions for service Amazon Location Service Places V2


$GEOP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.GeoPlaces.AutocompleteIntendedUse
        "Invoke-GEOPAutocomplete/IntendedUse"
        {
            $v = "SingleUse"
            break
        }

        # Amazon.GeoPlaces.GeocodeIntendedUse
        "Invoke-GEOPGeocode/IntendedUse"
        {
            $v = "SingleUse","Storage"
            break
        }

        # Amazon.GeoPlaces.GetPlaceIntendedUse
        "Get-GEOPPlace/IntendedUse"
        {
            $v = "SingleUse","Storage"
            break
        }

        # Amazon.GeoPlaces.PostalCodeMode
        "Invoke-GEOPAutocomplete/PostalCodeMode"
        {
            $v = "EnumerateSpannedLocalities","MergeAllSpannedLocalities"
            break
        }

        # Amazon.GeoPlaces.ReverseGeocodeIntendedUse
        "Invoke-GEOPReverseGeocode/IntendedUse"
        {
            $v = "SingleUse","Storage"
            break
        }

        # Amazon.GeoPlaces.SearchNearbyIntendedUse
        "Search-GEOPNearby/IntendedUse"
        {
            $v = "SingleUse","Storage"
            break
        }

        # Amazon.GeoPlaces.SearchTextIntendedUse
        "Search-GEOPText/IntendedUse"
        {
            $v = "SingleUse","Storage"
            break
        }

        # Amazon.GeoPlaces.SuggestIntendedUse
        "Invoke-GEOPSuggest/IntendedUse"
        {
            $v = "SingleUse"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GEOP_map = @{
    "IntendedUse"=@("Get-GEOPPlace","Invoke-GEOPAutocomplete","Invoke-GEOPGeocode","Invoke-GEOPReverseGeocode","Invoke-GEOPSuggest","Search-GEOPNearby","Search-GEOPText")
    "PostalCodeMode"=@("Invoke-GEOPAutocomplete")
}

_awsArgumentCompleterRegistration $GEOP_Completers $GEOP_map

$GEOP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GEOP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GEOP_SelectMap = @{
    "Select"=@("Invoke-GEOPAutocomplete",
               "Invoke-GEOPGeocode",
               "Get-GEOPPlace",
               "Invoke-GEOPReverseGeocode",
               "Search-GEOPNearby",
               "Search-GEOPText",
               "Invoke-GEOPSuggest")
}

_awsArgumentCompleterRegistration $GEOP_SelectCompleters $GEOP_SelectMap
# Argument completions for service Amazon Location Service Routes V2


$GEOR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.GeoRoutes.DayOfWeek
        {
            ($_ -eq "Get-GEOROptimizedWaypoint/From_DayOfWeek") -Or
            ($_ -eq "Get-GEOROptimizedWaypoint/To_DayOfWeek")
        }
        {
            $v = "Friday","Monday","Saturday","Sunday","Thursday","Tuesday","Wednesday"
            break
        }

        # Amazon.GeoRoutes.GeometryFormat
        {
            ($_ -eq "Get-GEORIsoline/IsolineGeometryFormat") -Or
            ($_ -eq "Get-GEORRoute/LegGeometryFormat") -Or
            ($_ -eq "Get-GEORSnappedRoad/SnappedGeometryFormat")
        }
        {
            $v = "FlexiblePolyline","Simple"
            break
        }

        # Amazon.GeoRoutes.IsolineEngineType
        {
            ($_ -eq "Get-GEORIsoline/Car_EngineType") -Or
            ($_ -eq "Get-GEORIsoline/Scooter_EngineType") -Or
            ($_ -eq "Get-GEORIsoline/Truck_EngineType")
        }
        {
            $v = "Electric","InternalCombustion","PluginHybrid"
            break
        }

        # Amazon.GeoRoutes.IsolineOptimizationObjective
        "Get-GEORIsoline/OptimizeIsolineFor"
        {
            $v = "AccurateCalculation","BalancedCalculation","FastCalculation"
            break
        }

        # Amazon.GeoRoutes.IsolineTravelMode
        "Get-GEORIsoline/TravelMode"
        {
            $v = "Car","Pedestrian","Scooter","Truck"
            break
        }

        # Amazon.GeoRoutes.IsolineTruckType
        "Get-GEORIsoline/Truck_TruckType"
        {
            $v = "LightTruck","StraightTruck","Tractor"
            break
        }

        # Amazon.GeoRoutes.MatchingStrategy
        {
            ($_ -eq "Get-GEORIsoline/DestinationOptions_Matching_Strategy") -Or
            ($_ -eq "Get-GEORRoute/DestinationOptions_Matching_Strategy") -Or
            ($_ -eq "Get-GEORIsoline/OriginOptions_Matching_Strategy") -Or
            ($_ -eq "Get-GEORRoute/OriginOptions_Matching_Strategy")
        }
        {
            $v = "MatchAny","MatchMostSignificantRoad"
            break
        }

        # Amazon.GeoRoutes.MeasurementSystem
        "Get-GEORRoute/InstructionsMeasurementSystem"
        {
            $v = "Imperial","Metric"
            break
        }

        # Amazon.GeoRoutes.RoadSnapTravelMode
        "Get-GEORSnappedRoad/TravelMode"
        {
            $v = "Car","Pedestrian","Scooter","Truck"
            break
        }

        # Amazon.GeoRoutes.RouteEngineType
        {
            ($_ -eq "Get-GEORRoute/Car_EngineType") -Or
            ($_ -eq "Get-GEORRoute/Scooter_EngineType") -Or
            ($_ -eq "Get-GEORRoute/Truck_EngineType")
        }
        {
            $v = "Electric","InternalCombustion","PluginHybrid"
            break
        }

        # Amazon.GeoRoutes.RouteMatrixTravelMode
        "Get-GEORRouteMatrix/TravelMode"
        {
            $v = "Car","Pedestrian","Scooter","Truck"
            break
        }

        # Amazon.GeoRoutes.RouteMatrixTruckType
        "Get-GEORRouteMatrix/Truck_TruckType"
        {
            $v = "LightTruck","StraightTruck","Tractor"
            break
        }

        # Amazon.GeoRoutes.RouteTollVehicleCategory
        "Get-GEORRoute/Tolls_VehicleCategory"
        {
            $v = "Minibus"
            break
        }

        # Amazon.GeoRoutes.RouteTravelMode
        "Get-GEORRoute/TravelMode"
        {
            $v = "Car","Pedestrian","Scooter","Truck"
            break
        }

        # Amazon.GeoRoutes.RouteTravelStepType
        "Get-GEORRoute/TravelStepType"
        {
            $v = "Default","TurnByTurn"
            break
        }

        # Amazon.GeoRoutes.RouteTruckType
        "Get-GEORRoute/Truck_TruckType"
        {
            $v = "LightTruck","StraightTruck","Tractor"
            break
        }

        # Amazon.GeoRoutes.RoutingObjective
        {
            ($_ -eq "Get-GEORIsoline/OptimizeRoutingFor") -Or
            ($_ -eq "Get-GEORRoute/OptimizeRoutingFor") -Or
            ($_ -eq "Get-GEORRouteMatrix/OptimizeRoutingFor")
        }
        {
            $v = "FastestRoute","ShortestRoute"
            break
        }

        # Amazon.GeoRoutes.SideOfStreetMatchingStrategy
        {
            ($_ -eq "Get-GEORIsoline/DestinationOptions_SideOfStreet_UseWith") -Or
            ($_ -eq "Get-GEORRoute/DestinationOptions_SideOfStreet_UseWith") -Or
            ($_ -eq "Get-GEORIsoline/OriginOptions_SideOfStreet_UseWith") -Or
            ($_ -eq "Get-GEORRoute/OriginOptions_SideOfStreet_UseWith") -Or
            ($_ -eq "Get-GEOROptimizedWaypoint/SideOfStreet_UseWith")
        }
        {
            $v = "AnyStreet","DividedStreetOnly"
            break
        }

        # Amazon.GeoRoutes.TrafficUsage
        {
            ($_ -eq "Get-GEORIsoline/Traffic_Usage") -Or
            ($_ -eq "Get-GEOROptimizedWaypoint/Traffic_Usage") -Or
            ($_ -eq "Get-GEORRoute/Traffic_Usage") -Or
            ($_ -eq "Get-GEORRouteMatrix/Traffic_Usage")
        }
        {
            $v = "IgnoreTrafficData","UseTrafficData"
            break
        }

        # Amazon.GeoRoutes.WaypointOptimizationSequencingObjective
        "Get-GEOROptimizedWaypoint/OptimizeSequencingFor"
        {
            $v = "FastestRoute","ShortestRoute"
            break
        }

        # Amazon.GeoRoutes.WaypointOptimizationServiceTimeTreatment
        "Get-GEOROptimizedWaypoint/Driver_TreatServiceTimeAs"
        {
            $v = "Rest","Work"
            break
        }

        # Amazon.GeoRoutes.WaypointOptimizationTravelMode
        "Get-GEOROptimizedWaypoint/TravelMode"
        {
            $v = "Car","Pedestrian","Scooter","Truck"
            break
        }

        # Amazon.GeoRoutes.WaypointOptimizationTruckType
        "Get-GEOROptimizedWaypoint/Truck_TruckType"
        {
            $v = "StraightTruck","Tractor"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GEOR_map = @{
    "Car_EngineType"=@("Get-GEORIsoline","Get-GEORRoute")
    "DestinationOptions_Matching_Strategy"=@("Get-GEORIsoline","Get-GEORRoute")
    "DestinationOptions_SideOfStreet_UseWith"=@("Get-GEORIsoline","Get-GEORRoute")
    "Driver_TreatServiceTimeAs"=@("Get-GEOROptimizedWaypoint")
    "From_DayOfWeek"=@("Get-GEOROptimizedWaypoint")
    "InstructionsMeasurementSystem"=@("Get-GEORRoute")
    "IsolineGeometryFormat"=@("Get-GEORIsoline")
    "LegGeometryFormat"=@("Get-GEORRoute")
    "OptimizeIsolineFor"=@("Get-GEORIsoline")
    "OptimizeRoutingFor"=@("Get-GEORIsoline","Get-GEORRoute","Get-GEORRouteMatrix")
    "OptimizeSequencingFor"=@("Get-GEOROptimizedWaypoint")
    "OriginOptions_Matching_Strategy"=@("Get-GEORIsoline","Get-GEORRoute")
    "OriginOptions_SideOfStreet_UseWith"=@("Get-GEORIsoline","Get-GEORRoute")
    "Scooter_EngineType"=@("Get-GEORIsoline","Get-GEORRoute")
    "SideOfStreet_UseWith"=@("Get-GEOROptimizedWaypoint")
    "SnappedGeometryFormat"=@("Get-GEORSnappedRoad")
    "To_DayOfWeek"=@("Get-GEOROptimizedWaypoint")
    "Tolls_VehicleCategory"=@("Get-GEORRoute")
    "Traffic_Usage"=@("Get-GEORIsoline","Get-GEOROptimizedWaypoint","Get-GEORRoute","Get-GEORRouteMatrix")
    "TravelMode"=@("Get-GEORIsoline","Get-GEOROptimizedWaypoint","Get-GEORRoute","Get-GEORRouteMatrix","Get-GEORSnappedRoad")
    "TravelStepType"=@("Get-GEORRoute")
    "Truck_EngineType"=@("Get-GEORIsoline","Get-GEORRoute")
    "Truck_TruckType"=@("Get-GEORIsoline","Get-GEOROptimizedWaypoint","Get-GEORRoute","Get-GEORRouteMatrix")
}

_awsArgumentCompleterRegistration $GEOR_Completers $GEOR_map

$GEOR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GEOR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GEOR_SelectMap = @{
    "Select"=@("Get-GEORIsoline",
               "Get-GEORRouteMatrix",
               "Get-GEORRoute",
               "Get-GEOROptimizedWaypoint",
               "Get-GEORSnappedRoad")
}

_awsArgumentCompleterRegistration $GEOR_SelectCompleters $GEOR_SelectMap
# Argument completions for service Amazon Glacier


$GLC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GLC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GLC_SelectMap = @{
    "Select"=@("Remove-GLCMultipartUpload",
               "Stop-GLCVaultLock",
               "Add-GLCTagsToVault",
               "Complete-GLCVaultLock",
               "New-GLCVault",
               "Remove-GLCArchive",
               "Remove-GLCVault",
               "Remove-GLCVaultAccessPolicy",
               "Remove-GLCVaultNotification",
               "Get-GLCJob",
               "Get-GLCVault",
               "Get-GLCDataRetrievalPolicy",
               "Get-GLCVaultAccessPolicy",
               "Get-GLCVaultLock",
               "Get-GLCVaultNotification",
               "Start-GLCJob",
               "Start-GLCVaultLock",
               "Get-GLCJobList",
               "Get-GLCMultipartUploadList",
               "Get-GLCProvisionedCapacityList",
               "Get-GLCVaultTagList",
               "Get-GLCVaultList",
               "New-GLCProvisionedCapacityPurchase",
               "Remove-GLCTagsFromVault",
               "Set-GLCDataRetrievalPolicy",
               "Set-GLCVaultAccessPolicy",
               "Set-GLCVaultNotification",
               "Read-GLCJobOutput",
               "Write-GLCArchive")
}

_awsArgumentCompleterRegistration $GLC_SelectCompleters $GLC_SelectMap
# Argument completions for service AWS Global Accelerator


$GACL_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.GlobalAccelerator.ClientAffinity
        {
            ($_ -eq "New-GACLListener/ClientAffinity") -Or
            ($_ -eq "Update-GACLListener/ClientAffinity")
        }
        {
            $v = "NONE","SOURCE_IP"
            break
        }

        # Amazon.GlobalAccelerator.HealthCheckProtocol
        {
            ($_ -eq "New-GACLEndpointGroup/HealthCheckProtocol") -Or
            ($_ -eq "Update-GACLEndpointGroup/HealthCheckProtocol")
        }
        {
            $v = "HTTP","HTTPS","TCP"
            break
        }

        # Amazon.GlobalAccelerator.IpAddressType
        {
            ($_ -eq "New-GACLAccelerator/IpAddressType") -Or
            ($_ -eq "New-GACLCustomRoutingAccelerator/IpAddressType") -Or
            ($_ -eq "Update-GACLAccelerator/IpAddressType") -Or
            ($_ -eq "Update-GACLCustomRoutingAccelerator/IpAddressType")
        }
        {
            $v = "DUAL_STACK","IPV4"
            break
        }

        # Amazon.GlobalAccelerator.Protocol
        {
            ($_ -eq "New-GACLListener/Protocol") -Or
            ($_ -eq "Update-GACLListener/Protocol")
        }
        {
            $v = "TCP","UDP"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GACL_map = @{
    "ClientAffinity"=@("New-GACLListener","Update-GACLListener")
    "HealthCheckProtocol"=@("New-GACLEndpointGroup","Update-GACLEndpointGroup")
    "IpAddressType"=@("New-GACLAccelerator","New-GACLCustomRoutingAccelerator","Update-GACLAccelerator","Update-GACLCustomRoutingAccelerator")
    "Protocol"=@("New-GACLListener","Update-GACLListener")
}

_awsArgumentCompleterRegistration $GACL_Completers $GACL_map

$GACL_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GACL.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GACL_SelectMap = @{
    "Select"=@("Add-GACLCustomRoutingEndpoint",
               "Add-GACLEndpoint",
               "Start-GACLAdvertisingByoipCidr",
               "Enable-GACLCustomRoutingTraffic",
               "New-GACLAccelerator",
               "New-GACLCrossAccountAttachment",
               "New-GACLCustomRoutingAccelerator",
               "New-GACLCustomRoutingEndpointGroup",
               "New-GACLCustomRoutingListener",
               "New-GACLEndpointGroup",
               "New-GACLListener",
               "Remove-GACLAccelerator",
               "Remove-GACLCrossAccountAttachment",
               "Remove-GACLCustomRoutingAccelerator",
               "Remove-GACLCustomRoutingEndpointGroup",
               "Remove-GACLCustomRoutingListener",
               "Remove-GACLEndpointGroup",
               "Remove-GACLListener",
               "Disable-GACLCustomRoutingTraffic",
               "Remove-GACLByoipCidrProvision",
               "Get-GACLAccelerator",
               "Get-GACLAcceleratorAttribute",
               "Get-GACLCrossAccountAttachment",
               "Get-GACLCustomRoutingAccelerator",
               "Get-GACLCustomRoutingAcceleratorAttribute",
               "Get-GACLCustomRoutingEndpointGroup",
               "Get-GACLCustomRoutingListener",
               "Get-GACLEndpointGroup",
               "Get-GACLListener",
               "Get-GACLAcceleratorList",
               "Get-GACLByoipCidrList",
               "Get-GACLCrossAccountAttachmentList",
               "Get-GACLCrossAccountResourceAccountList",
               "Get-GACLCrossAccountResourceList",
               "Get-GACLCustomRoutingAcceleratorList",
               "Get-GACLCustomRoutingEndpointGroupList",
               "Get-GACLCustomRoutingListenerList",
               "Get-GACLCustomRoutingPortMappingList",
               "Get-GACLCustomRoutingPortMappingsByDestinationList",
               "Get-GACLEndpointGroupList",
               "Get-GACLListenerList",
               "Get-GACLResourceTag",
               "Add-GACLByoipCidrProvision",
               "Remove-GACLCustomRoutingEndpoint",
               "Remove-GACLEndpoint",
               "Add-GACLResourceTag",
               "Remove-GACLResourceTag",
               "Update-GACLAccelerator",
               "Update-GACLAcceleratorAttribute",
               "Update-GACLCrossAccountAttachment",
               "Update-GACLCustomRoutingAccelerator",
               "Update-GACLCustomRoutingAcceleratorAttribute",
               "Update-GACLCustomRoutingListener",
               "Update-GACLEndpointGroup",
               "Update-GACLListener",
               "Stop-GACLAdvertisingByoipCidr")
}

_awsArgumentCompleterRegistration $GACL_SelectCompleters $GACL_SelectMap
# Argument completions for service AWS Glue


$GLUE_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Glue.AuthenticationType
        "Test-GLUEConnection/AuthenticationConfiguration_AuthenticationType"
        {
            $v = "BASIC","CUSTOM","OAUTH2"
            break
        }

        # Amazon.Glue.CatalogEncryptionMode
        "Set-GLUEDataCatalogEncryptionSetting/EncryptionAtRest_CatalogEncryptionMode"
        {
            $v = "DISABLED","SSE-KMS","SSE-KMS-WITH-SERVICE-ROLE"
            break
        }

        # Amazon.Glue.CloudWatchEncryptionMode
        "New-GLUESecurityConfiguration/CloudWatchEncryption_CloudWatchEncryptionMode"
        {
            $v = "DISABLED","SSE-KMS"
            break
        }

        # Amazon.Glue.Compatibility
        {
            ($_ -eq "New-GLUESchema/Compatibility") -Or
            ($_ -eq "Update-GLUESchema/Compatibility")
        }
        {
            $v = "BACKWARD","BACKWARD_ALL","DISABLED","FORWARD","FORWARD_ALL","FULL","FULL_ALL","NONE"
            break
        }

        # Amazon.Glue.ConnectionType
        "Test-GLUEConnection/TestConnectionInput_ConnectionType"
        {
            $v = "CUSTOM","JDBC","KAFKA","MARKETPLACE","MONGODB","NETWORK","SALESFORCE","SFTP","VIEW_VALIDATION_ATHENA","VIEW_VALIDATION_REDSHIFT"
            break
        }

        # Amazon.Glue.CrawlerLineageSettings
        {
            ($_ -eq "New-GLUECrawler/LineageConfiguration_CrawlerLineageSetting") -Or
            ($_ -eq "Update-GLUECrawler/LineageConfiguration_CrawlerLineageSetting")
        }
        {
            $v = "DISABLE","ENABLE"
            break
        }

        # Amazon.Glue.CsvHeaderOption
        {
            ($_ -eq "New-GLUEClassifier/CsvClassifier_ContainsHeader") -Or
            ($_ -eq "Update-GLUEClassifier/CsvClassifier_ContainsHeader")
        }
        {
            $v = "ABSENT","PRESENT","UNKNOWN"
            break
        }

        # Amazon.Glue.CsvSerdeOption
        {
            ($_ -eq "New-GLUEClassifier/CsvClassifier_Serde") -Or
            ($_ -eq "Update-GLUEClassifier/CsvClassifier_Serde")
        }
        {
            $v = "LazySimpleSerDe","None","OpenCSVSerDe"
            break
        }

        # Amazon.Glue.DataFormat
        {
            ($_ -eq "Get-GLUESchemaVersionValidity/DataFormat") -Or
            ($_ -eq "New-GLUESchema/DataFormat")
        }
        {
            $v = "AVRO","JSON","PROTOBUF"
            break
        }

        # Amazon.Glue.DQCompositeRuleEvaluationMethod
        "Start-GLUEDataQualityRulesetEvaluationRun/AdditionalRunOptions_CompositeRuleEvaluationMethod"
        {
            $v = "COLUMN","ROW"
            break
        }

        # Amazon.Glue.EnableHybridValues
        "Set-GLUEResourcePolicy/EnableHybrid"
        {
            $v = "FALSE","TRUE"
            break
        }

        # Amazon.Glue.ExecutionClass
        {
            ($_ -eq "New-GLUEJob/ExecutionClass") -Or
            ($_ -eq "Start-GLUEJobRun/ExecutionClass")
        }
        {
            $v = "FLEX","STANDARD"
            break
        }

        # Amazon.Glue.ExistCondition
        "Set-GLUEResourcePolicy/PolicyExistsCondition"
        {
            $v = "MUST_EXIST","NONE","NOT_EXIST"
            break
        }

        # Amazon.Glue.InclusionAnnotationValue
        "Write-GLUEDataQualityProfileAnnotation/InclusionAnnotation"
        {
            $v = "EXCLUDE","INCLUDE"
            break
        }

        # Amazon.Glue.JobBookmarksEncryptionMode
        "New-GLUESecurityConfiguration/JobBookmarksEncryption_JobBookmarksEncryptionMode"
        {
            $v = "CSE-KMS","DISABLED"
            break
        }

        # Amazon.Glue.JobMode
        "New-GLUEJob/JobMode"
        {
            $v = "NOTEBOOK","SCRIPT","VISUAL"
            break
        }

        # Amazon.Glue.Language
        {
            ($_ -eq "Get-GLUEPlan/Language") -Or
            ($_ -eq "New-GLUEScript/Language")
        }
        {
            $v = "PYTHON","SCALA"
            break
        }

        # Amazon.Glue.MetadataOperation
        "New-GLUETable/IcebergInput_MetadataOperation"
        {
            $v = "CREATE"
            break
        }

        # Amazon.Glue.MLUserDataEncryptionModeString
        "New-GLUEMLTransform/MlUserDataEncryption_MlUserDataEncryptionMode"
        {
            $v = "DISABLED","SSE-KMS"
            break
        }

        # Amazon.Glue.OAuth2GrantType
        "Test-GLUEConnection/OAuth2Properties_OAuth2GrantType"
        {
            $v = "AUTHORIZATION_CODE","CLIENT_CREDENTIALS","JWT_BEARER"
            break
        }

        # Amazon.Glue.RecrawlBehavior
        {
            ($_ -eq "New-GLUECrawler/RecrawlPolicy_RecrawlBehavior") -Or
            ($_ -eq "Update-GLUECrawler/RecrawlPolicy_RecrawlBehavior")
        }
        {
            $v = "CRAWL_EVENT_MODE","CRAWL_EVERYTHING","CRAWL_NEW_FOLDERS_ONLY"
            break
        }

        # Amazon.Glue.ResourceShareType
        {
            ($_ -eq "Find-GLUETable/ResourceShareType") -Or
            ($_ -eq "Get-GLUEDatabaseList/ResourceShareType")
        }
        {
            $v = "ALL","FEDERATED","FOREIGN"
            break
        }

        # Amazon.Glue.SchemaDiffType
        "Get-GLUESchemaVersionsDiff/SchemaDiffType"
        {
            $v = "SYNTAX_DIFF"
            break
        }

        # Amazon.Glue.SortDirectionType
        {
            ($_ -eq "Get-GLUEMLTaskRunList/Sort_SortDirection") -Or
            ($_ -eq "Get-GLUEMLTransformIdentifier/Sort_SortDirection") -Or
            ($_ -eq "Get-GLUEMLTransformList/Sort_SortDirection")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.Glue.SourceControlAuthStrategy
        {
            ($_ -eq "Update-GLUEJobFromSourceControl/AuthStrategy") -Or
            ($_ -eq "Update-GLUESourceControlFromJob/AuthStrategy") -Or
            ($_ -eq "New-GLUEJob/SourceControlDetails_AuthStrategy")
        }
        {
            $v = "AWS_SECRETS_MANAGER","PERSONAL_ACCESS_TOKEN"
            break
        }

        # Amazon.Glue.SourceControlProvider
        {
            ($_ -eq "Update-GLUEJobFromSourceControl/Provider") -Or
            ($_ -eq "Update-GLUESourceControlFromJob/Provider") -Or
            ($_ -eq "New-GLUEJob/SourceControlDetails_Provider")
        }
        {
            $v = "AWS_CODE_COMMIT","BITBUCKET","GITHUB","GITLAB"
            break
        }

        # Amazon.Glue.TableOptimizerType
        {
            ($_ -eq "Get-GLUETableOptimizer/Type") -Or
            ($_ -eq "Get-GLUETableOptimizerRunList/Type") -Or
            ($_ -eq "New-GLUETableOptimizer/Type") -Or
            ($_ -eq "Remove-GLUETableOptimizer/Type") -Or
            ($_ -eq "Update-GLUETableOptimizer/Type")
        }
        {
            $v = "compaction","orphan_file_deletion","retention"
            break
        }

        # Amazon.Glue.TaskRunSortColumnType
        "Get-GLUEMLTaskRunList/Sort_Column"
        {
            $v = "STARTED","STATUS","TASK_RUN_TYPE"
            break
        }

        # Amazon.Glue.TaskStatusType
        "Get-GLUEMLTaskRunList/Filter_Status"
        {
            $v = "FAILED","RUNNING","STARTING","STOPPED","STOPPING","SUCCEEDED","TIMEOUT"
            break
        }

        # Amazon.Glue.TaskType
        "Get-GLUEMLTaskRunList/Filter_TaskRunType"
        {
            $v = "EVALUATION","EXPORT_LABELS","FIND_MATCHES","IMPORT_LABELS","LABELING_SET_GENERATION"
            break
        }

        # Amazon.Glue.TransformSortColumnType
        {
            ($_ -eq "Get-GLUEMLTransformIdentifier/Sort_Column") -Or
            ($_ -eq "Get-GLUEMLTransformList/Sort_Column")
        }
        {
            $v = "CREATED","LAST_MODIFIED","NAME","STATUS","TRANSFORM_TYPE"
            break
        }

        # Amazon.Glue.TransformStatusType
        {
            ($_ -eq "Get-GLUEMLTransformIdentifier/Filter_Status") -Or
            ($_ -eq "Get-GLUEMLTransformList/Filter_Status")
        }
        {
            $v = "DELETING","NOT_READY","READY"
            break
        }

        # Amazon.Glue.TransformType
        {
            ($_ -eq "Get-GLUEMLTransformIdentifier/Filter_TransformType") -Or
            ($_ -eq "Get-GLUEMLTransformList/Filter_TransformType") -Or
            ($_ -eq "New-GLUEMLTransform/Parameters_TransformType") -Or
            ($_ -eq "Update-GLUEMLTransform/Parameters_TransformType")
        }
        {
            $v = "FIND_MATCHES"
            break
        }

        # Amazon.Glue.TriggerType
        "New-GLUETrigger/Type"
        {
            $v = "CONDITIONAL","EVENT","ON_DEMAND","SCHEDULED"
            break
        }

        # Amazon.Glue.ViewDialect
        "Get-GLUEUnfilteredTableMetadata/SupportedDialect_Dialect"
        {
            $v = "ATHENA","REDSHIFT","SPARK"
            break
        }

        # Amazon.Glue.ViewUpdateAction
        "Update-GLUETable/ViewUpdateAction"
        {
            $v = "ADD","ADD_OR_REPLACE","DROP","REPLACE"
            break
        }

        # Amazon.Glue.WorkerType
        {
            ($_ -eq "New-GLUEDevEndpoint/WorkerType") -Or
            ($_ -eq "New-GLUEJob/WorkerType") -Or
            ($_ -eq "New-GLUEMLTransform/WorkerType") -Or
            ($_ -eq "New-GLUESession/WorkerType") -Or
            ($_ -eq "Start-GLUEJobRun/WorkerType") -Or
            ($_ -eq "Update-GLUEMLTransform/WorkerType")
        }
        {
            $v = "G.025X","G.1X","G.2X","G.4X","G.8X","Standard","Z.2X"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GLUE_map = @{
    "AdditionalRunOptions_CompositeRuleEvaluationMethod"=@("Start-GLUEDataQualityRulesetEvaluationRun")
    "AuthenticationConfiguration_AuthenticationType"=@("Test-GLUEConnection")
    "AuthStrategy"=@("Update-GLUEJobFromSourceControl","Update-GLUESourceControlFromJob")
    "CloudWatchEncryption_CloudWatchEncryptionMode"=@("New-GLUESecurityConfiguration")
    "Compatibility"=@("New-GLUESchema","Update-GLUESchema")
    "CsvClassifier_ContainsHeader"=@("New-GLUEClassifier","Update-GLUEClassifier")
    "CsvClassifier_Serde"=@("New-GLUEClassifier","Update-GLUEClassifier")
    "DataFormat"=@("Get-GLUESchemaVersionValidity","New-GLUESchema")
    "EnableHybrid"=@("Set-GLUEResourcePolicy")
    "EncryptionAtRest_CatalogEncryptionMode"=@("Set-GLUEDataCatalogEncryptionSetting")
    "ExecutionClass"=@("New-GLUEJob","Start-GLUEJobRun")
    "Filter_Status"=@("Get-GLUEMLTaskRunList","Get-GLUEMLTransformIdentifier","Get-GLUEMLTransformList")
    "Filter_TaskRunType"=@("Get-GLUEMLTaskRunList")
    "Filter_TransformType"=@("Get-GLUEMLTransformIdentifier","Get-GLUEMLTransformList")
    "IcebergInput_MetadataOperation"=@("New-GLUETable")
    "InclusionAnnotation"=@("Write-GLUEDataQualityProfileAnnotation")
    "JobBookmarksEncryption_JobBookmarksEncryptionMode"=@("New-GLUESecurityConfiguration")
    "JobMode"=@("New-GLUEJob")
    "Language"=@("Get-GLUEPlan","New-GLUEScript")
    "LineageConfiguration_CrawlerLineageSetting"=@("New-GLUECrawler","Update-GLUECrawler")
    "MlUserDataEncryption_MlUserDataEncryptionMode"=@("New-GLUEMLTransform")
    "OAuth2Properties_OAuth2GrantType"=@("Test-GLUEConnection")
    "Parameters_TransformType"=@("New-GLUEMLTransform","Update-GLUEMLTransform")
    "PolicyExistsCondition"=@("Set-GLUEResourcePolicy")
    "Provider"=@("Update-GLUEJobFromSourceControl","Update-GLUESourceControlFromJob")
    "RecrawlPolicy_RecrawlBehavior"=@("New-GLUECrawler","Update-GLUECrawler")
    "ResourceShareType"=@("Find-GLUETable","Get-GLUEDatabaseList")
    "SchemaDiffType"=@("Get-GLUESchemaVersionsDiff")
    "Sort_Column"=@("Get-GLUEMLTaskRunList","Get-GLUEMLTransformIdentifier","Get-GLUEMLTransformList")
    "Sort_SortDirection"=@("Get-GLUEMLTaskRunList","Get-GLUEMLTransformIdentifier","Get-GLUEMLTransformList")
    "SourceControlDetails_AuthStrategy"=@("New-GLUEJob")
    "SourceControlDetails_Provider"=@("New-GLUEJob")
    "SupportedDialect_Dialect"=@("Get-GLUEUnfilteredTableMetadata")
    "TestConnectionInput_ConnectionType"=@("Test-GLUEConnection")
    "Type"=@("Get-GLUETableOptimizer","Get-GLUETableOptimizerRunList","New-GLUETableOptimizer","New-GLUETrigger","Remove-GLUETableOptimizer","Update-GLUETableOptimizer")
    "ViewUpdateAction"=@("Update-GLUETable")
    "WorkerType"=@("New-GLUEDevEndpoint","New-GLUEJob","New-GLUEMLTransform","New-GLUESession","Start-GLUEJobRun","Update-GLUEMLTransform")
}

_awsArgumentCompleterRegistration $GLUE_Completers $GLUE_map

$GLUE_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GLUE.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GLUE_SelectMap = @{
    "Select"=@("New-GLUEPartitionBatch",
               "Remove-GLUEConnectionBatch",
               "Remove-GLUEPartitionBatch",
               "Remove-GLUETableBatch",
               "Remove-GLUETableVersionBatch",
               "Get-GLUEBlueprintBatch",
               "Get-GLUECrawlerBatch",
               "Get-GLUEGetCustomEntityType",
               "Get-GLUEDataQualityResultBatch",
               "Get-GLUEDevEndpointBatch",
               "Get-GLUEJobBatch",
               "Get-GLUEPartitionBatch",
               "Get-GLUETableOptimizerBatch",
               "Get-GLUETriggerBatch",
               "Get-GLUEWorkflowBatch",
               "Set-GLUEBatchDataQualityStatisticAnnotation",
               "Stop-GLUEJobRunBatch",
               "Update-GLUEPartitionBatch",
               "Stop-GLUEDataQualityRuleRecommendationRun",
               "Stop-GLUEDataQualityRulesetEvaluationRun",
               "Stop-GLUEMLTaskRun",
               "Stop-GLUEStatement",
               "Get-GLUESchemaVersionValidity",
               "New-GLUEBlueprint",
               "New-GLUEClassifier",
               "New-GLUEColumnStatisticsTaskSetting",
               "New-GLUEConnection",
               "New-GLUECrawler",
               "New-GLUECustomEntityType",
               "New-GLUEDatabase",
               "New-GLUEDataQualityRuleset",
               "New-GLUEDevEndpoint",
               "New-GLUEJob",
               "New-GLUEMLTransform",
               "New-GLUEPartition",
               "New-GLUEPartitionIndex",
               "New-GLUERegistry",
               "New-GLUESchema",
               "New-GLUEScript",
               "New-GLUESecurityConfiguration",
               "New-GLUESession",
               "New-GLUETable",
               "New-GLUETableOptimizer",
               "New-GLUETrigger",
               "New-GLUEUsageProfile",
               "New-GLUEUserDefinedFunction",
               "New-GLUEWorkflow",
               "Remove-GLUEBlueprint",
               "Remove-GLUEClassifier",
               "Remove-GLUEColumnStatisticsForPartition",
               "Remove-GLUEColumnStatisticsForTable",
               "Remove-GLUEColumnStatisticsTaskSetting",
               "Remove-GLUEConnection",
               "Remove-GLUECrawler",
               "Remove-GLUECustomEntityType",
               "Remove-GLUEDatabase",
               "Remove-GLUEDataQualityRuleset",
               "Remove-GLUEDevEndpoint",
               "Remove-GLUEJob",
               "Remove-GLUEMLTransform",
               "Remove-GLUEPartition",
               "Remove-GLUEPartitionIndex",
               "Remove-GLUERegistry",
               "Remove-GLUEResourcePolicy",
               "Remove-GLUESchema",
               "Remove-GLUESchemaVersion",
               "Remove-GLUESecurityConfiguration",
               "Remove-GLUESession",
               "Remove-GLUETable",
               "Remove-GLUETableOptimizer",
               "Remove-GLUETableVersion",
               "Remove-GLUETrigger",
               "Remove-GLUEUsageProfile",
               "Remove-GLUEUserDefinedFunction",
               "Remove-GLUEWorkflow",
               "Get-GLUEBlueprint",
               "Get-GLUEBlueprintRun",
               "Get-GLUEBlueprintRunList",
               "Get-GLUECatalogImportStatus",
               "Get-GLUEClassifier",
               "Get-GLUEClassifierList",
               "Get-GLUEColumnStatisticsForPartition",
               "Get-GLUEColumnStatisticsForTable",
               "Get-GLUEColumnStatisticsTaskRun",
               "Get-GLUEColumnStatisticsTaskList",
               "Get-GLUEColumnStatisticsTaskSetting",
               "Get-GLUEConnection",
               "Get-GLUEConnectionList",
               "Get-GLUECrawler",
               "Get-GLUECrawlerMetricList",
               "Get-GLUECrawlerList",
               "Get-GLUECustomEntityType",
               "Get-GLUEDatabase",
               "Get-GLUEDatabaseList",
               "Get-GLUEDataCatalogEncryptionSetting",
               "Get-GLUEDataflowGraph",
               "Get-GLUEDataQualityModel",
               "Get-GLUEDataQualityModelResult",
               "Get-GLUEDataQualityResult",
               "Get-GLUEDataQualityRuleRecommendationRun",
               "Get-GLUEDataQualityRuleset",
               "Get-GLUEDataQualityRulesetEvaluationRun",
               "Get-GLUEDevEndpoint",
               "Get-GLUEDevEndpointList",
               "Get-GLUEJob",
               "Get-GLUEJobBookmark",
               "Get-GLUEJobRun",
               "Get-GLUEJobRunList",
               "Get-GLUEJobList",
               "Get-GLUEMapping",
               "Get-GLUEMLTaskRun",
               "Get-GLUEMLTaskRunList",
               "Get-GLUEMLTransform",
               "Get-GLUEMLTransformList",
               "Get-GLUEPartition",
               "Get-GLUEPartitionIndex",
               "Get-GLUEPartitionList",
               "Get-GLUEPlan",
               "Get-GLUERegistry",
               "Get-GLUEGluePolicyList",
               "Get-GLUEResourcePolicy",
               "Get-GLUESchema",
               "Get-GLUESchemaByDefinition",
               "Get-GLUESchemaVersion",
               "Get-GLUESchemaVersionsDiff",
               "Get-GLUESecurityConfiguration",
               "Get-GLUESecurityConfigurationList",
               "Get-GLUESession",
               "Get-GLUEStatement",
               "Get-GLUETable",
               "Get-GLUETableOptimizer",
               "Get-GLUETableList",
               "Get-GLUETableVersion",
               "Get-GLUETableVersionList",
               "Get-GLUETag",
               "Get-GLUETrigger",
               "Get-GLUETriggerList",
               "Get-GLUEUnfilteredPartitionMetadata",
               "Get-GLUEUnfilteredPartitionsMetadata",
               "Get-GLUEUnfilteredTableMetadata",
               "Get-GLUEUsageProfile",
               "Get-GLUEUserDefinedFunction",
               "Get-GLUEUserDefinedFunctionList",
               "Get-GLUEWorkflow",
               "Get-GLUEWorkflowRun",
               "Get-GLUEWorkflowRunProperty",
               "Get-GLUEWorkflowRunList",
               "Import-GLUECatalog",
               "Get-GLUEBlueprintList",
               "Get-GLUEColumnStatisticsTaskRunList",
               "Get-GLUECrawlerNameList",
               "Get-GLUECrawlList",
               "Get-GLUECustomEntityTypeList",
               "Get-GLUEDataQualityResultList",
               "Get-GLUEDataQualityRuleRecommendationRunList",
               "Get-GLUEDataQualityRulesetEvaluationRunList",
               "Get-GLUEDataQualityRulesetList",
               "Get-GLUEDataQualityStatisticAnnotationList",
               "Get-GLUEDataQualityStatisticList",
               "Get-GLUEDevEndpointNameList",
               "Get-GLUEJobNameList",
               "Get-GLUEMLTransformIdentifier",
               "Get-GLUERegistryList",
               "Get-GLUESchemaList",
               "Get-GLUESchemaVersionList",
               "Get-GLUESessionList",
               "Get-GLUEStatementList",
               "Get-GLUETableOptimizerRunList",
               "Get-GLUETriggerNameList",
               "Get-GLUEUsageProfileList",
               "Get-GLUEWorkflowList",
               "Set-GLUEDataCatalogEncryptionSetting",
               "Write-GLUEDataQualityProfileAnnotation",
               "Set-GLUEResourcePolicy",
               "Write-GLUESchemaVersionMetadata",
               "Write-GLUEWorkflowRunProperty",
               "Find-GLUESchemaVersionMetadata",
               "Register-GLUESchemaVersion",
               "Remove-GLUESchemaVersionMetadata",
               "Reset-GLUEJobBookmark",
               "Resume-GLUEWorkflowRun",
               "Invoke-GLUEStatement",
               "Find-GLUETable",
               "Start-GLUEBlueprintRun",
               "Start-GLUEColumnStatisticsTaskRun",
               "Start-GLUEColumnStatisticsTaskRunSchedule",
               "Start-GLUECrawler",
               "Start-GLUECrawlerSchedule",
               "Start-GLUEDataQualityRuleRecommendationRun",
               "Start-GLUEDataQualityRulesetEvaluationRun",
               "Start-GLUEExportLabelsTaskRun",
               "Start-GLUEImportLabelsTaskRun",
               "Start-GLUEJobRun",
               "Start-GLUEMLEvaluationTaskRun",
               "Start-GLUEMLLabelingSetGenerationTaskRun",
               "Start-GLUETrigger",
               "Start-GLUEWorkflowRun",
               "Stop-GLUEColumnStatisticsTaskRun",
               "Stop-GLUEColumnStatisticsTaskRunSchedule",
               "Stop-GLUECrawler",
               "Stop-GLUECrawlerSchedule",
               "Stop-GLUESession",
               "Stop-GLUETrigger",
               "Stop-GLUEWorkflowRun",
               "Add-GLUEResourceTag",
               "Test-GLUEConnection",
               "Remove-GLUEResourceTag",
               "Update-GLUEBlueprint",
               "Update-GLUEClassifier",
               "Update-GLUEColumnStatisticsForPartition",
               "Update-GLUEColumnStatisticsForTable",
               "Update-GLUEColumnStatisticsTaskSetting",
               "Update-GLUEConnection",
               "Update-GLUECrawler",
               "Update-GLUECrawlerSchedule",
               "Update-GLUEDatabase",
               "Update-GLUEDataQualityRuleset",
               "Update-GLUEDevEndpoint",
               "Update-GLUEJob",
               "Update-GLUEJobFromSourceControl",
               "Update-GLUEMLTransform",
               "Update-GLUEPartition",
               "Update-GLUERegistry",
               "Update-GLUESchema",
               "Update-GLUESourceControlFromJob",
               "Update-GLUETable",
               "Update-GLUETableOptimizer",
               "Update-GLUETrigger",
               "Update-GLUEUsageProfile",
               "Update-GLUEUserDefinedFunction",
               "Update-GLUEWorkflow")
}

_awsArgumentCompleterRegistration $GLUE_SelectCompleters $GLUE_SelectMap
# Argument completions for service Amazon Managed Grafana


$MGRF_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ManagedGrafana.AccountAccessType
        {
            ($_ -eq "New-MGRFWorkspace/AccountAccessType") -Or
            ($_ -eq "Update-MGRFWorkspace/AccountAccessType")
        }
        {
            $v = "CURRENT_ACCOUNT","ORGANIZATION"
            break
        }

        # Amazon.ManagedGrafana.LicenseType
        {
            ($_ -eq "Add-MGRFLicense/LicenseType") -Or
            ($_ -eq "Remove-MGRFLicense/LicenseType")
        }
        {
            $v = "ENTERPRISE","ENTERPRISE_FREE_TRIAL"
            break
        }

        # Amazon.ManagedGrafana.PermissionType
        {
            ($_ -eq "New-MGRFWorkspace/PermissionType") -Or
            ($_ -eq "Update-MGRFWorkspace/PermissionType")
        }
        {
            $v = "CUSTOMER_MANAGED","SERVICE_MANAGED"
            break
        }

        # Amazon.ManagedGrafana.Role
        "New-MGRFWorkspaceServiceAccount/GrafanaRole"
        {
            $v = "ADMIN","EDITOR","VIEWER"
            break
        }

        # Amazon.ManagedGrafana.UserType
        "Get-MGRFPermissionList/UserType"
        {
            $v = "SSO_GROUP","SSO_USER"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MGRF_map = @{
    "AccountAccessType"=@("New-MGRFWorkspace","Update-MGRFWorkspace")
    "GrafanaRole"=@("New-MGRFWorkspaceServiceAccount")
    "LicenseType"=@("Add-MGRFLicense","Remove-MGRFLicense")
    "PermissionType"=@("New-MGRFWorkspace","Update-MGRFWorkspace")
    "UserType"=@("Get-MGRFPermissionList")
}

_awsArgumentCompleterRegistration $MGRF_Completers $MGRF_map

$MGRF_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MGRF.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MGRF_SelectMap = @{
    "Select"=@("Add-MGRFLicense",
               "New-MGRFWorkspace",
               "New-MGRFWorkspaceApiKey",
               "New-MGRFWorkspaceServiceAccount",
               "New-MGRFWorkspaceServiceAccountToken",
               "Remove-MGRFWorkspace",
               "Remove-MGRFWorkspaceApiKey",
               "Remove-MGRFWorkspaceServiceAccount",
               "Remove-MGRFWorkspaceServiceAccountToken",
               "Get-MGRFWorkspace",
               "Get-MGRFWorkspaceAuthentication",
               "Get-MGRFWorkspaceConfiguration",
               "Remove-MGRFLicense",
               "Get-MGRFPermissionList",
               "Get-MGRFResourceTag",
               "Get-MGRFVersionList",
               "Get-MGRFWorkspaceList",
               "Get-MGRFWorkspaceServiceAccountList",
               "Get-MGRFWorkspaceServiceAccountTokenList",
               "Add-MGRFResourceTag",
               "Remove-MGRFResourceTag",
               "Update-MGRFPermission",
               "Update-MGRFWorkspace",
               "Update-MGRFWorkspaceAuthentication",
               "Update-MGRFWorkspaceConfiguration")
}

_awsArgumentCompleterRegistration $MGRF_SelectCompleters $MGRF_SelectMap
# Argument completions for service AWS Greengrass


$GG_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Greengrass.DeploymentType
        "New-GGDeployment/DeploymentType"
        {
            $v = "ForceResetDeployment","NewDeployment","Redeployment","ResetDeployment"
            break
        }

        # Amazon.Greengrass.FunctionIsolationMode
        {
            ($_ -eq "New-GGFunctionDefinition/Execution_IsolationMode") -Or
            ($_ -eq "New-GGFunctionDefinitionVersion/Execution_IsolationMode")
        }
        {
            $v = "GreengrassContainer","NoContainer"
            break
        }

        # Amazon.Greengrass.SoftwareToUpdate
        "New-GGSoftwareUpdateJob/SoftwareToUpdate"
        {
            $v = "core","ota_agent"
            break
        }

        # Amazon.Greengrass.Telemetry
        "Update-GGThingRuntimeConfiguration/TelemetryConfiguration_Telemetry"
        {
            $v = "Off","On"
            break
        }

        # Amazon.Greengrass.UpdateAgentLogLevel
        "New-GGSoftwareUpdateJob/UpdateAgentLogLevel"
        {
            $v = "DEBUG","ERROR","FATAL","INFO","NONE","TRACE","VERBOSE","WARN"
            break
        }

        # Amazon.Greengrass.UpdateTargetsArchitecture
        "New-GGSoftwareUpdateJob/UpdateTargetsArchitecture"
        {
            $v = "aarch64","armv6l","armv7l","x86_64"
            break
        }

        # Amazon.Greengrass.UpdateTargetsOperatingSystem
        "New-GGSoftwareUpdateJob/UpdateTargetsOperatingSystem"
        {
            $v = "amazon_linux","openwrt","raspbian","ubuntu"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GG_map = @{
    "DeploymentType"=@("New-GGDeployment")
    "Execution_IsolationMode"=@("New-GGFunctionDefinition","New-GGFunctionDefinitionVersion")
    "SoftwareToUpdate"=@("New-GGSoftwareUpdateJob")
    "TelemetryConfiguration_Telemetry"=@("Update-GGThingRuntimeConfiguration")
    "UpdateAgentLogLevel"=@("New-GGSoftwareUpdateJob")
    "UpdateTargetsArchitecture"=@("New-GGSoftwareUpdateJob")
    "UpdateTargetsOperatingSystem"=@("New-GGSoftwareUpdateJob")
}

_awsArgumentCompleterRegistration $GG_Completers $GG_map

$GG_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GG.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GG_SelectMap = @{
    "Select"=@("Add-GGRoleToGroup",
               "Add-GGServiceRoleToAccount",
               "New-GGConnectorDefinition",
               "New-GGConnectorDefinitionVersion",
               "New-GGCoreDefinition",
               "New-GGCoreDefinitionVersion",
               "New-GGDeployment",
               "New-GGDeviceDefinition",
               "New-GGDeviceDefinitionVersion",
               "New-GGFunctionDefinition",
               "New-GGFunctionDefinitionVersion",
               "New-GGGroup",
               "New-GGGroupCertificateAuthority",
               "New-GGGroupVersion",
               "New-GGLoggerDefinition",
               "New-GGLoggerDefinitionVersion",
               "New-GGResourceDefinition",
               "New-GGResourceDefinitionVersion",
               "New-GGSoftwareUpdateJob",
               "New-GGSubscriptionDefinition",
               "New-GGSubscriptionDefinitionVersion",
               "Remove-GGConnectorDefinition",
               "Remove-GGCoreDefinition",
               "Remove-GGDeviceDefinition",
               "Remove-GGFunctionDefinition",
               "Remove-GGGroup",
               "Remove-GGLoggerDefinition",
               "Remove-GGResourceDefinition",
               "Remove-GGSubscriptionDefinition",
               "Remove-GGRoleFromGroup",
               "Remove-GGServiceRoleFromAccount",
               "Get-GGAssociatedRole",
               "Get-GGBulkDeploymentStatus",
               "Get-GGConnectivityInfo",
               "Get-GGConnectorDefinition",
               "Get-GGConnectorDefinitionVersion",
               "Get-GGCoreDefinition",
               "Get-GGCoreDefinitionVersion",
               "Get-GGDeploymentStatus",
               "Get-GGDeviceDefinition",
               "Get-GGDeviceDefinitionVersion",
               "Get-GGFunctionDefinition",
               "Get-GGFunctionDefinitionVersion",
               "Get-GGGroup",
               "Get-GGGroupCertificateAuthority",
               "Get-GGGroupCertificateConfiguration",
               "Get-GGGroupVersion",
               "Get-GGLoggerDefinition",
               "Get-GGLoggerDefinitionVersion",
               "Get-GGResourceDefinition",
               "Get-GGResourceDefinitionVersion",
               "Get-GGServiceRoleForAccount",
               "Get-GGSubscriptionDefinition",
               "Get-GGSubscriptionDefinitionVersion",
               "Get-GGThingRuntimeConfiguration",
               "Get-GGBulkDeploymentDetailedReportList",
               "Get-GGBulkDeploymentList",
               "Get-GGConnectorDefinitionList",
               "Get-GGConnectorDefinitionVersionList",
               "Get-GGCoreDefinitionList",
               "Get-GGCoreDefinitionVersionList",
               "Get-GGDeploymentList",
               "Get-GGDeviceDefinitionList",
               "Get-GGDeviceDefinitionVersionList",
               "Get-GGFunctionDefinitionList",
               "Get-GGFunctionDefinitionVersionList",
               "Get-GGGroupCertificateAuthorityList",
               "Get-GGGroupList",
               "Get-GGGroupVersionList",
               "Get-GGLoggerDefinitionList",
               "Get-GGLoggerDefinitionVersionList",
               "Get-GGResourceDefinitionList",
               "Get-GGResourceDefinitionVersionList",
               "Get-GGSubscriptionDefinitionList",
               "Get-GGSubscriptionDefinitionVersionList",
               "Get-GGResourceTag",
               "Reset-GGDeployment",
               "Start-GGBulkDeployment",
               "Stop-GGBulkDeployment",
               "Add-GGResourceTag",
               "Remove-GGResourceTag",
               "Update-GGConnectivityInfo",
               "Update-GGConnectorDefinition",
               "Update-GGCoreDefinition",
               "Update-GGDeviceDefinition",
               "Update-GGFunctionDefinition",
               "Update-GGGroup",
               "Update-GGGroupCertificateConfiguration",
               "Update-GGLoggerDefinition",
               "Update-GGResourceDefinition",
               "Update-GGSubscriptionDefinition",
               "Update-GGThingRuntimeConfiguration")
}

_awsArgumentCompleterRegistration $GG_SelectCompleters $GG_SelectMap
# Argument completions for service AWS GreengrassV2


$GGV2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.GreengrassV2.ComponentVisibilityScope
        "Get-GGV2ComponentList/Scope"
        {
            $v = "PRIVATE","PUBLIC"
            break
        }

        # Amazon.GreengrassV2.CoreDeviceStatus
        "Get-GGV2CoreDeviceList/Status"
        {
            $v = "HEALTHY","UNHEALTHY"
            break
        }

        # Amazon.GreengrassV2.DeploymentComponentUpdatePolicyAction
        "New-GGV2Deployment/ComponentUpdatePolicy_Action"
        {
            $v = "NOTIFY_COMPONENTS","SKIP_NOTIFY_COMPONENTS"
            break
        }

        # Amazon.GreengrassV2.DeploymentFailureHandlingPolicy
        "New-GGV2Deployment/DeploymentPolicies_FailureHandlingPolicy"
        {
            $v = "DO_NOTHING","ROLLBACK"
            break
        }

        # Amazon.GreengrassV2.DeploymentHistoryFilter
        "Get-GGV2DeploymentList/HistoryFilter"
        {
            $v = "ALL","LATEST_ONLY"
            break
        }

        # Amazon.GreengrassV2.InstalledComponentTopologyFilter
        "Get-GGV2InstalledComponentList/TopologyFilter"
        {
            $v = "ALL","ROOT"
            break
        }

        # Amazon.GreengrassV2.IotEndpointType
        "Get-GGV2ComponentVersionArtifact/IotEndpointType"
        {
            $v = "fips","standard"
            break
        }

        # Amazon.GreengrassV2.LambdaInputPayloadEncodingType
        "New-GGV2ComponentVersion/ComponentLambdaParameters_InputPayloadEncodingType"
        {
            $v = "binary","json"
            break
        }

        # Amazon.GreengrassV2.LambdaIsolationMode
        "New-GGV2ComponentVersion/LinuxProcessParams_IsolationMode"
        {
            $v = "GreengrassContainer","NoContainer"
            break
        }

        # Amazon.GreengrassV2.RecipeOutputFormat
        "Get-GGV2Component/RecipeOutputFormat"
        {
            $v = "JSON","YAML"
            break
        }

        # Amazon.GreengrassV2.S3EndpointType
        "Get-GGV2ComponentVersionArtifact/S3EndpointType"
        {
            $v = "GLOBAL","REGIONAL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GGV2_map = @{
    "ComponentLambdaParameters_InputPayloadEncodingType"=@("New-GGV2ComponentVersion")
    "ComponentUpdatePolicy_Action"=@("New-GGV2Deployment")
    "DeploymentPolicies_FailureHandlingPolicy"=@("New-GGV2Deployment")
    "HistoryFilter"=@("Get-GGV2DeploymentList")
    "IotEndpointType"=@("Get-GGV2ComponentVersionArtifact")
    "LinuxProcessParams_IsolationMode"=@("New-GGV2ComponentVersion")
    "RecipeOutputFormat"=@("Get-GGV2Component")
    "S3EndpointType"=@("Get-GGV2ComponentVersionArtifact")
    "Scope"=@("Get-GGV2ComponentList")
    "Status"=@("Get-GGV2CoreDeviceList")
    "TopologyFilter"=@("Get-GGV2InstalledComponentList")
}

_awsArgumentCompleterRegistration $GGV2_Completers $GGV2_map

$GGV2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GGV2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GGV2_SelectMap = @{
    "Select"=@("Add-GGV2ServiceRoleToAccount",
               "Add-GGV2BatchClientDeviceWithCoreDevice",
               "Remove-GGV2BatchClientDeviceFromCoreDevice",
               "Stop-GGV2Deployment",
               "New-GGV2ComponentVersion",
               "New-GGV2Deployment",
               "Remove-GGV2Component",
               "Remove-GGV2CoreDevice",
               "Remove-GGV2Deployment",
               "Get-GGV2ComponentMetadata",
               "Remove-GGV2ServiceRoleFromAccount",
               "Get-GGV2Component",
               "Get-GGV2ComponentVersionArtifact",
               "Get-GGV2ConnectivityInfo",
               "Get-GGV2CoreDevice",
               "Get-GGV2Deployment",
               "Get-GGV2ServiceRoleForAccount",
               "Get-GGV2ClientDevicesAssociatedWithCoreDeviceList",
               "Get-GGV2ComponentList",
               "Get-GGV2ComponentVersionList",
               "Get-GGV2CoreDeviceList",
               "Get-GGV2DeploymentList",
               "Get-GGV2EffectiveDeploymentList",
               "Get-GGV2InstalledComponentList",
               "Get-GGV2ResourceTag",
               "Resolve-GGV2ComponentCandidate",
               "Add-GGV2ResourceTag",
               "Remove-GGV2ResourceTag",
               "Update-GGV2ConnectivityInfo")
}

_awsArgumentCompleterRegistration $GGV2_SelectCompleters $GGV2_SelectMap
# Argument completions for service AWS Ground Station


$GS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.GroundStation.AgentStatus
        "Update-GSAgentStatus/AggregateStatus_Status"
        {
            $v = "ACTIVE","FAILED","INACTIVE","SUCCESS"
            break
        }

        # Amazon.GroundStation.ConfigCapabilityType
        {
            ($_ -eq "Get-GSConfig/ConfigType") -Or
            ($_ -eq "Remove-GSConfig/ConfigType") -Or
            ($_ -eq "Update-GSConfig/ConfigType")
        }
        {
            $v = "antenna-downlink","antenna-downlink-demod-decode","antenna-uplink","dataflow-endpoint","s3-recording","tracking","uplink-echo"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GS_map = @{
    "AggregateStatus_Status"=@("Update-GSAgentStatus")
    "ConfigType"=@("Get-GSConfig","Remove-GSConfig","Update-GSConfig")
}

_awsArgumentCompleterRegistration $GS_Completers $GS_map

$GS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GS_SelectMap = @{
    "Select"=@("Stop-GSContact",
               "New-GSConfig",
               "New-GSDataflowEndpointGroup",
               "New-GSEphemeris",
               "New-GSMissionProfile",
               "Remove-GSConfig",
               "Remove-GSDataflowEndpointGroup",
               "Remove-GSEphemeris",
               "Remove-GSMissionProfile",
               "Get-GSContact",
               "Get-GSEphemeris",
               "Get-GSAgentConfiguration",
               "Get-GSConfig",
               "Get-GSDataflowEndpointGroup",
               "Get-GSMinuteUsage",
               "Get-GSMissionProfile",
               "Get-GSSatellite",
               "Get-GSConfigList",
               "Get-GSContactList",
               "Get-GSDataflowEndpointGroupList",
               "Get-GSEphemerideList",
               "Get-GSGroundStationList",
               "Get-GSMissionProfileList",
               "Get-GSSatelliteList",
               "Get-GSResourceTag",
               "Register-GSAgent",
               "Add-GSReservedContact",
               "Add-GSResourceTag",
               "Remove-GSResourceTag",
               "Update-GSAgentStatus",
               "Update-GSConfig",
               "Update-GSEphemeris",
               "Update-GSMissionProfile")
}

_awsArgumentCompleterRegistration $GS_SelectCompleters $GS_SelectMap
# Argument completions for service Amazon GuardDuty


$GD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.GuardDuty.AutoEnableMembers
        "Update-GDOrganizationConfiguration/AutoEnableOrganizationMember"
        {
            $v = "ALL","NEW","NONE"
            break
        }

        # Amazon.GuardDuty.CoverageSortKey
        "Get-GDCoverageList/SortCriteria_AttributeName"
        {
            $v = "ACCOUNT_ID","ADDON_VERSION","CLUSTER_NAME","COVERAGE_STATUS","ECS_CLUSTER_NAME","EKS_CLUSTER_NAME","INSTANCE_ID","ISSUE","UPDATED_AT"
            break
        }

        # Amazon.GuardDuty.DestinationType
        "New-GDPublishingDestination/DestinationType"
        {
            $v = "S3"
            break
        }

        # Amazon.GuardDuty.EbsSnapshotPreservation
        "Update-GDMalwareScanSetting/EbsSnapshotPreservation"
        {
            $v = "NO_RETENTION","RETENTION_WITH_FINDING"
            break
        }

        # Amazon.GuardDuty.Feedback
        "Update-GDFindingFeedback/Feedback"
        {
            $v = "NOT_USEFUL","USEFUL"
            break
        }

        # Amazon.GuardDuty.FilterAction
        {
            ($_ -eq "New-GDFilter/Action") -Or
            ($_ -eq "Update-GDFilter/Action")
        }
        {
            $v = "ARCHIVE","NOOP"
            break
        }

        # Amazon.GuardDuty.FindingPublishingFrequency
        {
            ($_ -eq "New-GDDetector/FindingPublishingFrequency") -Or
            ($_ -eq "Update-GDDetector/FindingPublishingFrequency")
        }
        {
            $v = "FIFTEEN_MINUTES","ONE_HOUR","SIX_HOURS"
            break
        }

        # Amazon.GuardDuty.GroupByType
        "Get-GDFindingStatistic/GroupBy"
        {
            $v = "ACCOUNT","DATE","FINDING_TYPE","RESOURCE","SEVERITY"
            break
        }

        # Amazon.GuardDuty.IpSetFormat
        "New-GDIPSet/Format"
        {
            $v = "ALIEN_VAULT","FIRE_EYE","OTX_CSV","PROOF_POINT","STIX","TXT"
            break
        }

        # Amazon.GuardDuty.MalwareProtectionPlanTaggingActionStatus
        {
            ($_ -eq "New-GDMalwareProtectionPlan/Tagging_Status") -Or
            ($_ -eq "Update-GDMalwareProtectionPlan/Tagging_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.GuardDuty.OrderBy
        {
            ($_ -eq "Get-GDFindingStatistic/OrderBy") -Or
            ($_ -eq "Get-GDCoverageList/SortCriteria_OrderBy")
        }
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.GuardDuty.ThreatIntelSetFormat
        "New-GDThreatIntelSet/Format"
        {
            $v = "ALIEN_VAULT","FIRE_EYE","OTX_CSV","PROOF_POINT","STIX","TXT"
            break
        }

        # Amazon.GuardDuty.UsageStatisticType
        "Get-GDUsageStatistic/UsageStatisticType"
        {
            $v = "SUM_BY_ACCOUNT","SUM_BY_DATA_SOURCE","SUM_BY_FEATURES","SUM_BY_RESOURCE","TOP_ACCOUNTS_BY_FEATURE","TOP_RESOURCES"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GD_map = @{
    "Action"=@("New-GDFilter","Update-GDFilter")
    "AutoEnableOrganizationMember"=@("Update-GDOrganizationConfiguration")
    "DestinationType"=@("New-GDPublishingDestination")
    "EbsSnapshotPreservation"=@("Update-GDMalwareScanSetting")
    "Feedback"=@("Update-GDFindingFeedback")
    "FindingPublishingFrequency"=@("New-GDDetector","Update-GDDetector")
    "Format"=@("New-GDIPSet","New-GDThreatIntelSet")
    "GroupBy"=@("Get-GDFindingStatistic")
    "OrderBy"=@("Get-GDFindingStatistic")
    "SortCriteria_AttributeName"=@("Get-GDCoverageList")
    "SortCriteria_OrderBy"=@("Get-GDCoverageList")
    "Tagging_Status"=@("New-GDMalwareProtectionPlan","Update-GDMalwareProtectionPlan")
    "UsageStatisticType"=@("Get-GDUsageStatistic")
}

_awsArgumentCompleterRegistration $GD_Completers $GD_map

$GD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.GD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$GD_SelectMap = @{
    "Select"=@("Receive-GDAdministratorInvitation",
               "Confirm-GDInvitation",
               "Backup-GDFinding",
               "New-GDDetector",
               "New-GDFilter",
               "New-GDIPSet",
               "New-GDMalwareProtectionPlan",
               "New-GDMember",
               "New-GDPublishingDestination",
               "New-GDSampleFinding",
               "New-GDThreatIntelSet",
               "Deny-GDInvitation",
               "Remove-GDDetector",
               "Remove-GDFilter",
               "Remove-GDInvitation",
               "Remove-GDIPSet",
               "Remove-GDMalwareProtectionPlan",
               "Remove-GDMember",
               "Remove-GDPublishingDestination",
               "Remove-GDThreatIntelSet",
               "Get-GDMalwareScan",
               "Get-GDOrganizationConfiguration",
               "Get-GDPublishingDestination",
               "Disable-GDOrganizationAdminAccount",
               "Remove-GDFromAdministratorAccount",
               "Unregister-GDFromMasterAccount",
               "Unregister-GDMember",
               "Enable-GDOrganizationAdminAccount",
               "Get-GDAdministratorAccount",
               "Get-GDCoverageStatistic",
               "Get-GDDetector",
               "Get-GDFilter",
               "Get-GDFinding",
               "Get-GDFindingStatistic",
               "Get-GDInvitationCount",
               "Get-GDIPSet",
               "Get-GDMalwareProtectionPlan",
               "Get-GDMalwareScanSetting",
               "Get-GDMasterAccount",
               "Get-GDMemberDetector",
               "Get-GDMember",
               "Get-GDOrganizationStatistic",
               "Get-GDRemainingFreeTrialDay",
               "Get-GDThreatIntelSet",
               "Get-GDUsageStatistic",
               "Send-GDMemberInvitation",
               "Get-GDCoverageList",
               "Get-GDDetectorList",
               "Get-GDFilterList",
               "Get-GDFindingList",
               "Get-GDInvitationList",
               "Get-GDIPSetList",
               "Get-GDMalwareProtectionPlanList",
               "Get-GDMemberList",
               "Get-GDOrganizationAdminAccountList",
               "Get-GDPublishingDestinationList",
               "Get-GDResourceTag",
               "Get-GDThreatIntelSetList",
               "Start-GDMalwareScan",
               "Start-GDMonitoringMember",
               "Stop-GDMonitoringMember",
               "Add-GDResourceTag",
               "Restore-GDFinding",
               "Remove-GDResourceTag",
               "Update-GDDetector",
               "Update-GDFilter",
               "Update-GDFindingFeedback",
               "Update-GDIPSet",
               "Update-GDMalwareProtectionPlan",
               "Update-GDMalwareScanSetting",
               "Update-GDMemberDetector",
               "Update-GDOrganizationConfiguration",
               "Update-GDPublishingDestination",
               "Update-GDThreatIntelSet")
}

_awsArgumentCompleterRegistration $GD_SelectCompleters $GD_SelectMap
# Argument completions for service AWS Health


$HLTH_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AWSHealth.EventAggregateField
        "Get-HLTHEventAggregate/AggregateField"
        {
            $v = "eventTypeCategory"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$HLTH_map = @{
    "AggregateField"=@("Get-HLTHEventAggregate")
}

_awsArgumentCompleterRegistration $HLTH_Completers $HLTH_map

$HLTH_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.HLTH.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$HLTH_SelectMap = @{
    "Select"=@("Get-HLTHAffectedAccountsForOrganization",
               "Get-HLTHAffectedEntity",
               "Get-HLTHAffectedEntitiesForOrganization",
               "Get-HLTHEntityAggregate",
               "Get-HLTHEntityAggregatesForOrganization",
               "Get-HLTHEventAggregate",
               "Get-HLTHEventDetail",
               "Get-HLTHEventDetailsForOrganization",
               "Get-HLTHEvent",
               "Get-HLTHEventsForOrganization",
               "Get-HLTHEventType",
               "Get-HLTHHealthServiceStatusForOrganization",
               "Disable-HLTHHealthServiceAccessForOrganization",
               "Enable-HLTHHealthServiceAccessForOrganization")
}

_awsArgumentCompleterRegistration $HLTH_SelectCompleters $HLTH_SelectMap
# Argument completions for service Amazon HealthLake


$AHL_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.HealthLake.AuthorizationStrategy
        "New-AHLFHIRDatastore/IdentityProviderConfiguration_AuthorizationStrategy"
        {
            $v = "AWS_AUTH","SMART_ON_FHIR_V1"
            break
        }

        # Amazon.HealthLake.CmkType
        "New-AHLFHIRDatastore/KmsEncryptionConfig_CmkType"
        {
            $v = "AWS_OWNED_KMS_KEY","CUSTOMER_MANAGED_KMS_KEY"
            break
        }

        # Amazon.HealthLake.DatastoreStatus
        "Get-AHLFHIRDatastoreList/Filter_DatastoreStatus"
        {
            $v = "ACTIVE","CREATE_FAILED","CREATING","DELETED","DELETING"
            break
        }

        # Amazon.HealthLake.FHIRVersion
        "New-AHLFHIRDatastore/DatastoreTypeVersion"
        {
            $v = "R4"
            break
        }

        # Amazon.HealthLake.JobStatus
        {
            ($_ -eq "Get-AHLFHIRExportJobList/JobStatus") -Or
            ($_ -eq "Get-AHLFHIRImportJobList/JobStatus")
        }
        {
            $v = "CANCEL_COMPLETED","CANCEL_FAILED","CANCEL_IN_PROGRESS","CANCEL_SUBMITTED","COMPLETED","COMPLETED_WITH_ERRORS","FAILED","IN_PROGRESS","SUBMITTED"
            break
        }

        # Amazon.HealthLake.PreloadDataType
        "New-AHLFHIRDatastore/PreloadDataConfig_PreloadDataType"
        {
            $v = "SYNTHEA"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AHL_map = @{
    "DatastoreTypeVersion"=@("New-AHLFHIRDatastore")
    "Filter_DatastoreStatus"=@("Get-AHLFHIRDatastoreList")
    "IdentityProviderConfiguration_AuthorizationStrategy"=@("New-AHLFHIRDatastore")
    "JobStatus"=@("Get-AHLFHIRExportJobList","Get-AHLFHIRImportJobList")
    "KmsEncryptionConfig_CmkType"=@("New-AHLFHIRDatastore")
    "PreloadDataConfig_PreloadDataType"=@("New-AHLFHIRDatastore")
}

_awsArgumentCompleterRegistration $AHL_Completers $AHL_map

$AHL_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AHL.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AHL_SelectMap = @{
    "Select"=@("New-AHLFHIRDatastore",
               "Remove-AHLFHIRDatastore",
               "Get-AHLFHIRDatastore",
               "Get-AHLFHIRExportJob",
               "Get-AHLFHIRImportJob",
               "Get-AHLFHIRDatastoreList",
               "Get-AHLFHIRExportJobList",
               "Get-AHLFHIRImportJobList",
               "Get-AHLResourceTag",
               "Start-AHLFHIRExportJob",
               "Start-AHLFHIRImportJob",
               "Add-AHLResourceTag",
               "Remove-AHLResourceTag")
}

_awsArgumentCompleterRegistration $AHL_SelectCompleters $AHL_SelectMap
# Argument completions for service AWS Identity and Access Management


$IAM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IdentityManagement.AccessAdvisorUsageGranularityType
        "Request-IAMServiceLastAccessedDetail/Granularity"
        {
            $v = "ACTION_LEVEL","SERVICE_LEVEL"
            break
        }

        # Amazon.IdentityManagement.AssignmentStatusType
        "Get-IAMVirtualMFADevice/AssignmentStatus"
        {
            $v = "Any","Assigned","Unassigned"
            break
        }

        # Amazon.IdentityManagement.EncodingType
        "Get-IAMSSHPublicKey/Encoding"
        {
            $v = "PEM","SSH"
            break
        }

        # Amazon.IdentityManagement.EntityType
        "Get-IAMEntitiesForPolicy/EntityFilter"
        {
            $v = "AWSManagedPolicy","Group","LocalManagedPolicy","Role","User"
            break
        }

        # Amazon.IdentityManagement.GlobalEndpointTokenVersion
        "Set-IAMSecurityTokenServicePreference/GlobalEndpointTokenVersion"
        {
            $v = "v1Token","v2Token"
            break
        }

        # Amazon.IdentityManagement.PolicyScopeType
        "Get-IAMPolicyList/Scope"
        {
            $v = "All","AWS","Local"
            break
        }

        # Amazon.IdentityManagement.PolicyUsageType
        {
            ($_ -eq "Get-IAMEntitiesForPolicy/PolicyUsageFilter") -Or
            ($_ -eq "Get-IAMPolicyList/PolicyUsageFilter")
        }
        {
            $v = "PermissionsBoundary","PermissionsPolicy"
            break
        }

        # Amazon.IdentityManagement.SortKeyType
        "Get-IAMOrganizationsAccessReport/SortKey"
        {
            $v = "LAST_AUTHENTICATED_TIME_ASCENDING","LAST_AUTHENTICATED_TIME_DESCENDING","SERVICE_NAMESPACE_ASCENDING","SERVICE_NAMESPACE_DESCENDING"
            break
        }

        # Amazon.IdentityManagement.StatusType
        {
            ($_ -eq "Update-IAMAccessKey/Status") -Or
            ($_ -eq "Update-IAMServiceSpecificCredential/Status") -Or
            ($_ -eq "Update-IAMSigningCertificate/Status") -Or
            ($_ -eq "Update-IAMSSHPublicKey/Status")
        }
        {
            $v = "Active","Inactive"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IAM_map = @{
    "AssignmentStatus"=@("Get-IAMVirtualMFADevice")
    "Encoding"=@("Get-IAMSSHPublicKey")
    "EntityFilter"=@("Get-IAMEntitiesForPolicy")
    "GlobalEndpointTokenVersion"=@("Set-IAMSecurityTokenServicePreference")
    "Granularity"=@("Request-IAMServiceLastAccessedDetail")
    "PolicyUsageFilter"=@("Get-IAMEntitiesForPolicy","Get-IAMPolicyList")
    "Scope"=@("Get-IAMPolicyList")
    "SortKey"=@("Get-IAMOrganizationsAccessReport")
    "Status"=@("Update-IAMAccessKey","Update-IAMServiceSpecificCredential","Update-IAMSigningCertificate","Update-IAMSSHPublicKey")
}

_awsArgumentCompleterRegistration $IAM_Completers $IAM_map

$IAM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IAM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IAM_SelectMap = @{
    "Select"=@("Add-IAMClientIDToOpenIDConnectProvider",
               "Add-IAMRoleToInstanceProfile",
               "Add-IAMUserToGroup",
               "Register-IAMGroupPolicy",
               "Register-IAMRolePolicy",
               "Register-IAMUserPolicy",
               "Edit-IAMPassword",
               "New-IAMAccessKey",
               "New-IAMAccountAlias",
               "New-IAMGroup",
               "New-IAMInstanceProfile",
               "New-IAMLoginProfile",
               "New-IAMOpenIDConnectProvider",
               "New-IAMPolicy",
               "New-IAMPolicyVersion",
               "New-IAMRole",
               "New-IAMSAMLProvider",
               "New-IAMServiceLinkedRole",
               "New-IAMServiceSpecificCredential",
               "New-IAMUser",
               "New-IAMVirtualMFADevice",
               "Disable-IAMMFADevice",
               "Remove-IAMAccessKey",
               "Remove-IAMAccountAlias",
               "Remove-IAMAccountPasswordPolicy",
               "Remove-IAMGroup",
               "Remove-IAMGroupPolicy",
               "Remove-IAMInstanceProfile",
               "Remove-IAMLoginProfile",
               "Remove-IAMOpenIDConnectProvider",
               "Remove-IAMPolicy",
               "Remove-IAMPolicyVersion",
               "Remove-IAMRole",
               "Remove-IAMRolePermissionsBoundary",
               "Remove-IAMRolePolicy",
               "Remove-IAMSAMLProvider",
               "Remove-IAMServerCertificate",
               "Remove-IAMServiceLinkedRole",
               "Remove-IAMServiceSpecificCredential",
               "Remove-IAMSigningCertificate",
               "Remove-IAMSSHPublicKey",
               "Remove-IAMUser",
               "Remove-IAMUserPermissionsBoundary",
               "Remove-IAMUserPolicy",
               "Remove-IAMVirtualMFADevice",
               "Unregister-IAMGroupPolicy",
               "Unregister-IAMRolePolicy",
               "Unregister-IAMUserPolicy",
               "Enable-IAMMFADevice",
               "Request-IAMCredentialReport",
               "New-IAMOrganizationsAccessReport",
               "Request-IAMServiceLastAccessedDetail",
               "Get-IAMAccessKeyLastUsed",
               "Get-IAMAccountAuthorizationDetail",
               "Get-IAMAccountPasswordPolicy",
               "Get-IAMAccountSummary",
               "Get-IAMContextKeysForCustomPolicy",
               "Get-IAMContextKeysForPrincipalPolicy",
               "Get-IAMCredentialReport",
               "Get-IAMGroup",
               "Get-IAMGroupPolicy",
               "Get-IAMInstanceProfile",
               "Get-IAMLoginProfile",
               "Get-IAMMFADeviceMetadata",
               "Get-IAMOpenIDConnectProvider",
               "Get-IAMOrganizationsAccessReport",
               "Get-IAMPolicy",
               "Get-IAMPolicyVersion",
               "Get-IAMRole",
               "Get-IAMRolePolicy",
               "Get-IAMSAMLProvider",
               "Get-IAMServerCertificate",
               "Get-IAMServiceLastAccessedDetail",
               "Get-IAMServiceLastAccessedDetailWithEntity",
               "Get-IAMServiceLinkedRoleDeletionStatus",
               "Get-IAMSSHPublicKey",
               "Get-IAMUser",
               "Get-IAMUserPolicy",
               "Get-IAMAccessKey",
               "Get-IAMAccountAlias",
               "Get-IAMAttachedGroupPolicyList",
               "Get-IAMAttachedRolePolicyList",
               "Get-IAMAttachedUserPolicyList",
               "Get-IAMEntitiesForPolicy",
               "Get-IAMGroupPolicyList",
               "Get-IAMGroupList",
               "Get-IAMGroupForUser",
               "Get-IAMInstanceProfileList",
               "Get-IAMInstanceProfileForRole",
               "Get-IAMInstanceProfileTagList",
               "Get-IAMMFADevice",
               "Get-IAMMFADeviceTagList",
               "Get-IAMOpenIDConnectProviderList",
               "Get-IAMOpenIDConnectProviderTagList",
               "Get-IAMPolicyList",
               "Get-IAMPolicyGrantingServiceAccessList",
               "Get-IAMPolicyTagList",
               "Get-IAMPolicyVersionList",
               "Get-IAMRolePolicyList",
               "Get-IAMRoleList",
               "Get-IAMRoleTagList",
               "Get-IAMSAMLProviderList",
               "Get-IAMSAMLProviderTagList",
               "Get-IAMServerCertificateList",
               "Get-IAMServerCertificateTagList",
               "Get-IAMServiceSpecificCredentialList",
               "Get-IAMSigningCertificate",
               "Get-IAMSSHPublicKeyList",
               "Get-IAMUserPolicyList",
               "Get-IAMUserList",
               "Get-IAMUserTagList",
               "Get-IAMVirtualMFADevice",
               "Write-IAMGroupPolicy",
               "Set-IAMRolePermissionsBoundary",
               "Write-IAMRolePolicy",
               "Set-IAMUserPermissionsBoundary",
               "Write-IAMUserPolicy",
               "Remove-IAMClientIDFromOpenIDConnectProvider",
               "Remove-IAMRoleFromInstanceProfile",
               "Remove-IAMUserFromGroup",
               "Reset-IAMServiceSpecificCredential",
               "Sync-IAMMFADevice",
               "Set-IAMDefaultPolicyVersion",
               "Set-IAMSecurityTokenServicePreference",
               "Test-IAMCustomPolicy",
               "Test-IAMPrincipalPolicy",
               "Add-IAMInstanceProfileTag",
               "Add-IAMMFADeviceTag",
               "Add-IAMOpenIDConnectProviderTag",
               "Add-IAMPolicyTag",
               "Add-IAMRoleTag",
               "Add-IAMSAMLProviderTag",
               "Add-IAMServerCertificateTag",
               "Add-IAMUserTag",
               "Remove-IAMInstanceProfileTag",
               "Remove-IAMMFADeviceTag",
               "Remove-IAMOpenIDConnectProviderTag",
               "Remove-IAMPolicyTag",
               "Remove-IAMRoleTag",
               "Remove-IAMSAMLProviderTag",
               "Remove-IAMServerCertificateTag",
               "Remove-IAMUserTag",
               "Update-IAMAccessKey",
               "Update-IAMAccountPasswordPolicy",
               "Update-IAMAssumeRolePolicy",
               "Update-IAMGroup",
               "Update-IAMLoginProfile",
               "Update-IAMOpenIDConnectProviderThumbprint",
               "Update-IAMRole",
               "Update-IAMRoleDescription",
               "Update-IAMSAMLProvider",
               "Update-IAMServerCertificate",
               "Update-IAMServiceSpecificCredential",
               "Update-IAMSigningCertificate",
               "Update-IAMSSHPublicKey",
               "Update-IAMUser",
               "Publish-IAMServerCertificate",
               "Publish-IAMSigningCertificate",
               "Publish-IAMSSHPublicKey")
}

_awsArgumentCompleterRegistration $IAM_SelectCompleters $IAM_SelectMap
# Argument completions for service AWS Identity Store


$IDS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IDS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IDS_SelectMap = @{
    "Select"=@("New-IDSGroup",
               "New-IDSGroupMembership",
               "New-IDSUser",
               "Remove-IDSGroup",
               "Remove-IDSGroupMembership",
               "Remove-IDSUser",
               "Get-IDSGroup",
               "Get-IDSGroupMembership",
               "Get-IDSUser",
               "Get-IDSGroupId",
               "Get-IDSGroupMembershipId",
               "Get-IDSUserId",
               "Assert-IDSMemberInGroup",
               "Get-IDSGroupMembershipList",
               "Get-IDSGroupMembershipsForMemberList",
               "Find-IDSGroupList",
               "Find-IDSUserList",
               "Update-IDSGroup",
               "Update-IDSUser")
}

_awsArgumentCompleterRegistration $IDS_SelectCompleters $IDS_SelectMap
# Argument completions for service EC2 Image Builder


$EC2IB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Imagebuilder.ComponentFormat
        "Import-EC2IBComponent/Format"
        {
            $v = "SHELL"
            break
        }

        # Amazon.Imagebuilder.ComponentType
        "Import-EC2IBComponent/Type"
        {
            $v = "BUILD","TEST"
            break
        }

        # Amazon.Imagebuilder.ContainerRepositoryService
        "New-EC2IBContainerRecipe/TargetRepository_Service"
        {
            $v = "ECR"
            break
        }

        # Amazon.Imagebuilder.ContainerType
        "New-EC2IBContainerRecipe/ContainerType"
        {
            $v = "DOCKER"
            break
        }

        # Amazon.Imagebuilder.LifecyclePolicyResourceType
        {
            ($_ -eq "New-EC2IBLifecyclePolicy/ResourceType") -Or
            ($_ -eq "Update-EC2IBLifecyclePolicy/ResourceType")
        }
        {
            $v = "AMI_IMAGE","CONTAINER_IMAGE"
            break
        }

        # Amazon.Imagebuilder.LifecyclePolicyStatus
        {
            ($_ -eq "New-EC2IBLifecyclePolicy/Status") -Or
            ($_ -eq "Update-EC2IBLifecyclePolicy/Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Imagebuilder.LifecyclePolicyTimeUnit
        "Start-EC2IBResourceStateUpdate/LastLaunched_Unit"
        {
            $v = "DAYS","MONTHS","WEEKS","YEARS"
            break
        }

        # Amazon.Imagebuilder.Ownership
        {
            ($_ -eq "Get-EC2IBComponentList/Owner") -Or
            ($_ -eq "Get-EC2IBContainerRecipeList/Owner") -Or
            ($_ -eq "Get-EC2IBImageList/Owner") -Or
            ($_ -eq "Get-EC2IBImageRecipeList/Owner") -Or
            ($_ -eq "Get-EC2IBWorkflowList/Owner")
        }
        {
            $v = "Amazon","Self","Shared","ThirdParty"
            break
        }

        # Amazon.Imagebuilder.PipelineExecutionStartCondition
        {
            ($_ -eq "New-EC2IBImagePipeline/Schedule_PipelineExecutionStartCondition") -Or
            ($_ -eq "Update-EC2IBImagePipeline/Schedule_PipelineExecutionStartCondition")
        }
        {
            $v = "EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE","EXPRESSION_MATCH_ONLY"
            break
        }

        # Amazon.Imagebuilder.PipelineStatus
        {
            ($_ -eq "New-EC2IBImagePipeline/Status") -Or
            ($_ -eq "Update-EC2IBImagePipeline/Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Imagebuilder.Platform
        {
            ($_ -eq "Import-EC2IBComponent/Platform") -Or
            ($_ -eq "Import-EC2IBVmImage/Platform") -Or
            ($_ -eq "New-EC2IBComponent/Platform") -Or
            ($_ -eq "New-EC2IBContainerRecipe/PlatformOverride")
        }
        {
            $v = "Linux","macOS","Windows"
            break
        }

        # Amazon.Imagebuilder.ResourceStatus
        "Start-EC2IBResourceStateUpdate/State_Status"
        {
            $v = "AVAILABLE","DELETED","DEPRECATED","DISABLED"
            break
        }

        # Amazon.Imagebuilder.TenancyType
        {
            ($_ -eq "New-EC2IBInfrastructureConfiguration/Placement_Tenancy") -Or
            ($_ -eq "Update-EC2IBInfrastructureConfiguration/Placement_Tenancy")
        }
        {
            $v = "dedicated","default","host"
            break
        }

        # Amazon.Imagebuilder.WorkflowStepActionType
        "Send-EC2IBWorkflowStepAction/Action"
        {
            $v = "RESUME","STOP"
            break
        }

        # Amazon.Imagebuilder.WorkflowType
        "New-EC2IBWorkflow/Type"
        {
            $v = "BUILD","DISTRIBUTION","TEST"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EC2IB_map = @{
    "Action"=@("Send-EC2IBWorkflowStepAction")
    "ContainerType"=@("New-EC2IBContainerRecipe")
    "Format"=@("Import-EC2IBComponent")
    "LastLaunched_Unit"=@("Start-EC2IBResourceStateUpdate")
    "Owner"=@("Get-EC2IBComponentList","Get-EC2IBContainerRecipeList","Get-EC2IBImageList","Get-EC2IBImageRecipeList","Get-EC2IBWorkflowList")
    "Placement_Tenancy"=@("New-EC2IBInfrastructureConfiguration","Update-EC2IBInfrastructureConfiguration")
    "Platform"=@("Import-EC2IBComponent","Import-EC2IBVmImage","New-EC2IBComponent")
    "PlatformOverride"=@("New-EC2IBContainerRecipe")
    "ResourceType"=@("New-EC2IBLifecyclePolicy","Update-EC2IBLifecyclePolicy")
    "Schedule_PipelineExecutionStartCondition"=@("New-EC2IBImagePipeline","Update-EC2IBImagePipeline")
    "State_Status"=@("Start-EC2IBResourceStateUpdate")
    "Status"=@("New-EC2IBImagePipeline","New-EC2IBLifecyclePolicy","Update-EC2IBImagePipeline","Update-EC2IBLifecyclePolicy")
    "TargetRepository_Service"=@("New-EC2IBContainerRecipe")
    "Type"=@("Import-EC2IBComponent","New-EC2IBWorkflow")
}

_awsArgumentCompleterRegistration $EC2IB_Completers $EC2IB_map

$EC2IB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EC2IB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EC2IB_SelectMap = @{
    "Select"=@("Stop-EC2IBImageCreation",
               "Stop-EC2IBLifecycleExecution",
               "New-EC2IBComponent",
               "New-EC2IBContainerRecipe",
               "New-EC2IBDistributionConfiguration",
               "New-EC2IBImage",
               "New-EC2IBImagePipeline",
               "New-EC2IBImageRecipe",
               "New-EC2IBInfrastructureConfiguration",
               "New-EC2IBLifecyclePolicy",
               "New-EC2IBWorkflow",
               "Remove-EC2IBComponent",
               "Remove-EC2IBContainerRecipe",
               "Remove-EC2IBDistributionConfiguration",
               "Remove-EC2IBImage",
               "Remove-EC2IBImagePipeline",
               "Remove-EC2IBImageRecipe",
               "Remove-EC2IBInfrastructureConfiguration",
               "Remove-EC2IBLifecyclePolicy",
               "Remove-EC2IBWorkflow",
               "Get-EC2IBComponent",
               "Get-EC2IBComponentPolicy",
               "Get-EC2IBContainerRecipe",
               "Get-EC2IBContainerRecipePolicy",
               "Get-EC2IBDistributionConfiguration",
               "Get-EC2IBImage",
               "Get-EC2IBImagePipeline",
               "Get-EC2IBImagePolicy",
               "Get-EC2IBImageRecipe",
               "Get-EC2IBImageRecipePolicy",
               "Get-EC2IBInfrastructureConfiguration",
               "Get-EC2IBLifecycleExecution",
               "Get-EC2IBLifecyclePolicy",
               "Get-EC2IBWorkflow",
               "Get-EC2IBWorkflowExecution",
               "Get-EC2IBWorkflowStepExecution",
               "Import-EC2IBComponent",
               "Import-EC2IBVmImage",
               "Get-EC2IBComponentBuildVersionList",
               "Get-EC2IBComponentList",
               "Get-EC2IBContainerRecipeList",
               "Get-EC2IBDistributionConfigurationList",
               "Get-EC2IBImageBuildVersionList",
               "Get-EC2IBImagePackageList",
               "Get-EC2IBImagePipelineImageList",
               "Get-EC2IBImagePipelineList",
               "Get-EC2IBImageRecipeList",
               "Get-EC2IBImageList",
               "Get-EC2IBImageScanFindingAggregationList",
               "Get-EC2IBImageScanFindingList",
               "Get-EC2IBInfrastructureConfigurationList",
               "Get-EC2IBLifecycleExecutionResourceList",
               "Get-EC2IBLifecycleExecutionList",
               "Get-EC2IBLifecyclePolicyList",
               "Get-EC2IBResourceTag",
               "Get-EC2IBWaitingWorkflowStepList",
               "Get-EC2IBWorkflowBuildVersionList",
               "Get-EC2IBWorkflowExecutionList",
               "Get-EC2IBWorkflowList",
               "Get-EC2IBWorkflowStepExecutionList",
               "Write-EC2IBComponentPolicy",
               "Write-EC2IBContainerRecipePolicy",
               "Write-EC2IBImagePolicy",
               "Write-EC2IBImageRecipePolicy",
               "Send-EC2IBWorkflowStepAction",
               "Start-EC2IBImagePipelineExecution",
               "Start-EC2IBResourceStateUpdate",
               "Add-EC2IBResourceTag",
               "Remove-EC2IBResourceTag",
               "Update-EC2IBDistributionConfiguration",
               "Update-EC2IBImagePipeline",
               "Update-EC2IBInfrastructureConfiguration",
               "Update-EC2IBLifecyclePolicy")
}

_awsArgumentCompleterRegistration $EC2IB_SelectCompleters $EC2IB_SelectMap
# Argument completions for service AWS Import/Export


$IE_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ImportExport.JobType
        {
            ($_ -eq "New-IEJob/JobType") -Or
            ($_ -eq "Update-IEJob/JobType")
        }
        {
            $v = "Export","Import"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IE_map = @{
    "JobType"=@("New-IEJob","Update-IEJob")
}

_awsArgumentCompleterRegistration $IE_Completers $IE_map

$IE_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IE.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IE_SelectMap = @{
    "Select"=@("Stop-IEJob",
               "New-IEJob",
               "Get-IEShippingLabel",
               "Get-IEStatus",
               "Get-IEJob",
               "Update-IEJob")
}

_awsArgumentCompleterRegistration $IE_SelectCompleters $IE_SelectMap
# Argument completions for service Amazon Inspector


$INS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Inspector.InspectorEvent
        {
            ($_ -eq "Add-INSEventSubscription/Event") -Or
            ($_ -eq "Remove-INSEventSubscription/Event")
        }
        {
            $v = "ASSESSMENT_RUN_COMPLETED","ASSESSMENT_RUN_STARTED","ASSESSMENT_RUN_STATE_CHANGED","FINDING_REPORTED","OTHER"
            break
        }

        # Amazon.Inspector.Locale
        {
            ($_ -eq "Get-INSExclusion/Locale") -Or
            ($_ -eq "Get-INSExclusionsPreview/Locale") -Or
            ($_ -eq "Get-INSFinding/Locale") -Or
            ($_ -eq "Get-INSRulesPackage/Locale")
        }
        {
            $v = "EN_US"
            break
        }

        # Amazon.Inspector.ReportFileFormat
        "Get-INSAssessmentReport/ReportFileFormat"
        {
            $v = "HTML","PDF"
            break
        }

        # Amazon.Inspector.ReportType
        "Get-INSAssessmentReport/ReportType"
        {
            $v = "FINDING","FULL"
            break
        }

        # Amazon.Inspector.StopAction
        "Stop-INSAssessmentRun/StopAction"
        {
            $v = "SKIP_EVALUATION","START_EVALUATION"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$INS_map = @{
    "Event"=@("Add-INSEventSubscription","Remove-INSEventSubscription")
    "Locale"=@("Get-INSExclusion","Get-INSExclusionsPreview","Get-INSFinding","Get-INSRulesPackage")
    "ReportFileFormat"=@("Get-INSAssessmentReport")
    "ReportType"=@("Get-INSAssessmentReport")
    "StopAction"=@("Stop-INSAssessmentRun")
}

_awsArgumentCompleterRegistration $INS_Completers $INS_map

$INS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.INS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$INS_SelectMap = @{
    "Select"=@("Add-INSFindingAttribute",
               "New-INSAssessmentTarget",
               "New-INSAssessmentTemplate",
               "New-INSExclusionsPreview",
               "New-INSResourceGroup",
               "Remove-INSAssessmentRun",
               "Remove-INSAssessmentTarget",
               "Remove-INSAssessmentTemplate",
               "Get-INSAssessmentRun",
               "Get-INSAssessmentTarget",
               "Get-INSAssessmentTemplate",
               "Get-INSCrossAccountAccessRole",
               "Get-INSExclusion",
               "Get-INSFinding",
               "Get-INSResourceGroup",
               "Get-INSRulesPackage",
               "Get-INSAssessmentReport",
               "Get-INSExclusionsPreview",
               "Get-INSTelemetryMetadata",
               "Get-INSAssessmentRunAgent",
               "Get-INSAssessmentRunList",
               "Get-INSAssessmentTargetList",
               "Get-INSAssessmentTemplateList",
               "Get-INSEventSubscription",
               "Get-INSExclusionList",
               "Get-INSFindingList",
               "Get-INSRulesPackageList",
               "Get-INSResourceTagList",
               "Get-INSAgentPreview",
               "Register-INSCrossAccountAccessRole",
               "Remove-INSFindingAttribute",
               "Set-INSResourceTag",
               "Start-INSAssessmentRun",
               "Stop-INSAssessmentRun",
               "Add-INSEventSubscription",
               "Remove-INSEventSubscription",
               "Update-INSAssessmentTarget")
}

_awsArgumentCompleterRegistration $INS_SelectCompleters $INS_SelectMap
# Argument completions for service Inspector2


$INS2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Inspector2.AccountSortBy
        "Get-INS2FindingAggregationList/AccountAggregation_SortBy"
        {
            $v = "ALL","CRITICAL","HIGH"
            break
        }

        # Amazon.Inspector2.AggregationFindingType
        {
            ($_ -eq "Get-INS2FindingAggregationList/AccountAggregation_FindingType") -Or
            ($_ -eq "Get-INS2FindingAggregationList/FindingTypeAggregation_FindingType") -Or
            ($_ -eq "Get-INS2FindingAggregationList/TitleAggregation_FindingType")
        }
        {
            $v = "CODE_VULNERABILITY","NETWORK_REACHABILITY","PACKAGE_VULNERABILITY"
            break
        }

        # Amazon.Inspector2.AggregationResourceType
        {
            ($_ -eq "Get-INS2FindingAggregationList/AccountAggregation_ResourceType") -Or
            ($_ -eq "Get-INS2FindingAggregationList/FindingTypeAggregation_ResourceType") -Or
            ($_ -eq "Get-INS2FindingAggregationList/TitleAggregation_ResourceType")
        }
        {
            $v = "AWS_EC2_INSTANCE","AWS_ECR_CONTAINER_IMAGE","AWS_LAMBDA_FUNCTION"
            break
        }

        # Amazon.Inspector2.AggregationType
        "Get-INS2FindingAggregationList/AggregationType"
        {
            $v = "ACCOUNT","AMI","AWS_EC2_INSTANCE","AWS_ECR_CONTAINER","AWS_LAMBDA_FUNCTION","FINDING_TYPE","IMAGE_LAYER","LAMBDA_LAYER","PACKAGE","REPOSITORY","TITLE"
            break
        }

        # Amazon.Inspector2.AmiSortBy
        "Get-INS2FindingAggregationList/AmiAggregation_SortBy"
        {
            $v = "AFFECTED_INSTANCES","ALL","CRITICAL","HIGH"
            break
        }

        # Amazon.Inspector2.AwsEcrContainerSortBy
        "Get-INS2FindingAggregationList/AwsEcrContainerAggregation_SortBy"
        {
            $v = "ALL","CRITICAL","HIGH"
            break
        }

        # Amazon.Inspector2.CisReportFormat
        "Get-INS2CisScanReport/ReportFormat"
        {
            $v = "CSV","PDF"
            break
        }

        # Amazon.Inspector2.CisScanConfigurationsSortBy
        "Get-INS2CisScanConfigurationList/SortBy"
        {
            $v = "SCAN_CONFIGURATION_ARN","SCAN_NAME"
            break
        }

        # Amazon.Inspector2.CisScanResultDetailsSortBy
        "Get-INS2CisScanResultDetail/SortBy"
        {
            $v = "CHECK_ID","STATUS"
            break
        }

        # Amazon.Inspector2.CisScanResultsAggregatedByChecksSortBy
        "Get-INS2CisScanResultsAggregatedByCheckList/SortBy"
        {
            $v = "CHECK_ID","FAILED_COUNTS","PLATFORM","SECURITY_LEVEL","TITLE"
            break
        }

        # Amazon.Inspector2.CisScanResultsAggregatedByTargetResourceSortBy
        "Get-INS2CisScanResultsAggregatedByTargetResourceList/SortBy"
        {
            $v = "ACCOUNT_ID","FAILED_COUNTS","PLATFORM","RESOURCE_ID","TARGET_STATUS","TARGET_STATUS_REASON"
            break
        }

        # Amazon.Inspector2.CisSecurityLevel
        {
            ($_ -eq "New-INS2CisScanConfiguration/SecurityLevel") -Or
            ($_ -eq "Update-INS2CisScanConfiguration/SecurityLevel")
        }
        {
            $v = "LEVEL_1","LEVEL_2"
            break
        }

        # Amazon.Inspector2.CisSortOrder
        {
            ($_ -eq "Get-INS2CisScanConfigurationList/SortOrder") -Or
            ($_ -eq "Get-INS2CisScanList/SortOrder") -Or
            ($_ -eq "Get-INS2CisScanResultDetail/SortOrder") -Or
            ($_ -eq "Get-INS2CisScanResultsAggregatedByCheckList/SortOrder") -Or
            ($_ -eq "Get-INS2CisScanResultsAggregatedByTargetResourceList/SortOrder")
        }
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.Inspector2.Day
        {
            ($_ -eq "New-INS2CisScanConfiguration/Monthly_Day") -Or
            ($_ -eq "Update-INS2CisScanConfiguration/Monthly_Day")
        }
        {
            $v = "FRI","MON","SAT","SUN","THU","TUE","WED"
            break
        }

        # Amazon.Inspector2.Ec2InstanceSortBy
        "Get-INS2FindingAggregationList/Ec2InstanceAggregation_SortBy"
        {
            $v = "ALL","CRITICAL","HIGH","NETWORK_FINDINGS"
            break
        }

        # Amazon.Inspector2.Ec2ScanMode
        "Update-INS2Configuration/Ec2Configuration_ScanMode"
        {
            $v = "EC2_HYBRID","EC2_SSM_AGENT_BASED"
            break
        }

        # Amazon.Inspector2.EcrPullDateRescanDuration
        "Update-INS2Configuration/EcrConfiguration_PullDateRescanDuration"
        {
            $v = "DAYS_14","DAYS_180","DAYS_30","DAYS_60","DAYS_90"
            break
        }

        # Amazon.Inspector2.EcrRescanDuration
        "Update-INS2Configuration/EcrConfiguration_RescanDuration"
        {
            $v = "DAYS_14","DAYS_180","DAYS_30","DAYS_60","DAYS_90","LIFETIME"
            break
        }

        # Amazon.Inspector2.FilterAction
        {
            ($_ -eq "Get-INS2FilterList/Action") -Or
            ($_ -eq "New-INS2Filter/Action") -Or
            ($_ -eq "Update-INS2Filter/Action")
        }
        {
            $v = "NONE","SUPPRESS"
            break
        }

        # Amazon.Inspector2.FindingTypeSortBy
        "Get-INS2FindingAggregationList/FindingTypeAggregation_SortBy"
        {
            $v = "ALL","CRITICAL","HIGH"
            break
        }

        # Amazon.Inspector2.GroupKey
        "Get-INS2CoverageStatisticList/GroupBy"
        {
            $v = "ACCOUNT_ID","ECR_REPOSITORY_NAME","RESOURCE_TYPE","SCAN_STATUS_CODE","SCAN_STATUS_REASON"
            break
        }

        # Amazon.Inspector2.ImageLayerSortBy
        "Get-INS2FindingAggregationList/ImageLayerAggregation_SortBy"
        {
            $v = "ALL","CRITICAL","HIGH"
            break
        }

        # Amazon.Inspector2.LambdaFunctionSortBy
        "Get-INS2FindingAggregationList/LambdaFunctionAggregation_SortBy"
        {
            $v = "ALL","CRITICAL","HIGH"
            break
        }

        # Amazon.Inspector2.LambdaLayerSortBy
        "Get-INS2FindingAggregationList/LambdaLayerAggregation_SortBy"
        {
            $v = "ALL","CRITICAL","HIGH"
            break
        }

        # Amazon.Inspector2.ListCisScansDetailLevel
        "Get-INS2CisScanList/DetailLevel"
        {
            $v = "MEMBER","ORGANIZATION"
            break
        }

        # Amazon.Inspector2.ListCisScansSortBy
        "Get-INS2CisScanList/SortBy"
        {
            $v = "FAILED_CHECKS","SCAN_START_DATE","SCHEDULED_BY","STATUS"
            break
        }

        # Amazon.Inspector2.PackageSortBy
        "Get-INS2FindingAggregationList/PackageAggregation_SortBy"
        {
            $v = "ALL","CRITICAL","HIGH"
            break
        }

        # Amazon.Inspector2.ReportFormat
        "New-INS2FindingsReport/ReportFormat"
        {
            $v = "CSV","JSON"
            break
        }

        # Amazon.Inspector2.RepositorySortBy
        "Get-INS2FindingAggregationList/RepositoryAggregation_SortBy"
        {
            $v = "AFFECTED_IMAGES","ALL","CRITICAL","HIGH"
            break
        }

        # Amazon.Inspector2.ResourceType
        {
            ($_ -eq "Get-INS2EncryptionKey/ResourceType") -Or
            ($_ -eq "Reset-INS2EncryptionKey/ResourceType") -Or
            ($_ -eq "Update-INS2EncryptionKey/ResourceType")
        }
        {
            $v = "AWS_EC2_INSTANCE","AWS_ECR_CONTAINER_IMAGE","AWS_ECR_REPOSITORY","AWS_LAMBDA_FUNCTION"
            break
        }

        # Amazon.Inspector2.SbomReportFormat
        "New-INS2SbomExport/ReportFormat"
        {
            $v = "CYCLONEDX_1_4","SPDX_2_3"
            break
        }

        # Amazon.Inspector2.ScanType
        {
            ($_ -eq "Get-INS2EncryptionKey/ScanType") -Or
            ($_ -eq "Reset-INS2EncryptionKey/ScanType") -Or
            ($_ -eq "Update-INS2EncryptionKey/ScanType")
        }
        {
            $v = "CODE","NETWORK","PACKAGE"
            break
        }

        # Amazon.Inspector2.Service
        "Get-INS2AccountPermissionList/Service"
        {
            $v = "EC2","ECR","LAMBDA"
            break
        }

        # Amazon.Inspector2.SortField
        "Get-INS2FindingList/SortCriteria_Field"
        {
            $v = "AWS_ACCOUNT_ID","COMPONENT_TYPE","ECR_IMAGE_PUSHED_AT","ECR_IMAGE_REGISTRY","ECR_IMAGE_REPOSITORY_NAME","EPSS_SCORE","FINDING_STATUS","FINDING_TYPE","FIRST_OBSERVED_AT","INSPECTOR_SCORE","LAST_OBSERVED_AT","NETWORK_PROTOCOL","RESOURCE_TYPE","SEVERITY","VENDOR_SEVERITY","VULNERABILITY_ID","VULNERABILITY_SOURCE"
            break
        }

        # Amazon.Inspector2.SortOrder
        {
            ($_ -eq "Get-INS2FindingAggregationList/AccountAggregation_SortOrder") -Or
            ($_ -eq "Get-INS2FindingAggregationList/AmiAggregation_SortOrder") -Or
            ($_ -eq "Get-INS2FindingAggregationList/AwsEcrContainerAggregation_SortOrder") -Or
            ($_ -eq "Get-INS2FindingAggregationList/Ec2InstanceAggregation_SortOrder") -Or
            ($_ -eq "Get-INS2FindingAggregationList/FindingTypeAggregation_SortOrder") -Or
            ($_ -eq "Get-INS2FindingAggregationList/ImageLayerAggregation_SortOrder") -Or
            ($_ -eq "Get-INS2FindingAggregationList/LambdaFunctionAggregation_SortOrder") -Or
            ($_ -eq "Get-INS2FindingAggregationList/LambdaLayerAggregation_SortOrder") -Or
            ($_ -eq "Get-INS2FindingAggregationList/PackageAggregation_SortOrder") -Or
            ($_ -eq "Get-INS2FindingAggregationList/RepositoryAggregation_SortOrder") -Or
            ($_ -eq "Get-INS2FindingList/SortCriteria_SortOrder") -Or
            ($_ -eq "Get-INS2FindingAggregationList/TitleAggregation_SortOrder")
        }
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.Inspector2.StopCisSessionStatus
        "Stop-INS2CisSession/Message_Status"
        {
            $v = "FAILED","INTERRUPTED","SUCCESS","UNSUPPORTED_OS"
            break
        }

        # Amazon.Inspector2.TitleSortBy
        "Get-INS2FindingAggregationList/TitleAggregation_SortBy"
        {
            $v = "ALL","CRITICAL","HIGH"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$INS2_map = @{
    "AccountAggregation_FindingType"=@("Get-INS2FindingAggregationList")
    "AccountAggregation_ResourceType"=@("Get-INS2FindingAggregationList")
    "AccountAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "AccountAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
    "Action"=@("Get-INS2FilterList","New-INS2Filter","Update-INS2Filter")
    "AggregationType"=@("Get-INS2FindingAggregationList")
    "AmiAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "AmiAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
    "AwsEcrContainerAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "AwsEcrContainerAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
    "DetailLevel"=@("Get-INS2CisScanList")
    "Ec2Configuration_ScanMode"=@("Update-INS2Configuration")
    "Ec2InstanceAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "Ec2InstanceAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
    "EcrConfiguration_PullDateRescanDuration"=@("Update-INS2Configuration")
    "EcrConfiguration_RescanDuration"=@("Update-INS2Configuration")
    "FindingTypeAggregation_FindingType"=@("Get-INS2FindingAggregationList")
    "FindingTypeAggregation_ResourceType"=@("Get-INS2FindingAggregationList")
    "FindingTypeAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "FindingTypeAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
    "GroupBy"=@("Get-INS2CoverageStatisticList")
    "ImageLayerAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "ImageLayerAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
    "LambdaFunctionAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "LambdaFunctionAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
    "LambdaLayerAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "LambdaLayerAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
    "Message_Status"=@("Stop-INS2CisSession")
    "Monthly_Day"=@("New-INS2CisScanConfiguration","Update-INS2CisScanConfiguration")
    "PackageAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "PackageAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
    "ReportFormat"=@("Get-INS2CisScanReport","New-INS2FindingsReport","New-INS2SbomExport")
    "RepositoryAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "RepositoryAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
    "ResourceType"=@("Get-INS2EncryptionKey","Reset-INS2EncryptionKey","Update-INS2EncryptionKey")
    "ScanType"=@("Get-INS2EncryptionKey","Reset-INS2EncryptionKey","Update-INS2EncryptionKey")
    "SecurityLevel"=@("New-INS2CisScanConfiguration","Update-INS2CisScanConfiguration")
    "Service"=@("Get-INS2AccountPermissionList")
    "SortBy"=@("Get-INS2CisScanConfigurationList","Get-INS2CisScanList","Get-INS2CisScanResultDetail","Get-INS2CisScanResultsAggregatedByCheckList","Get-INS2CisScanResultsAggregatedByTargetResourceList")
    "SortCriteria_Field"=@("Get-INS2FindingList")
    "SortCriteria_SortOrder"=@("Get-INS2FindingList")
    "SortOrder"=@("Get-INS2CisScanConfigurationList","Get-INS2CisScanList","Get-INS2CisScanResultDetail","Get-INS2CisScanResultsAggregatedByCheckList","Get-INS2CisScanResultsAggregatedByTargetResourceList")
    "TitleAggregation_FindingType"=@("Get-INS2FindingAggregationList")
    "TitleAggregation_ResourceType"=@("Get-INS2FindingAggregationList")
    "TitleAggregation_SortBy"=@("Get-INS2FindingAggregationList")
    "TitleAggregation_SortOrder"=@("Get-INS2FindingAggregationList")
}

_awsArgumentCompleterRegistration $INS2_Completers $INS2_map

$INS2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.INS2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$INS2_SelectMap = @{
    "Select"=@("Register-INS2Member",
               "Get-INS2GetAccountStatus",
               "Get-INS2BatchGetCodeSnippet",
               "Get-INS2GetFindingDetail",
               "Get-INS2GetFreeTrialInfo",
               "Get-INS2BatchMemberEc2DeepInspectionStatus",
               "Update-INS2BatchMemberEc2DeepInspectionStatus",
               "Stop-INS2FindingsReport",
               "Stop-INS2SbomExport",
               "New-INS2CisScanConfiguration",
               "New-INS2Filter",
               "New-INS2FindingsReport",
               "New-INS2SbomExport",
               "Remove-INS2CisScanConfiguration",
               "Remove-INS2Filter",
               "Get-INS2OrganizationConfiguration",
               "Stop-INS2Service",
               "Disable-INS2DelegatedAdminAccount",
               "Unregister-INS2Member",
               "Stop-INS2Inspector",
               "Enable-INS2DelegatedAdminAccount",
               "Get-INS2CisScanReport",
               "Get-INS2CisScanResultDetail",
               "Get-INS2Configuration",
               "Get-INS2DelegatedAdminAccount",
               "Get-INS2Ec2DeepInspectionConfiguration",
               "Get-INS2EncryptionKey",
               "Get-INS2FindingsReportStatus",
               "Get-INS2Member",
               "Get-INS2SbomExport",
               "Get-INS2AccountPermissionList",
               "Get-INS2CisScanConfigurationList",
               "Get-INS2CisScanResultsAggregatedByCheckList",
               "Get-INS2CisScanResultsAggregatedByTargetResourceList",
               "Get-INS2CisScanList",
               "Get-INS2CoverageList",
               "Get-INS2CoverageStatisticList",
               "Get-INS2DelegatedAdminAccountList",
               "Get-INS2FilterList",
               "Get-INS2FindingAggregationList",
               "Get-INS2FindingList",
               "Get-INS2MemberList",
               "Get-INS2ResourceTag",
               "Get-INS2UsageTotalList",
               "Reset-INS2EncryptionKey",
               "Search-INS2Vulnerability",
               "Send-INS2CisSessionHealth",
               "Send-INS2CisSessionTelemetry",
               "Start-INS2CisSession",
               "Stop-INS2CisSession",
               "Add-INS2ResourceTag",
               "Remove-INS2ResourceTag",
               "Update-INS2CisScanConfiguration",
               "Update-INS2Configuration",
               "Update-INS2Ec2DeepInspectionConfiguration",
               "Update-INS2EncryptionKey",
               "Update-INS2Filter",
               "Update-INS2OrganizationConfiguration",
               "Update-INS2OrgEc2DeepInspectionConfiguration")
}

_awsArgumentCompleterRegistration $INS2_SelectCompleters $INS2_SelectMap
# Argument completions for service Inspector Scan


$ISCAN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.InspectorScan.OutputFormat
        "Invoke-ISCANSbomScan/OutputFormat"
        {
            $v = "CYCLONE_DX_1_5","INSPECTOR"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ISCAN_map = @{
    "OutputFormat"=@("Invoke-ISCANSbomScan")
}

_awsArgumentCompleterRegistration $ISCAN_Completers $ISCAN_map

$ISCAN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ISCAN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ISCAN_SelectMap = @{
    "Select"=@("Invoke-ISCANSbomScan")
}

_awsArgumentCompleterRegistration $ISCAN_SelectCompleters $ISCAN_SelectMap
# Argument completions for service Amazon CloudWatch Internet Monitor


$CWIM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.InternetMonitor.HealthEventStatus
        "Get-CWIMHealthEventList/EventStatus"
        {
            $v = "ACTIVE","RESOLVED"
            break
        }

        # Amazon.InternetMonitor.LocalHealthEventsConfigStatus
        {
            ($_ -eq "New-CWIMMonitor/AvailabilityLocalHealthEventsConfig_Status") -Or
            ($_ -eq "Update-CWIMMonitor/AvailabilityLocalHealthEventsConfig_Status") -Or
            ($_ -eq "New-CWIMMonitor/PerformanceLocalHealthEventsConfig_Status") -Or
            ($_ -eq "Update-CWIMMonitor/PerformanceLocalHealthEventsConfig_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.InternetMonitor.LogDeliveryStatus
        {
            ($_ -eq "New-CWIMMonitor/S3Config_LogDeliveryStatus") -Or
            ($_ -eq "Update-CWIMMonitor/S3Config_LogDeliveryStatus")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.InternetMonitor.MonitorConfigState
        "Update-CWIMMonitor/Status"
        {
            $v = "ACTIVE","ERROR","INACTIVE","PENDING"
            break
        }

        # Amazon.InternetMonitor.QueryType
        "Start-CWIMQuery/QueryType"
        {
            $v = "MEASUREMENTS","OVERALL_TRAFFIC_SUGGESTIONS","OVERALL_TRAFFIC_SUGGESTIONS_DETAILS","TOP_LOCATIONS","TOP_LOCATION_DETAILS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWIM_map = @{
    "AvailabilityLocalHealthEventsConfig_Status"=@("New-CWIMMonitor","Update-CWIMMonitor")
    "EventStatus"=@("Get-CWIMHealthEventList")
    "PerformanceLocalHealthEventsConfig_Status"=@("New-CWIMMonitor","Update-CWIMMonitor")
    "QueryType"=@("Start-CWIMQuery")
    "S3Config_LogDeliveryStatus"=@("New-CWIMMonitor","Update-CWIMMonitor")
    "Status"=@("Update-CWIMMonitor")
}

_awsArgumentCompleterRegistration $CWIM_Completers $CWIM_map

$CWIM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CWIM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWIM_SelectMap = @{
    "Select"=@("New-CWIMMonitor",
               "Remove-CWIMMonitor",
               "Get-CWIMHealthEvent",
               "Get-CWIMInternetEvent",
               "Get-CWIMMonitor",
               "Get-CWIMQueryResult",
               "Get-CWIMQueryStatus",
               "Get-CWIMHealthEventList",
               "Get-CWIMInternetEventList",
               "Get-CWIMMonitorList",
               "Get-CWIMResourceTag",
               "Start-CWIMQuery",
               "Stop-CWIMQuery",
               "Add-CWIMResourceTag",
               "Remove-CWIMResourceTag",
               "Update-CWIMMonitor")
}

_awsArgumentCompleterRegistration $CWIM_SelectCompleters $CWIM_SelectMap
# Argument completions for service AWS IoT


$IOT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IoT.AggregationTypeName
        {
            ($_ -eq "New-IOTFleetMetric/AggregationType_Name") -Or
            ($_ -eq "Update-IOTFleetMetric/AggregationType_Name")
        }
        {
            $v = "Cardinality","Percentiles","Statistics"
            break
        }

        # Amazon.IoT.ApplicationProtocol
        {
            ($_ -eq "New-IOTDomainConfiguration/ApplicationProtocol") -Or
            ($_ -eq "Update-IOTDomainConfiguration/ApplicationProtocol")
        }
        {
            $v = "DEFAULT","HTTPS","MQTT_WSS","SECURE_MQTT"
            break
        }

        # Amazon.IoT.AuditFrequency
        {
            ($_ -eq "New-IOTScheduledAudit/Frequency") -Or
            ($_ -eq "Update-IOTScheduledAudit/Frequency")
        }
        {
            $v = "BIWEEKLY","DAILY","MONTHLY","WEEKLY"
            break
        }

        # Amazon.IoT.AuditMitigationActionsExecutionStatus
        "Get-IOTAuditMitigationActionsExecutionList/ActionStatus"
        {
            $v = "CANCELED","COMPLETED","FAILED","IN_PROGRESS","PENDING","SKIPPED"
            break
        }

        # Amazon.IoT.AuditMitigationActionsTaskStatus
        "Get-IOTAuditMitigationActionsTaskList/TaskStatus"
        {
            $v = "CANCELED","COMPLETED","FAILED","IN_PROGRESS"
            break
        }

        # Amazon.IoT.AuditTaskStatus
        "Get-IOTTaskList/TaskStatus"
        {
            $v = "CANCELED","COMPLETED","FAILED","IN_PROGRESS"
            break
        }

        # Amazon.IoT.AuditTaskType
        "Get-IOTTaskList/TaskType"
        {
            $v = "ON_DEMAND_AUDIT_TASK","SCHEDULED_AUDIT_TASK"
            break
        }

        # Amazon.IoT.AuthenticationType
        {
            ($_ -eq "New-IOTDomainConfiguration/AuthenticationType") -Or
            ($_ -eq "Update-IOTDomainConfiguration/AuthenticationType")
        }
        {
            $v = "AWS_SIGV4","AWS_X509","CUSTOM_AUTH","CUSTOM_AUTH_X509","DEFAULT"
            break
        }

        # Amazon.IoT.AuthorizerStatus
        {
            ($_ -eq "Get-IOTAuthorizerList/Status") -Or
            ($_ -eq "New-IOTAuthorizer/Status") -Or
            ($_ -eq "Update-IOTAuthorizer/Status")
        }
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.IoT.AutoRegistrationStatus
        "Update-IOTCACertificate/NewAutoRegistrationStatus"
        {
            $v = "DISABLE","ENABLE"
            break
        }

        # Amazon.IoT.BehaviorCriteriaType
        {
            ($_ -eq "Get-IOTActiveViolationList/BehaviorCriteriaType") -Or
            ($_ -eq "Get-IOTViolationEventList/BehaviorCriteriaType")
        }
        {
            $v = "MACHINE_LEARNING","STATIC","STATISTICAL"
            break
        }

        # Amazon.IoT.CACertificateStatus
        "Update-IOTCACertificate/NewStatus"
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.IoT.CACertificateUpdateAction
        {
            ($_ -eq "New-IOTMitigationAction/UpdateCACertificateParams_Action") -Or
            ($_ -eq "Update-IOTMitigationAction/UpdateCACertificateParams_Action")
        }
        {
            $v = "DEACTIVATE"
            break
        }

        # Amazon.IoT.CannedAccessControlList
        {
            ($_ -eq "New-IOTTopicRule/S3_CannedAcl") -Or
            ($_ -eq "Set-IOTTopicRule/S3_CannedAcl")
        }
        {
            $v = "authenticated-read","aws-exec-read","bucket-owner-full-control","bucket-owner-read","log-delivery-write","private","public-read","public-read-write"
            break
        }

        # Amazon.IoT.CertificateMode
        "Register-IOTCACertificate/CertificateMode"
        {
            $v = "DEFAULT","SNI_ONLY"
            break
        }

        # Amazon.IoT.CertificateStatus
        {
            ($_ -eq "Update-IOTCertificate/NewStatus") -Or
            ($_ -eq "Register-IOTCertificate/Status") -Or
            ($_ -eq "Register-IOTCertificateWithoutCA/Status")
        }
        {
            $v = "ACTIVE","INACTIVE","PENDING_ACTIVATION","PENDING_TRANSFER","REGISTER_INACTIVE","REVOKED"
            break
        }

        # Amazon.IoT.CustomMetricType
        "New-IOTCustomMetric/MetricType"
        {
            $v = "ip-address-list","number","number-list","string-list"
            break
        }

        # Amazon.IoT.DayOfWeek
        {
            ($_ -eq "New-IOTScheduledAudit/DayOfWeek") -Or
            ($_ -eq "Update-IOTScheduledAudit/DayOfWeek")
        }
        {
            $v = "FRI","MON","SAT","SUN","THU","TUE","WED"
            break
        }

        # Amazon.IoT.DeviceCertificateUpdateAction
        {
            ($_ -eq "New-IOTMitigationAction/UpdateDeviceCertificateParams_Action") -Or
            ($_ -eq "Update-IOTMitigationAction/UpdateDeviceCertificateParams_Action")
        }
        {
            $v = "DEACTIVATE"
            break
        }

        # Amazon.IoT.DeviceDefenderIndexingMode
        "Update-IOTIndexingConfiguration/ThingIndexingConfiguration_DeviceDefenderIndexingMode"
        {
            $v = "OFF","VIOLATIONS"
            break
        }

        # Amazon.IoT.DimensionType
        "New-IOTDimension/Type"
        {
            $v = "TOPIC_FILTER"
            break
        }

        # Amazon.IoT.DimensionValueOperator
        "Get-IOTMetricValueList/DimensionValueOperator"
        {
            $v = "IN","NOT_IN"
            break
        }

        # Amazon.IoT.DomainConfigurationStatus
        "Update-IOTDomainConfiguration/DomainConfigurationStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.IoT.DynamoKeyType
        {
            ($_ -eq "New-IOTTopicRule/DynamoDB_HashKeyType") -Or
            ($_ -eq "Set-IOTTopicRule/DynamoDB_HashKeyType") -Or
            ($_ -eq "New-IOTTopicRule/DynamoDB_RangeKeyType") -Or
            ($_ -eq "Set-IOTTopicRule/DynamoDB_RangeKeyType")
        }
        {
            $v = "NUMBER","STRING"
            break
        }

        # Amazon.IoT.FleetMetricUnit
        {
            ($_ -eq "New-IOTFleetMetric/Unit") -Or
            ($_ -eq "Update-IOTFleetMetric/Unit")
        }
        {
            $v = "Bits","Bits/Second","Bytes","Bytes/Second","Count","Count/Second","Gigabits","Gigabits/Second","Gigabytes","Gigabytes/Second","Kilobits","Kilobits/Second","Kilobytes","Kilobytes/Second","Megabits","Megabits/Second","Megabytes","Megabytes/Second","Microseconds","Milliseconds","None","Percent","Seconds","Terabits","Terabits/Second","Terabytes","Terabytes/Second"
            break
        }

        # Amazon.IoT.JobEndBehavior
        "New-IOTJob/SchedulingConfig_EndBehavior"
        {
            $v = "CANCEL","FORCE_CANCEL","STOP_ROLLOUT"
            break
        }

        # Amazon.IoT.JobExecutionStatus
        {
            ($_ -eq "Get-IOTJobExecutionsForJobList/Status") -Or
            ($_ -eq "Get-IOTJobExecutionsForThingList/Status")
        }
        {
            $v = "CANCELED","FAILED","IN_PROGRESS","QUEUED","REJECTED","REMOVED","SUCCEEDED","TIMED_OUT"
            break
        }

        # Amazon.IoT.JobStatus
        "Get-IOTJobList/Status"
        {
            $v = "CANCELED","COMPLETED","DELETION_IN_PROGRESS","IN_PROGRESS","SCHEDULED"
            break
        }

        # Amazon.IoT.LogLevel
        {
            ($_ -eq "Set-IOTV2LoggingOption/DefaultLogLevel") -Or
            ($_ -eq "New-IOTMitigationAction/EnableIoTLoggingParams_LogLevel") -Or
            ($_ -eq "Update-IOTMitigationAction/EnableIoTLoggingParams_LogLevel") -Or
            ($_ -eq "Set-IOTLoggingOption/LoggingOptionsPayload_LogLevel") -Or
            ($_ -eq "Set-IOTV2LoggingLevel/LogLevel")
        }
        {
            $v = "DEBUG","DISABLED","ERROR","INFO","WARN"
            break
        }

        # Amazon.IoT.LogTargetType
        {
            ($_ -eq "Set-IOTV2LoggingLevel/LogTarget_TargetType") -Or
            ($_ -eq "Get-IOTV2LoggingLevelList/TargetType") -Or
            ($_ -eq "Remove-IOTV2LoggingLevel/TargetType")
        }
        {
            $v = "CLIENT_ID","DEFAULT","PRINCIPAL_ID","SOURCE_IP","THING_GROUP"
            break
        }

        # Amazon.IoT.MessageFormat
        {
            ($_ -eq "New-IOTTopicRule/Sns_MessageFormat") -Or
            ($_ -eq "Set-IOTTopicRule/Sns_MessageFormat")
        }
        {
            $v = "JSON","RAW"
            break
        }

        # Amazon.IoT.MitigationActionType
        "Get-IOTMitigationActionList/ActionType"
        {
            $v = "ADD_THINGS_TO_THING_GROUP","ENABLE_IOT_LOGGING","PUBLISH_FINDING_TO_SNS","REPLACE_DEFAULT_POLICY_VERSION","UPDATE_CA_CERTIFICATE","UPDATE_DEVICE_CERTIFICATE"
            break
        }

        # Amazon.IoT.NamedShadowIndexingMode
        "Update-IOTIndexingConfiguration/ThingIndexingConfiguration_NamedShadowIndexingMode"
        {
            $v = "OFF","ON"
            break
        }

        # Amazon.IoT.OTAUpdateStatus
        "Get-IOTOTAUpdateList/OtaUpdateStatus"
        {
            $v = "CREATE_COMPLETE","CREATE_FAILED","CREATE_IN_PROGRESS","CREATE_PENDING","DELETE_FAILED","DELETE_IN_PROGRESS"
            break
        }

        # Amazon.IoT.PackageVersionAction
        "Update-IOTPackageVersion/Action"
        {
            $v = "DEPRECATE","PUBLISH"
            break
        }

        # Amazon.IoT.PackageVersionStatus
        "Get-IOTPackageVersionList/Status"
        {
            $v = "DEPRECATED","DRAFT","PUBLISHED"
            break
        }

        # Amazon.IoT.PolicyTemplateName
        {
            ($_ -eq "New-IOTMitigationAction/ReplaceDefaultPolicyVersionParams_TemplateName") -Or
            ($_ -eq "Update-IOTMitigationAction/ReplaceDefaultPolicyVersionParams_TemplateName")
        }
        {
            $v = "BLANK_POLICY"
            break
        }

        # Amazon.IoT.ReportType
        "Get-IOTThingRegistrationTaskReportList/ReportType"
        {
            $v = "ERRORS","RESULTS"
            break
        }

        # Amazon.IoT.SbomValidationResult
        "Get-IOTSbomValidationResultList/ValidationResult"
        {
            $v = "FAILED","SUCCEEDED"
            break
        }

        # Amazon.IoT.ServiceType
        {
            ($_ -eq "Get-IOTDomainConfigurationList/ServiceType") -Or
            ($_ -eq "New-IOTDomainConfiguration/ServiceType")
        }
        {
            $v = "CREDENTIAL_PROVIDER","DATA","JOBS"
            break
        }

        # Amazon.IoT.Status
        "Get-IOTThingRegistrationTaskList/Status"
        {
            $v = "Cancelled","Cancelling","Completed","Failed","InProgress"
            break
        }

        # Amazon.IoT.TargetSelection
        {
            ($_ -eq "Get-IOTJobList/TargetSelection") -Or
            ($_ -eq "New-IOTJob/TargetSelection") -Or
            ($_ -eq "New-IOTOTAUpdate/TargetSelection")
        }
        {
            $v = "CONTINUOUS","SNAPSHOT"
            break
        }

        # Amazon.IoT.TemplateType
        "New-IOTProvisioningTemplate/Type"
        {
            $v = "FLEET_PROVISIONING","JITP"
            break
        }

        # Amazon.IoT.ThingConnectivityIndexingMode
        "Update-IOTIndexingConfiguration/ThingIndexingConfiguration_ThingConnectivityIndexingMode"
        {
            $v = "OFF","STATUS"
            break
        }

        # Amazon.IoT.ThingGroupIndexingMode
        "Update-IOTIndexingConfiguration/ThingGroupIndexingConfiguration_ThingGroupIndexingMode"
        {
            $v = "OFF","ON"
            break
        }

        # Amazon.IoT.ThingIndexingMode
        "Update-IOTIndexingConfiguration/ThingIndexingConfiguration_ThingIndexingMode"
        {
            $v = "OFF","REGISTRY","REGISTRY_AND_SHADOW"
            break
        }

        # Amazon.IoT.TopicRuleDestinationStatus
        "Update-IOTTopicRuleDestination/Status"
        {
            $v = "DELETING","DISABLED","ENABLED","ERROR","IN_PROGRESS"
            break
        }

        # Amazon.IoT.VerificationState
        {
            ($_ -eq "Get-IOTActiveViolationList/VerificationState") -Or
            ($_ -eq "Get-IOTViolationEventList/VerificationState") -Or
            ($_ -eq "Write-IOTVerificationStateOnViolation/VerificationState")
        }
        {
            $v = "BENIGN_POSITIVE","FALSE_POSITIVE","TRUE_POSITIVE","UNKNOWN"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOT_map = @{
    "Action"=@("Update-IOTPackageVersion")
    "ActionStatus"=@("Get-IOTAuditMitigationActionsExecutionList")
    "ActionType"=@("Get-IOTMitigationActionList")
    "AggregationType_Name"=@("New-IOTFleetMetric","Update-IOTFleetMetric")
    "ApplicationProtocol"=@("New-IOTDomainConfiguration","Update-IOTDomainConfiguration")
    "AuthenticationType"=@("New-IOTDomainConfiguration","Update-IOTDomainConfiguration")
    "BehaviorCriteriaType"=@("Get-IOTActiveViolationList","Get-IOTViolationEventList")
    "CertificateMode"=@("Register-IOTCACertificate")
    "DayOfWeek"=@("New-IOTScheduledAudit","Update-IOTScheduledAudit")
    "DefaultLogLevel"=@("Set-IOTV2LoggingOption")
    "DimensionValueOperator"=@("Get-IOTMetricValueList")
    "DomainConfigurationStatus"=@("Update-IOTDomainConfiguration")
    "DynamoDB_HashKeyType"=@("New-IOTTopicRule","Set-IOTTopicRule")
    "DynamoDB_RangeKeyType"=@("New-IOTTopicRule","Set-IOTTopicRule")
    "EnableIoTLoggingParams_LogLevel"=@("New-IOTMitigationAction","Update-IOTMitigationAction")
    "Frequency"=@("New-IOTScheduledAudit","Update-IOTScheduledAudit")
    "LoggingOptionsPayload_LogLevel"=@("Set-IOTLoggingOption")
    "LogLevel"=@("Set-IOTV2LoggingLevel")
    "LogTarget_TargetType"=@("Set-IOTV2LoggingLevel")
    "MetricType"=@("New-IOTCustomMetric")
    "NewAutoRegistrationStatus"=@("Update-IOTCACertificate")
    "NewStatus"=@("Update-IOTCACertificate","Update-IOTCertificate")
    "OtaUpdateStatus"=@("Get-IOTOTAUpdateList")
    "ReplaceDefaultPolicyVersionParams_TemplateName"=@("New-IOTMitigationAction","Update-IOTMitigationAction")
    "ReportType"=@("Get-IOTThingRegistrationTaskReportList")
    "S3_CannedAcl"=@("New-IOTTopicRule","Set-IOTTopicRule")
    "SchedulingConfig_EndBehavior"=@("New-IOTJob")
    "ServiceType"=@("Get-IOTDomainConfigurationList","New-IOTDomainConfiguration")
    "Sns_MessageFormat"=@("New-IOTTopicRule","Set-IOTTopicRule")
    "Status"=@("Get-IOTAuthorizerList","Get-IOTJobExecutionsForJobList","Get-IOTJobExecutionsForThingList","Get-IOTJobList","Get-IOTPackageVersionList","Get-IOTThingRegistrationTaskList","New-IOTAuthorizer","Register-IOTCertificate","Register-IOTCertificateWithoutCA","Update-IOTAuthorizer","Update-IOTTopicRuleDestination")
    "TargetSelection"=@("Get-IOTJobList","New-IOTJob","New-IOTOTAUpdate")
    "TargetType"=@("Get-IOTV2LoggingLevelList","Remove-IOTV2LoggingLevel")
    "TaskStatus"=@("Get-IOTAuditMitigationActionsTaskList","Get-IOTTaskList")
    "TaskType"=@("Get-IOTTaskList")
    "ThingGroupIndexingConfiguration_ThingGroupIndexingMode"=@("Update-IOTIndexingConfiguration")
    "ThingIndexingConfiguration_DeviceDefenderIndexingMode"=@("Update-IOTIndexingConfiguration")
    "ThingIndexingConfiguration_NamedShadowIndexingMode"=@("Update-IOTIndexingConfiguration")
    "ThingIndexingConfiguration_ThingConnectivityIndexingMode"=@("Update-IOTIndexingConfiguration")
    "ThingIndexingConfiguration_ThingIndexingMode"=@("Update-IOTIndexingConfiguration")
    "Type"=@("New-IOTDimension","New-IOTProvisioningTemplate")
    "Unit"=@("New-IOTFleetMetric","Update-IOTFleetMetric")
    "UpdateCACertificateParams_Action"=@("New-IOTMitigationAction","Update-IOTMitigationAction")
    "UpdateDeviceCertificateParams_Action"=@("New-IOTMitigationAction","Update-IOTMitigationAction")
    "ValidationResult"=@("Get-IOTSbomValidationResultList")
    "VerificationState"=@("Get-IOTActiveViolationList","Get-IOTViolationEventList","Write-IOTVerificationStateOnViolation")
}

_awsArgumentCompleterRegistration $IOT_Completers $IOT_map

$IOT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOT_SelectMap = @{
    "Select"=@("Confirm-IOTCertificateTransfer",
               "Add-IOTThingToBillingGroup",
               "Add-IOTThingToThingGroup",
               "Add-IOTSbomWithPackageVersion",
               "Add-IOTTargetsWithJob",
               "Add-IOTPolicy",
               "Add-IOTPrincipalPolicy",
               "Mount-IOTSecurityProfile",
               "Add-IOTThingPrincipal",
               "Stop-IOTAuditMitigationActionsTask",
               "Stop-IOTAuditTask",
               "Stop-IOTCertificateTransfer",
               "Stop-IOTDetectMitigationActionsTask",
               "Stop-IOTJob",
               "Stop-IOTJobExecution",
               "Clear-IOTDefaultAuthorizer",
               "Confirm-IOTTopicRuleDestination",
               "New-IOTAuditSuppression",
               "New-IOTAuthorizer",
               "New-IOTBillingGroup",
               "New-IOTCertificateFromCsr",
               "New-IOTCertificateProvider",
               "New-IOTCustomMetric",
               "New-IOTDimension",
               "New-IOTDomainConfiguration",
               "New-IOTDynamicThingGroup",
               "New-IOTFleetMetric",
               "New-IOTJob",
               "New-IOTJobTemplate",
               "New-IOTKeysAndCertificate",
               "New-IOTMitigationAction",
               "New-IOTOTAUpdate",
               "New-IOTPackage",
               "New-IOTPackageVersion",
               "New-IOTPolicy",
               "New-IOTPolicyVersion",
               "New-IOTProvisioningClaim",
               "New-IOTProvisioningTemplate",
               "New-IOTProvisioningTemplateVersion",
               "New-IOTRoleAlias",
               "New-IOTScheduledAudit",
               "New-IOTSecurityProfile",
               "New-IOTStream",
               "New-IOTThing",
               "New-IOTThingGroup",
               "New-IOTThingType",
               "New-IOTTopicRule",
               "New-IOTTopicRuleDestination",
               "Remove-IOTAccountAuditConfiguration",
               "Remove-IOTAuditSuppression",
               "Remove-IOTAuthorizer",
               "Remove-IOTBillingGroup",
               "Remove-IOTCACertificate",
               "Remove-IOTCertificate",
               "Remove-IOTCertificateProvider",
               "Remove-IOTCustomMetric",
               "Remove-IOTDimension",
               "Remove-IOTDomainConfiguration",
               "Remove-IOTDynamicThingGroup",
               "Remove-IOTFleetMetric",
               "Remove-IOTJob",
               "Remove-IOTJobExecution",
               "Remove-IOTJobTemplate",
               "Remove-IOTMitigationAction",
               "Remove-IOTOTAUpdate",
               "Remove-IOTPackage",
               "Remove-IOTPackageVersion",
               "Remove-IOTPolicy",
               "Remove-IOTPolicyVersion",
               "Remove-IOTProvisioningTemplate",
               "Remove-IOTProvisioningTemplateVersion",
               "Remove-IOTRegistrationCode",
               "Remove-IOTRoleAlias",
               "Remove-IOTScheduledAudit",
               "Remove-IOTSecurityProfile",
               "Remove-IOTStream",
               "Remove-IOTThing",
               "Remove-IOTThingGroup",
               "Remove-IOTThingType",
               "Remove-IOTTopicRule",
               "Remove-IOTTopicRuleDestination",
               "Remove-IOTV2LoggingLevel",
               "Set-IOTThingTypeDeprecation",
               "Get-IOTAccountAuditConfiguration",
               "Get-IOTAuditFinding",
               "Get-IOTAuditMitigationActionsTask",
               "Get-IOTAuditSuppression",
               "Get-IOTAuditTask",
               "Get-IOTAuthorizer",
               "Get-IOTBillingGroup",
               "Get-IOTCACertificate",
               "Get-IOTCertificate",
               "Get-IOTCertificateProvider",
               "Get-IOTCustomMetric",
               "Get-IOTDefaultAuthorizer",
               "Get-IOTDetectMitigationActionsTask",
               "Get-IOTDimension",
               "Get-IOTDomainConfiguration",
               "Get-IOTEndpoint",
               "Get-IOTEventConfiguration",
               "Get-IOTFleetMetric",
               "Get-IOTIndex",
               "Get-IOTJob",
               "Get-IOTJobExecution",
               "Get-IOTJobTemplate",
               "Get-IOTManagedJobTemplate",
               "Get-IOTMitigationAction",
               "Get-IOTProvisioningTemplate",
               "Get-IOTProvisioningTemplateVersion",
               "Get-IOTRoleAlias",
               "Get-IOTScheduledAudit",
               "Get-IOTSecurityProfile",
               "Get-IOTStream",
               "Get-IOTThing",
               "Get-IOTThingGroup",
               "Get-IOTThingRegistrationTask",
               "Get-IOTThingType",
               "Dismount-IOTPolicy",
               "Remove-IOTPrincipalPolicy",
               "Dismount-IOTSecurityProfile",
               "Remove-IOTThingPrincipal",
               "Disable-IOTTopicRule",
               "Remove-IOTSbomFromPackageVersion",
               "Enable-IOTTopicRule",
               "Get-IOTBehaviorModelTrainingSummary",
               "Get-IOTBucketsAggregation",
               "Get-IOTCardinality",
               "Get-IOTEffectivePolicy",
               "Get-IOTIndexingConfiguration",
               "Get-IOTJobDocument",
               "Get-IOTLoggingOption",
               "Get-IOTOTAUpdate",
               "Get-IOTPackage",
               "Get-IOTPackageConfiguration",
               "Get-IOTPackageVersion",
               "Get-IOTPercentile",
               "Get-IOTPolicy",
               "Get-IOTPolicyVersion",
               "Get-IOTRegistrationCode",
               "Get-IOTStatistic",
               "Get-IOTTopicRule",
               "Get-IOTTopicRuleDestination",
               "Get-IOTV2LoggingOption",
               "Get-IOTActiveViolationList",
               "Get-IOTAttachedPolicyList",
               "Get-IOTAuditFindingList",
               "Get-IOTAuditMitigationActionsExecutionList",
               "Get-IOTAuditMitigationActionsTaskList",
               "Get-IOTAuditSuppressionList",
               "Get-IOTTaskList",
               "Get-IOTAuthorizerList",
               "Get-IOTBillingGroupList",
               "Get-IOTCACertificateList",
               "Get-IOTCertificateProviderList",
               "Get-IOTCertificateList",
               "Get-IOTCertificateListByCA",
               "Get-IOTCustomMetricList",
               "Get-IOTDetectMitigationActionsExecutionList",
               "Get-IOTDetectMitigationActionsTaskList",
               "Get-IOTDimensionList",
               "Get-IOTDomainConfigurationList",
               "Get-IOTFleetMetricList",
               "Get-IOTIndexList",
               "Get-IOTJobExecutionsForJobList",
               "Get-IOTJobExecutionsForThingList",
               "Get-IOTJobList",
               "Get-IOTJobTemplateList",
               "Get-IOTManagedJobTemplateList",
               "Get-IOTMetricValueList",
               "Get-IOTMitigationActionList",
               "Get-IOTOTAUpdateList",
               "Get-IOTOutgoingCertificate",
               "Get-IOTPackageList",
               "Get-IOTPackageVersionList",
               "Get-IOTPolicyList",
               "Get-IOTPolicyPrincipalList",
               "Get-IOTPolicyVersionList",
               "Get-IOTPrincipalPolicyList",
               "Get-IOTPrincipalThingList",
               "Get-IOTProvisioningTemplateList",
               "Get-IOTProvisioningTemplateVersionList",
               "Get-IOTRelatedResourcesForAuditFindingList",
               "Get-IOTRoleAliasList",
               "Get-IOTSbomValidationResultList",
               "Get-IOTScheduledAuditList",
               "Get-IOTSecurityProfileList",
               "Get-IOTSecurityProfilesForTargetList",
               "Get-IOTStreamList",
               "Get-IOTTagListForResource",
               "Get-IOTTargetsForPolicyList",
               "Get-IOTTargetsForSecurityProfileList",
               "Get-IOTThingGroupList",
               "Get-IOTThingGroupsForThingList",
               "Get-IOTThingPrincipalList",
               "Get-IOTThingRegistrationTaskReportList",
               "Get-IOTThingRegistrationTaskList",
               "Get-IOTThingList",
               "Get-IOTThingsInBillingGroupList",
               "Get-IOTThingsInThingGroupList",
               "Get-IOTThingTypeList",
               "Get-IOTTopicRuleDestinationList",
               "Get-IOTTopicRuleList",
               "Get-IOTV2LoggingLevelList",
               "Get-IOTViolationEventList",
               "Write-IOTVerificationStateOnViolation",
               "Register-IOTCACertificate",
               "Register-IOTCertificate",
               "Register-IOTCertificateWithoutCA",
               "Register-IOTThing",
               "Deny-IOTCertificateTransfer",
               "Remove-IOTThingFromBillingGroup",
               "Remove-IOTThingFromThingGroup",
               "Set-IOTTopicRule",
               "Search-IOTIndex",
               "Set-IOTDefaultAuthorizer",
               "Set-IOTDefaultPolicyVersion",
               "Set-IOTLoggingOption",
               "Set-IOTV2LoggingLevel",
               "Set-IOTV2LoggingOption",
               "Start-IOTAuditMitigationActionsTask",
               "Start-IOTDetectMitigationActionsTask",
               "Start-IOTOnDemandAuditTask",
               "Start-IOTThingRegistrationTask",
               "Stop-IOTThingRegistrationTask",
               "Add-IOTResourceTag",
               "Test-IOTAuthorization",
               "Test-IOTInvokeAuthorizer",
               "Request-IOTCertificateTransfer",
               "Remove-IOTResourceTag",
               "Update-IOTAccountAuditConfiguration",
               "Update-IOTAuditSuppression",
               "Update-IOTAuthorizer",
               "Update-IOTBillingGroup",
               "Update-IOTCACertificate",
               "Update-IOTCertificate",
               "Update-IOTCertificateProvider",
               "Update-IOTCustomMetric",
               "Update-IOTDimension",
               "Update-IOTDomainConfiguration",
               "Update-IOTDynamicThingGroup",
               "Update-IOTEventConfiguration",
               "Update-IOTFleetMetric",
               "Update-IOTIndexingConfiguration",
               "Update-IOTJob",
               "Update-IOTMitigationAction",
               "Update-IOTPackage",
               "Update-IOTPackageConfiguration",
               "Update-IOTPackageVersion",
               "Update-IOTProvisioningTemplate",
               "Update-IOTRoleAlias",
               "Update-IOTScheduledAudit",
               "Update-IOTSecurityProfile",
               "Update-IOTStream",
               "Update-IOTThing",
               "Update-IOTThingGroup",
               "Update-IOTThingGroupsForThing",
               "Update-IOTTopicRuleDestination",
               "Test-IOTValidSecurityProfileBehavior")
}

_awsArgumentCompleterRegistration $IOT_SelectCompleters $IOT_SelectMap
# Argument completions for service AWS IoT Core Device Advisor


$IOTDA_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IoTDeviceAdvisor.AuthenticationMethod
        "Get-IOTDAEndpoint/AuthenticationMethod"
        {
            $v = "SignatureVersion4","X509ClientCertificate"
            break
        }

        # Amazon.IoTDeviceAdvisor.Protocol
        {
            ($_ -eq "New-IOTDASuiteDefinition/SuiteDefinitionConfiguration_Protocol") -Or
            ($_ -eq "Update-IOTDASuiteDefinition/SuiteDefinitionConfiguration_Protocol")
        }
        {
            $v = "MqttV3_1_1","MqttV3_1_1_OverWebSocket","MqttV5","MqttV5_OverWebSocket"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTDA_map = @{
    "AuthenticationMethod"=@("Get-IOTDAEndpoint")
    "SuiteDefinitionConfiguration_Protocol"=@("New-IOTDASuiteDefinition","Update-IOTDASuiteDefinition")
}

_awsArgumentCompleterRegistration $IOTDA_Completers $IOTDA_map

$IOTDA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOTDA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTDA_SelectMap = @{
    "Select"=@("New-IOTDASuiteDefinition",
               "Remove-IOTDASuiteDefinition",
               "Get-IOTDAEndpoint",
               "Get-IOTDASuiteDefinition",
               "Get-IOTDASuiteRun",
               "Get-IOTDASuiteRunReport",
               "Get-IOTDASuiteDefinitionList",
               "Get-IOTDASuiteRunList",
               "Get-IOTDAResourceTag",
               "Start-IOTDASuiteRun",
               "Stop-IOTDASuiteRun",
               "Add-IOTDAResourceTag",
               "Remove-IOTDAResourceTag",
               "Update-IOTDASuiteDefinition")
}

_awsArgumentCompleterRegistration $IOTDA_SelectCompleters $IOTDA_SelectMap
# Argument completions for service AWS IoT Events


$IOTE_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IoTEvents.ComparisonOperator
        {
            ($_ -eq "New-IOTEAlarmModel/SimpleRule_ComparisonOperator") -Or
            ($_ -eq "Update-IOTEAlarmModel/SimpleRule_ComparisonOperator")
        }
        {
            $v = "EQUAL","GREATER","GREATER_OR_EQUAL","LESS","LESS_OR_EQUAL","NOT_EQUAL"
            break
        }

        # Amazon.IoTEvents.EvaluationMethod
        {
            ($_ -eq "New-IOTEDetectorModel/EvaluationMethod") -Or
            ($_ -eq "Update-IOTEDetectorModel/EvaluationMethod")
        }
        {
            $v = "BATCH","SERIAL"
            break
        }

        # Amazon.IoTEvents.LoggingLevel
        "Write-IOTELoggingOption/LoggingOptions_Level"
        {
            $v = "DEBUG","ERROR","INFO"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTE_map = @{
    "EvaluationMethod"=@("New-IOTEDetectorModel","Update-IOTEDetectorModel")
    "LoggingOptions_Level"=@("Write-IOTELoggingOption")
    "SimpleRule_ComparisonOperator"=@("New-IOTEAlarmModel","Update-IOTEAlarmModel")
}

_awsArgumentCompleterRegistration $IOTE_Completers $IOTE_map

$IOTE_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOTE.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTE_SelectMap = @{
    "Select"=@("New-IOTEAlarmModel",
               "New-IOTEDetectorModel",
               "New-IOTEInput",
               "Remove-IOTEAlarmModel",
               "Remove-IOTEDetectorModel",
               "Remove-IOTEInput",
               "Get-IOTEAlarmModel",
               "Get-IOTEDetectorModel",
               "Get-IOTEDetectorModelAnalysis",
               "Get-IOTEInput",
               "Get-IOTELoggingOption",
               "Get-IOTEDetectorModelAnalysisResult",
               "Get-IOTEAlarmModelList",
               "Get-IOTEAlarmModelVersionList",
               "Get-IOTEDetectorModelList",
               "Get-IOTEDetectorModelVersionList",
               "Get-IOTEInputRoutingList",
               "Get-IOTEInputList",
               "Get-IOTEResourceTag",
               "Write-IOTELoggingOption",
               "Start-IOTEDetectorModelAnalysis",
               "Add-IOTEResourceTag",
               "Remove-IOTEResourceTag",
               "Update-IOTEAlarmModel",
               "Update-IOTEDetectorModel",
               "Update-IOTEInput")
}

_awsArgumentCompleterRegistration $IOTE_SelectCompleters $IOTE_SelectMap
# Argument completions for service AWS IoT Events Data


$IOTED_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOTED.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTED_SelectMap = @{
    "Select"=@("Send-IOTEDAcknowledgeAlarm",
               "Remove-IOTEDDetectorBatch",
               "Send-IOTEDDisableAlarm",
               "Send-IOTEDEnableAlarm",
               "Send-IOTEDMessageBatch",
               "Send-IOTEDResetAlarm",
               "Send-IOTEDSnoozeAlarm",
               "Update-IOTEDDetectorBatch",
               "Get-IOTEDAlarm",
               "Get-IOTEDDetector",
               "Get-IOTEDAlarmList",
               "Get-IOTEDDetectorList")
}

_awsArgumentCompleterRegistration $IOTED_SelectCompleters $IOTED_SelectMap
# Argument completions for service AWS IoT Fleet Hub


$IOTFH_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOTFH.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTFH_SelectMap = @{
    "Select"=@("New-IOTFHApplication",
               "Remove-IOTFHApplication",
               "Get-IOTFHApplication",
               "Get-IOTFHApplicationList",
               "Get-IOTFHResourceTag",
               "Add-IOTFHResourceTag",
               "Remove-IOTFHResourceTag",
               "Update-IOTFHApplication")
}

_awsArgumentCompleterRegistration $IOTFH_SelectCompleters $IOTFH_SelectMap
# Argument completions for service AWS IoT FleetWise


$IFW_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IoTFleetWise.Compression
        "New-IFWCampaign/Compression"
        {
            $v = "OFF","SNAPPY"
            break
        }

        # Amazon.IoTFleetWise.DiagnosticsMode
        "New-IFWCampaign/DiagnosticsMode"
        {
            $v = "OFF","SEND_ACTIVE_DTCS"
            break
        }

        # Amazon.IoTFleetWise.EncryptionType
        "Write-IFWEncryptionConfiguration/EncryptionType"
        {
            $v = "FLEETWISE_DEFAULT_ENCRYPTION","KMS_BASED_ENCRYPTION"
            break
        }

        # Amazon.IoTFleetWise.LogType
        "Write-IFWLoggingOption/CloudWatchLogDelivery_LogType"
        {
            $v = "ERROR","OFF"
            break
        }

        # Amazon.IoTFleetWise.ManifestStatus
        {
            ($_ -eq "Update-IFWDecoderManifest/Status") -Or
            ($_ -eq "Update-IFWModelManifest/Status")
        }
        {
            $v = "ACTIVE","DRAFT","INVALID","VALIDATING"
            break
        }

        # Amazon.IoTFleetWise.SignalNodeType
        "Get-IFWSignalCatalogNodeList/SignalNodeType"
        {
            $v = "ACTUATOR","ATTRIBUTE","BRANCH","CUSTOM_PROPERTY","CUSTOM_STRUCT","SENSOR"
            break
        }

        # Amazon.IoTFleetWise.SpoolingMode
        "New-IFWCampaign/SpoolingMode"
        {
            $v = "OFF","TO_DISK"
            break
        }

        # Amazon.IoTFleetWise.TriggerMode
        "New-IFWCampaign/ConditionBasedCollectionScheme_TriggerMode"
        {
            $v = "ALWAYS","RISING_EDGE"
            break
        }

        # Amazon.IoTFleetWise.UpdateCampaignAction
        "Update-IFWCampaign/Action"
        {
            $v = "APPROVE","RESUME","SUSPEND","UPDATE"
            break
        }

        # Amazon.IoTFleetWise.UpdateMode
        "Update-IFWVehicle/AttributeUpdateMode"
        {
            $v = "Merge","Overwrite"
            break
        }

        # Amazon.IoTFleetWise.VehicleAssociationBehavior
        "New-IFWVehicle/AssociationBehavior"
        {
            $v = "CreateIotThing","ValidateIotThingExists"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IFW_map = @{
    "Action"=@("Update-IFWCampaign")
    "AssociationBehavior"=@("New-IFWVehicle")
    "AttributeUpdateMode"=@("Update-IFWVehicle")
    "CloudWatchLogDelivery_LogType"=@("Write-IFWLoggingOption")
    "Compression"=@("New-IFWCampaign")
    "ConditionBasedCollectionScheme_TriggerMode"=@("New-IFWCampaign")
    "DiagnosticsMode"=@("New-IFWCampaign")
    "EncryptionType"=@("Write-IFWEncryptionConfiguration")
    "SignalNodeType"=@("Get-IFWSignalCatalogNodeList")
    "SpoolingMode"=@("New-IFWCampaign")
    "Status"=@("Update-IFWDecoderManifest","Update-IFWModelManifest")
}

_awsArgumentCompleterRegistration $IFW_Completers $IFW_map

$IFW_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IFW.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IFW_SelectMap = @{
    "Select"=@("New-IFWVehicleFleet",
               "New-IFWCreateVehicle",
               "New-IFWUpdateVehicle",
               "New-IFWCampaign",
               "New-IFWDecoderManifest",
               "New-IFWFleet",
               "New-IFWModelManifest",
               "New-IFWSignalCatalog",
               "New-IFWVehicle",
               "Remove-IFWCampaign",
               "Remove-IFWDecoderManifest",
               "Remove-IFWFleet",
               "Remove-IFWModelManifest",
               "Remove-IFWSignalCatalog",
               "Remove-IFWVehicle",
               "Remove-IFWVehicleFleet",
               "Get-IFWCampaign",
               "Get-IFWDecoderManifest",
               "Get-IFWEncryptionConfiguration",
               "Get-IFWFleet",
               "Get-IFWLoggingOption",
               "Get-IFWModelManifest",
               "Get-IFWRegisterAccountStatus",
               "Get-IFWSignalCatalog",
               "Get-IFWVehicle",
               "Get-IFWVehicleStatus",
               "Import-IFWDecoderManifest",
               "Import-IFWSignalCatalog",
               "Get-IFWCampaignList",
               "Get-IFWDecoderManifestNetworkInterfaceList",
               "Get-IFWDecoderManifestList",
               "Get-IFWDecoderManifestSignalList",
               "Get-IFWFleetList",
               "Get-IFWFleetsForVehicleList",
               "Get-IFWModelManifestNodeList",
               "Get-IFWModelManifestList",
               "Get-IFWSignalCatalogNodeList",
               "Get-IFWSignalCatalogList",
               "Get-IFWResourceTag",
               "Get-IFWVehicleList",
               "Get-IFWVehiclesInFleetList",
               "Write-IFWEncryptionConfiguration",
               "Write-IFWLoggingOption",
               "Register-IFWAccount",
               "Add-IFWResourceTag",
               "Remove-IFWResourceTag",
               "Update-IFWCampaign",
               "Update-IFWDecoderManifest",
               "Update-IFWFleet",
               "Update-IFWModelManifest",
               "Update-IFWSignalCatalog",
               "Update-IFWVehicle")
}

_awsArgumentCompleterRegistration $IFW_SelectCompleters $IFW_SelectMap
# Argument completions for service AWS IoT Jobs Data Plane


$IOTJ_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IoTJobsDataPlane.JobExecutionStatus
        "Update-IOTJJobExecution/Status"
        {
            $v = "CANCELED","FAILED","IN_PROGRESS","QUEUED","REJECTED","REMOVED","SUCCEEDED","TIMED_OUT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTJ_map = @{
    "Status"=@("Update-IOTJJobExecution")
}

_awsArgumentCompleterRegistration $IOTJ_Completers $IOTJ_map

$IOTJ_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOTJ.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTJ_SelectMap = @{
    "Select"=@("Get-IOTJJobExecution",
               "Get-IOTJPendingJobExecution",
               "Start-IOTJNextPendingJobExecution",
               "Update-IOTJJobExecution")
}

_awsArgumentCompleterRegistration $IOTJ_SelectCompleters $IOTJ_SelectMap
# Argument completions for service AWS IoT Secure Tunneling


$IOTST_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IoTSecureTunneling.ClientMode
        "Invoke-IOTSTTunnelAccessTokenRotation/ClientMode"
        {
            $v = "ALL","DESTINATION","SOURCE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTST_map = @{
    "ClientMode"=@("Invoke-IOTSTTunnelAccessTokenRotation")
}

_awsArgumentCompleterRegistration $IOTST_Completers $IOTST_map

$IOTST_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOTST.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTST_SelectMap = @{
    "Select"=@("Close-IOTSTTunnel",
               "Get-IOTSTTunnel",
               "Get-IOTSTResourceTag",
               "Get-IOTSTTunnelList",
               "Open-IOTSTTunnel",
               "Invoke-IOTSTTunnelAccessTokenRotation",
               "Add-IOTSTResourceTag",
               "Remove-IOTSTResourceTag")
}

_awsArgumentCompleterRegistration $IOTST_SelectCompleters $IOTST_SelectMap
# Argument completions for service AWS IoT SiteWise


$IOTSW_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IoTSiteWise.AssetModelType
        "New-IOTSWAssetModel/AssetModelType"
        {
            $v = "ASSET_MODEL","COMPONENT_MODEL"
            break
        }

        # Amazon.IoTSiteWise.AssetModelVersionType
        {
            ($_ -eq "New-IOTSWAssetModelCompositeModel/MatchForVersionType") -Or
            ($_ -eq "Remove-IOTSWAssetModel/MatchForVersionType") -Or
            ($_ -eq "Remove-IOTSWAssetModelCompositeModel/MatchForVersionType") -Or
            ($_ -eq "Update-IOTSWAssetModel/MatchForVersionType") -Or
            ($_ -eq "Update-IOTSWAssetModelCompositeModel/MatchForVersionType")
        }
        {
            $v = "ACTIVE","LATEST"
            break
        }

        # Amazon.IoTSiteWise.AuthMode
        "New-IOTSWPortal/PortalAuthMode"
        {
            $v = "IAM","SSO"
            break
        }

        # Amazon.IoTSiteWise.DisassociatedDataStorageState
        "Write-IOTSWStorageConfiguration/DisassociatedDataStorage"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.IoTSiteWise.EncryptionType
        "Write-IOTSWDefaultEncryptionConfiguration/EncryptionType"
        {
            $v = "KMS_BASED_ENCRYPTION","SITEWISE_DEFAULT_ENCRYPTION"
            break
        }

        # Amazon.IoTSiteWise.IdentityType
        "Get-IOTSWAccessPolicyList/IdentityType"
        {
            $v = "GROUP","IAM","USER"
            break
        }

        # Amazon.IoTSiteWise.ImageFileType
        {
            ($_ -eq "Update-IOTSWPortal/File_Type") -Or
            ($_ -eq "New-IOTSWPortal/PortalLogoImageFile_Type")
        }
        {
            $v = "PNG"
            break
        }

        # Amazon.IoTSiteWise.ListAssetModelPropertiesFilter
        "Get-IOTSWAssetModelPropertyList/Filter"
        {
            $v = "ALL","BASE"
            break
        }

        # Amazon.IoTSiteWise.ListAssetPropertiesFilter
        "Get-IOTSWAssetPropertyList/Filter"
        {
            $v = "ALL","BASE"
            break
        }

        # Amazon.IoTSiteWise.ListAssetsFilter
        "Get-IOTSWAssetList/Filter"
        {
            $v = "ALL","TOP_LEVEL"
            break
        }

        # Amazon.IoTSiteWise.ListBulkImportJobsFilter
        "Get-IOTSWBulkImportJobList/Filter"
        {
            $v = "ALL","CANCELLED","COMPLETED","COMPLETED_WITH_FAILURES","FAILED","PENDING","RUNNING"
            break
        }

        # Amazon.IoTSiteWise.ListTimeSeriesType
        "Get-IOTSWTimeSeriesList/TimeSeriesType"
        {
            $v = "ASSOCIATED","DISASSOCIATED"
            break
        }

        # Amazon.IoTSiteWise.LoggingLevel
        "Write-IOTSWLoggingOption/LoggingOptions_Level"
        {
            $v = "ERROR","INFO","OFF"
            break
        }

        # Amazon.IoTSiteWise.Permission
        {
            ($_ -eq "New-IOTSWAccessPolicy/AccessPolicyPermission") -Or
            ($_ -eq "Update-IOTSWAccessPolicy/AccessPolicyPermission")
        }
        {
            $v = "ADMINISTRATOR","VIEWER"
            break
        }

        # Amazon.IoTSiteWise.PropertyNotificationState
        "Update-IOTSWAssetProperty/PropertyNotificationState"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.IoTSiteWise.Quality
        "Get-IOTSWInterpolatedAssetPropertyValue/Quality"
        {
            $v = "BAD","GOOD","UNCERTAIN"
            break
        }

        # Amazon.IoTSiteWise.ResourceType
        "Get-IOTSWAccessPolicyList/ResourceType"
        {
            $v = "PORTAL","PROJECT"
            break
        }

        # Amazon.IoTSiteWise.StorageType
        "Write-IOTSWStorageConfiguration/StorageType"
        {
            $v = "MULTI_LAYER_STORAGE","SITEWISE_DEFAULT_STORAGE"
            break
        }

        # Amazon.IoTSiteWise.TargetResourceType
        "Get-IOTSWActionList/TargetResourceType"
        {
            $v = "ASSET"
            break
        }

        # Amazon.IoTSiteWise.TimeOrdering
        {
            ($_ -eq "Get-IOTSWAssetPropertyAggregate/TimeOrdering") -Or
            ($_ -eq "Get-IOTSWAssetPropertyValueHistory/TimeOrdering")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.IoTSiteWise.TraversalDirection
        "Get-IOTSWAssociatedAssetList/TraversalDirection"
        {
            $v = "CHILD","PARENT"
            break
        }

        # Amazon.IoTSiteWise.TraversalType
        "Get-IOTSWAssetRelationshipList/TraversalType"
        {
            $v = "PATH_TO_ROOT"
            break
        }

        # Amazon.IoTSiteWise.WarmTierState
        "Write-IOTSWStorageConfiguration/WarmTier"
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTSW_map = @{
    "AccessPolicyPermission"=@("New-IOTSWAccessPolicy","Update-IOTSWAccessPolicy")
    "AssetModelType"=@("New-IOTSWAssetModel")
    "DisassociatedDataStorage"=@("Write-IOTSWStorageConfiguration")
    "EncryptionType"=@("Write-IOTSWDefaultEncryptionConfiguration")
    "File_Type"=@("Update-IOTSWPortal")
    "Filter"=@("Get-IOTSWAssetList","Get-IOTSWAssetModelPropertyList","Get-IOTSWAssetPropertyList","Get-IOTSWBulkImportJobList")
    "IdentityType"=@("Get-IOTSWAccessPolicyList")
    "LoggingOptions_Level"=@("Write-IOTSWLoggingOption")
    "MatchForVersionType"=@("New-IOTSWAssetModelCompositeModel","Remove-IOTSWAssetModel","Remove-IOTSWAssetModelCompositeModel","Update-IOTSWAssetModel","Update-IOTSWAssetModelCompositeModel")
    "PortalAuthMode"=@("New-IOTSWPortal")
    "PortalLogoImageFile_Type"=@("New-IOTSWPortal")
    "PropertyNotificationState"=@("Update-IOTSWAssetProperty")
    "Quality"=@("Get-IOTSWInterpolatedAssetPropertyValue")
    "ResourceType"=@("Get-IOTSWAccessPolicyList")
    "StorageType"=@("Write-IOTSWStorageConfiguration")
    "TargetResourceType"=@("Get-IOTSWActionList")
    "TimeOrdering"=@("Get-IOTSWAssetPropertyAggregate","Get-IOTSWAssetPropertyValueHistory")
    "TimeSeriesType"=@("Get-IOTSWTimeSeriesList")
    "TraversalDirection"=@("Get-IOTSWAssociatedAssetList")
    "TraversalType"=@("Get-IOTSWAssetRelationshipList")
    "WarmTier"=@("Write-IOTSWStorageConfiguration")
}

_awsArgumentCompleterRegistration $IOTSW_Completers $IOTSW_map

$IOTSW_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOTSW.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTSW_SelectMap = @{
    "Select"=@("Connect-IOTSWAsset",
               "Add-IOTSWTimeSeriesToAssetProperty",
               "Connect-IOTSWAssociateProjectAsset",
               "Disconnect-IOTSWDisassociateProjectAsset",
               "Get-IOTSWBatchAssetPropertyAggregate",
               "Get-IOTSWBatchAssetPropertyValue",
               "Get-IOTSWBatchAssetPropertyValueHistory",
               "Import-IOTSWPutAssetPropertyValue",
               "New-IOTSWAccessPolicy",
               "New-IOTSWAsset",
               "New-IOTSWAssetModel",
               "New-IOTSWAssetModelCompositeModel",
               "New-IOTSWBulkImportJob",
               "New-IOTSWDashboard",
               "New-IOTSWGateway",
               "New-IOTSWPortal",
               "New-IOTSWProject",
               "Remove-IOTSWAccessPolicy",
               "Remove-IOTSWAsset",
               "Remove-IOTSWAssetModel",
               "Remove-IOTSWAssetModelCompositeModel",
               "Remove-IOTSWDashboard",
               "Remove-IOTSWGateway",
               "Remove-IOTSWPortal",
               "Remove-IOTSWProject",
               "Remove-IOTSWTimeSeries",
               "Get-IOTSWAccessPolicy",
               "Get-IOTSWAction",
               "Get-IOTSWAsset",
               "Get-IOTSWAssetCompositeModel",
               "Get-IOTSWAssetModel",
               "Get-IOTSWAssetModelCompositeModel",
               "Get-IOTSWAssetProperty",
               "Get-IOTSWBulkImportJob",
               "Get-IOTSWDashboard",
               "Get-IOTSWDefaultEncryptionConfiguration",
               "Get-IOTSWGateway",
               "Get-IOTSWGatewayCapabilityConfiguration",
               "Get-IOTSWLoggingOption",
               "Get-IOTSWPortal",
               "Get-IOTSWProject",
               "Get-IOTSWStorageConfiguration",
               "Get-IOTSWTimeSeries",
               "Disconnect-IOTSWAsset",
               "Remove-IOTSWTimeSeriesFromAssetProperty",
               "Start-IOTSWAction",
               "Start-IOTSWQuery",
               "Get-IOTSWAssetPropertyAggregate",
               "Get-IOTSWAssetPropertyValue",
               "Get-IOTSWAssetPropertyValueHistory",
               "Get-IOTSWInterpolatedAssetPropertyValue",
               "Get-IOTSWAccessPolicyList",
               "Get-IOTSWActionList",
               "Get-IOTSWAssetModelCompositeModelList",
               "Get-IOTSWAssetModelPropertyList",
               "Get-IOTSWAssetModelList",
               "Get-IOTSWAssetPropertyList",
               "Get-IOTSWAssetRelationshipList",
               "Get-IOTSWAssetList",
               "Get-IOTSWAssociatedAssetList",
               "Get-IOTSWBulkImportJobList",
               "Get-IOTSWCompositionRelationshipList",
               "Get-IOTSWDashboardList",
               "Get-IOTSWGatewayList",
               "Get-IOTSWPortalList",
               "Get-IOTSWProjectAssetList",
               "Get-IOTSWProjectList",
               "Get-IOTSWResourceTag",
               "Get-IOTSWTimeSeriesList",
               "Write-IOTSWDefaultEncryptionConfiguration",
               "Write-IOTSWLoggingOption",
               "Write-IOTSWStorageConfiguration",
               "Add-IOTSWResourceTag",
               "Remove-IOTSWResourceTag",
               "Update-IOTSWAccessPolicy",
               "Update-IOTSWAsset",
               "Update-IOTSWAssetModel",
               "Update-IOTSWAssetModelCompositeModel",
               "Update-IOTSWAssetProperty",
               "Update-IOTSWDashboard",
               "Update-IOTSWGateway",
               "Update-IOTSWGatewayCapabilityConfiguration",
               "Update-IOTSWPortal",
               "Update-IOTSWProject")
}

_awsArgumentCompleterRegistration $IOTSW_SelectCompleters $IOTSW_SelectMap
# Argument completions for service AWS IoT Things Graph


$IOTTG_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IoTThingsGraph.DefinitionLanguage
        {
            ($_ -eq "New-IOTTGFlowTemplate/Definition_Language") -Or
            ($_ -eq "New-IOTTGSystemInstance/Definition_Language") -Or
            ($_ -eq "New-IOTTGSystemTemplate/Definition_Language") -Or
            ($_ -eq "Update-IOTTGFlowTemplate/Definition_Language") -Or
            ($_ -eq "Update-IOTTGSystemTemplate/Definition_Language") -Or
            ($_ -eq "Set-IOTTGEntityDefinition/Document_Language")
        }
        {
            $v = "GRAPHQL"
            break
        }

        # Amazon.IoTThingsGraph.DeploymentTarget
        "New-IOTTGSystemInstance/Target"
        {
            $v = "CLOUD","GREENGRASS"
            break
        }

        # Amazon.IoTThingsGraph.EntityType
        "Remove-IOTTGEntityFromThing/EntityType"
        {
            $v = "ACTION","CAPABILITY","DEVICE","DEVICE_MODEL","ENUM","EVENT","MAPPING","PROPERTY","SERVICE","STATE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTTG_map = @{
    "Definition_Language"=@("New-IOTTGFlowTemplate","New-IOTTGSystemInstance","New-IOTTGSystemTemplate","Update-IOTTGFlowTemplate","Update-IOTTGSystemTemplate")
    "Document_Language"=@("Set-IOTTGEntityDefinition")
    "EntityType"=@("Remove-IOTTGEntityFromThing")
    "Target"=@("New-IOTTGSystemInstance")
}

_awsArgumentCompleterRegistration $IOTTG_Completers $IOTTG_map

$IOTTG_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOTTG.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTTG_SelectMap = @{
    "Select"=@("Add-IOTTGEntityToThing",
               "New-IOTTGFlowTemplate",
               "New-IOTTGSystemInstance",
               "New-IOTTGSystemTemplate",
               "Remove-IOTTGFlowTemplate",
               "Remove-IOTTGNamespace",
               "Remove-IOTTGSystemInstance",
               "Remove-IOTTGSystemTemplate",
               "Add-IOTTGSystemInstanceDeployment",
               "Set-IOTTGFlowTemplateDeprecation",
               "Set-IOTTGSystemTemplateDeprecation",
               "Get-IOTTGNamespace",
               "Remove-IOTTGEntityFromThing",
               "Get-IOTTGEntity",
               "Get-IOTTGFlowTemplate",
               "Get-IOTTGFlowTemplateRevision",
               "Get-IOTTGNamespaceDeletionStatus",
               "Get-IOTTGSystemInstance",
               "Get-IOTTGSystemTemplate",
               "Get-IOTTGSystemTemplateRevision",
               "Get-IOTTGUploadStatus",
               "Get-IOTTGFlowExecutionMessageList",
               "Get-IOTTGResourceTag",
               "Search-IOTTGEntity",
               "Search-IOTTGFlowExecution",
               "Search-IOTTGFlowTemplate",
               "Search-IOTTGSystemInstance",
               "Search-IOTTGSystemTemplate",
               "Search-IOTTGThing",
               "Add-IOTTGResourceTag",
               "Remove-IOTTGSystemInstanceDeployment",
               "Remove-IOTTGResourceTag",
               "Update-IOTTGFlowTemplate",
               "Update-IOTTGSystemTemplate",
               "Set-IOTTGEntityDefinition")
}

_awsArgumentCompleterRegistration $IOTTG_SelectCompleters $IOTTG_SelectMap
# Argument completions for service AWS IoT TwinMaker


$IOTTM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IoTTwinMaker.DestinationType
        {
            ($_ -eq "New-IOTTMMetadataTransferJob/Destination_Type") -Or
            ($_ -eq "Get-IOTTMMetadataTransferJobList/DestinationType")
        }
        {
            $v = "iotsitewise","iottwinmaker","s3"
            break
        }

        # Amazon.IoTTwinMaker.InterpolationType
        "Get-IOTTMPropertyValueHistory/Interpolation_InterpolationType"
        {
            $v = "LINEAR"
            break
        }

        # Amazon.IoTTwinMaker.OrderByTime
        "Get-IOTTMPropertyValueHistory/OrderByTime"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.IoTTwinMaker.ParentEntityUpdateType
        "Update-IOTTMEntity/ParentEntityUpdate_UpdateType"
        {
            $v = "DELETE","UPDATE"
            break
        }

        # Amazon.IoTTwinMaker.PricingMode
        "Update-IOTTMPricingPlan/PricingMode"
        {
            $v = "BASIC","STANDARD","TIERED_BUNDLE"
            break
        }

        # Amazon.IoTTwinMaker.SourceType
        "Get-IOTTMMetadataTransferJobList/SourceType"
        {
            $v = "iotsitewise","iottwinmaker","s3"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTTM_map = @{
    "Destination_Type"=@("New-IOTTMMetadataTransferJob")
    "DestinationType"=@("Get-IOTTMMetadataTransferJobList")
    "Interpolation_InterpolationType"=@("Get-IOTTMPropertyValueHistory")
    "OrderByTime"=@("Get-IOTTMPropertyValueHistory")
    "ParentEntityUpdate_UpdateType"=@("Update-IOTTMEntity")
    "PricingMode"=@("Update-IOTTMPricingPlan")
    "SourceType"=@("Get-IOTTMMetadataTransferJobList")
}

_awsArgumentCompleterRegistration $IOTTM_Completers $IOTTM_map

$IOTTM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOTTM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTTM_SelectMap = @{
    "Select"=@("Import-IOTTMPutPropertyValue",
               "Stop-IOTTMMetadataTransferJob",
               "New-IOTTMComponentType",
               "New-IOTTMEntity",
               "New-IOTTMMetadataTransferJob",
               "New-IOTTMScene",
               "New-IOTTMSyncJob",
               "New-IOTTMWorkspace",
               "Remove-IOTTMComponentType",
               "Remove-IOTTMEntity",
               "Remove-IOTTMScene",
               "Remove-IOTTMSyncJob",
               "Remove-IOTTMWorkspace",
               "Invoke-IOTTMQuery",
               "Get-IOTTMComponentType",
               "Get-IOTTMEntity",
               "Get-IOTTMMetadataTransferJob",
               "Get-IOTTMPricingPlan",
               "Get-IOTTMPropertyValue",
               "Get-IOTTMPropertyValueHistory",
               "Get-IOTTMScene",
               "Get-IOTTMSyncJob",
               "Get-IOTTMWorkspace",
               "Get-IOTTMComponentList",
               "Get-IOTTMComponentTypeList",
               "Get-IOTTMEntityList",
               "Get-IOTTMMetadataTransferJobList",
               "Get-IOTTMPropertyList",
               "Get-IOTTMSceneList",
               "Get-IOTTMSyncJobList",
               "Get-IOTTMSyncResourceList",
               "Get-IOTTMResourceTag",
               "Get-IOTTMWorkspaceList",
               "Add-IOTTMResourceTag",
               "Remove-IOTTMResourceTag",
               "Update-IOTTMComponentType",
               "Update-IOTTMEntity",
               "Update-IOTTMPricingPlan",
               "Update-IOTTMScene",
               "Update-IOTTMWorkspace")
}

_awsArgumentCompleterRegistration $IOTTM_SelectCompleters $IOTTM_SelectMap
# Argument completions for service AWS IoT Wireless


$IOTW_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IoTWireless.DeviceProfileType
        "Get-IOTWDeviceProfileList/DeviceProfileType"
        {
            $v = "LoRaWAN","Sidewalk"
            break
        }

        # Amazon.IoTWireless.DlClass
        {
            ($_ -eq "New-IOTWMulticastGroup/LoRaWAN_DlClass") -Or
            ($_ -eq "Update-IOTWMulticastGroup/LoRaWAN_DlClass")
        }
        {
            $v = "ClassB","ClassC"
            break
        }

        # Amazon.IoTWireless.DownlinkMode
        "Send-IOTWDataToWirelessDevice/ParticipatingGateways_DownlinkMode"
        {
            $v = "CONCURRENT","SEQUENTIAL","USING_UPLINK_GATEWAY"
            break
        }

        # Amazon.IoTWireless.EventNotificationPartnerType
        {
            ($_ -eq "Get-IOTWResourceEventConfiguration/PartnerType") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/PartnerType")
        }
        {
            $v = "Sidewalk"
            break
        }

        # Amazon.IoTWireless.EventNotificationResourceType
        "Get-IOTWEventConfigurationList/ResourceType"
        {
            $v = "SidewalkAccount","WirelessDevice","WirelessGateway"
            break
        }

        # Amazon.IoTWireless.EventNotificationTopicStatus
        {
            ($_ -eq "Update-IOTWResourceEventConfiguration/ConnectionStatus_WirelessGatewayIdEventTopic") -Or
            ($_ -eq "Update-IOTWEventConfigurationByResourceType/DeviceRegistrationState_Sidewalk_WirelessDeviceEventTopic") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/DeviceRegistrationState_WirelessDeviceIdEventTopic") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/Join_WirelessDeviceIdEventTopic") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/LoRaWAN_DevEuiEventTopic") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/LoRaWAN_GatewayEuiEventTopic") -Or
            ($_ -eq "Update-IOTWEventConfigurationByResourceType/LoRaWAN_WirelessDeviceEventTopic") -Or
            ($_ -eq "Update-IOTWEventConfigurationByResourceType/LoRaWAN_WirelessGatewayEventTopic") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/MessageDeliveryStatus_WirelessDeviceIdEventTopic") -Or
            ($_ -eq "Update-IOTWEventConfigurationByResourceType/Proximity_Sidewalk_WirelessDeviceEventTopic") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/Proximity_WirelessDeviceIdEventTopic") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/Sidewalk_AmazonIdEventTopic") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/Sidewalk_DeviceRegistrationState_AmazonIdEventTopic") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/Sidewalk_MessageDeliveryStatus_AmazonIdEventTopic") -Or
            ($_ -eq "Update-IOTWEventConfigurationByResourceType/Sidewalk_WirelessDeviceEventTopic")
        }
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.IoTWireless.ExpressionType
        {
            ($_ -eq "New-IOTWDestination/ExpressionType") -Or
            ($_ -eq "Update-IOTWDestination/ExpressionType")
        }
        {
            $v = "MqttTopic","RuleName"
            break
        }

        # Amazon.IoTWireless.IdentifierType
        {
            ($_ -eq "Get-IOTWResourceEventConfiguration/IdentifierType") -Or
            ($_ -eq "Update-IOTWResourceEventConfiguration/IdentifierType")
        }
        {
            $v = "DevEui","GatewayEui","PartnerAccountId","WirelessDeviceId","WirelessGatewayId"
            break
        }

        # Amazon.IoTWireless.LogLevel
        {
            ($_ -eq "Update-IOTWLogLevelsByResourceType/DefaultLogLevel") -Or
            ($_ -eq "Write-IOTWResourceLogLevel/LogLevel") -Or
            ($_ -eq "New-IOTWNetworkAnalyzerConfiguration/TraceContent_LogLevel") -Or
            ($_ -eq "Update-IOTWNetworkAnalyzerConfiguration/TraceContent_LogLevel")
        }
        {
            $v = "DISABLED","ERROR","INFO"
            break
        }

        # Amazon.IoTWireless.MessageType
        "Send-IOTWDataToWirelessDevice/Sidewalk_MessageType"
        {
            $v = "CUSTOM_COMMAND_ID_GET","CUSTOM_COMMAND_ID_NOTIFY","CUSTOM_COMMAND_ID_RESP","CUSTOM_COMMAND_ID_SET"
            break
        }

        # Amazon.IoTWireless.MulticastFrameInfo
        {
            ($_ -eq "New-IOTWNetworkAnalyzerConfiguration/TraceContent_MulticastFrameInfo") -Or
            ($_ -eq "Update-IOTWNetworkAnalyzerConfiguration/TraceContent_MulticastFrameInfo")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.IoTWireless.OnboardStatus
        "Get-IOTWDevicesForWirelessDeviceImportTaskList/Status"
        {
            $v = "FAILED","INITIALIZED","ONBOARDED","PENDING"
            break
        }

        # Amazon.IoTWireless.PartnerType
        {
            ($_ -eq "Get-IOTWPartnerAccount/PartnerType") -Or
            ($_ -eq "Split-IOTWAwsAccountFromPartnerAccount/PartnerType") -Or
            ($_ -eq "Update-IOTWPartnerAccount/PartnerType")
        }
        {
            $v = "Sidewalk"
            break
        }

        # Amazon.IoTWireless.PositionConfigurationFec
        "Write-IOTWPositionConfiguration/SemtechGnss_Fec"
        {
            $v = "NONE","ROSE"
            break
        }

        # Amazon.IoTWireless.PositionConfigurationStatus
        "Write-IOTWPositionConfiguration/SemtechGnss_Status"
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.IoTWireless.PositioningConfigStatus
        {
            ($_ -eq "New-IOTWWirelessDevice/Positioning") -Or
            ($_ -eq "Update-IOTWWirelessDevice/Positioning")
        }
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.IoTWireless.PositionResourceType
        {
            ($_ -eq "Get-IOTWPosition/ResourceType") -Or
            ($_ -eq "Get-IOTWPositionConfiguration/ResourceType") -Or
            ($_ -eq "Get-IOTWPositionConfigurationList/ResourceType") -Or
            ($_ -eq "Get-IOTWResourcePosition/ResourceType") -Or
            ($_ -eq "Update-IOTWPosition/ResourceType") -Or
            ($_ -eq "Update-IOTWResourcePosition/ResourceType") -Or
            ($_ -eq "Write-IOTWPositionConfiguration/ResourceType")
        }
        {
            $v = "WirelessDevice","WirelessGateway"
            break
        }

        # Amazon.IoTWireless.SummaryMetricConfigurationStatus
        "Update-IOTWMetricConfiguration/SummaryMetric_Status"
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.IoTWireless.SupportedRfRegion
        {
            ($_ -eq "New-IOTWFuotaTask/LoRaWAN_RfRegion") -Or
            ($_ -eq "New-IOTWMulticastGroup/LoRaWAN_RfRegion") -Or
            ($_ -eq "Update-IOTWFuotaTask/LoRaWAN_RfRegion") -Or
            ($_ -eq "Update-IOTWMulticastGroup/LoRaWAN_RfRegion")
        }
        {
            $v = "AS923-1","AS923-2","AS923-3","AS923-4","AU915","CN470","CN779","EU433","EU868","IN865","KR920","RU864","US915"
            break
        }

        # Amazon.IoTWireless.WirelessDeviceFrameInfo
        {
            ($_ -eq "New-IOTWNetworkAnalyzerConfiguration/TraceContent_WirelessDeviceFrameInfo") -Or
            ($_ -eq "Update-IOTWNetworkAnalyzerConfiguration/TraceContent_WirelessDeviceFrameInfo")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.IoTWireless.WirelessDeviceIdType
        "Get-IOTWWirelessDevice/IdentifierType"
        {
            $v = "DevEui","SidewalkManufacturingSn","ThingName","WirelessDeviceId"
            break
        }

        # Amazon.IoTWireless.WirelessDeviceType
        {
            ($_ -eq "New-IOTWWirelessDevice/Type") -Or
            ($_ -eq "Get-IOTWQueuedMessageList/WirelessDeviceType") -Or
            ($_ -eq "Get-IOTWWirelessDeviceList/WirelessDeviceType") -Or
            ($_ -eq "Remove-IOTWQueuedMessage/WirelessDeviceType") -Or
            ($_ -eq "Unregister-IOTWWirelessDevice/WirelessDeviceType")
        }
        {
            $v = "LoRaWAN","Sidewalk"
            break
        }

        # Amazon.IoTWireless.WirelessGatewayIdType
        "Get-IOTWWirelessGateway/IdentifierType"
        {
            $v = "GatewayEui","ThingName","WirelessGatewayId"
            break
        }

        # Amazon.IoTWireless.WirelessGatewayServiceType
        "Get-IOTWServiceEndpoint/ServiceType"
        {
            $v = "CUPS","LNS"
            break
        }

        # Amazon.IoTWireless.WirelessGatewayTaskDefinitionType
        "Get-IOTWWirelessGatewayTaskDefinitionList/TaskDefinitionType"
        {
            $v = "UPDATE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTW_map = @{
    "ConnectionStatus_WirelessGatewayIdEventTopic"=@("Update-IOTWResourceEventConfiguration")
    "DefaultLogLevel"=@("Update-IOTWLogLevelsByResourceType")
    "DeviceProfileType"=@("Get-IOTWDeviceProfileList")
    "DeviceRegistrationState_Sidewalk_WirelessDeviceEventTopic"=@("Update-IOTWEventConfigurationByResourceType")
    "DeviceRegistrationState_WirelessDeviceIdEventTopic"=@("Update-IOTWResourceEventConfiguration")
    "ExpressionType"=@("New-IOTWDestination","Update-IOTWDestination")
    "IdentifierType"=@("Get-IOTWResourceEventConfiguration","Get-IOTWWirelessDevice","Get-IOTWWirelessGateway","Update-IOTWResourceEventConfiguration")
    "Join_WirelessDeviceIdEventTopic"=@("Update-IOTWResourceEventConfiguration")
    "LogLevel"=@("Write-IOTWResourceLogLevel")
    "LoRaWAN_DevEuiEventTopic"=@("Update-IOTWResourceEventConfiguration")
    "LoRaWAN_DlClass"=@("New-IOTWMulticastGroup","Update-IOTWMulticastGroup")
    "LoRaWAN_GatewayEuiEventTopic"=@("Update-IOTWResourceEventConfiguration")
    "LoRaWAN_RfRegion"=@("New-IOTWFuotaTask","New-IOTWMulticastGroup","Update-IOTWFuotaTask","Update-IOTWMulticastGroup")
    "LoRaWAN_WirelessDeviceEventTopic"=@("Update-IOTWEventConfigurationByResourceType")
    "LoRaWAN_WirelessGatewayEventTopic"=@("Update-IOTWEventConfigurationByResourceType")
    "MessageDeliveryStatus_WirelessDeviceIdEventTopic"=@("Update-IOTWResourceEventConfiguration")
    "ParticipatingGateways_DownlinkMode"=@("Send-IOTWDataToWirelessDevice")
    "PartnerType"=@("Get-IOTWPartnerAccount","Get-IOTWResourceEventConfiguration","Split-IOTWAwsAccountFromPartnerAccount","Update-IOTWPartnerAccount","Update-IOTWResourceEventConfiguration")
    "Positioning"=@("New-IOTWWirelessDevice","Update-IOTWWirelessDevice")
    "Proximity_Sidewalk_WirelessDeviceEventTopic"=@("Update-IOTWEventConfigurationByResourceType")
    "Proximity_WirelessDeviceIdEventTopic"=@("Update-IOTWResourceEventConfiguration")
    "ResourceType"=@("Get-IOTWEventConfigurationList","Get-IOTWPosition","Get-IOTWPositionConfiguration","Get-IOTWPositionConfigurationList","Get-IOTWResourcePosition","Update-IOTWPosition","Update-IOTWResourcePosition","Write-IOTWPositionConfiguration")
    "SemtechGnss_Fec"=@("Write-IOTWPositionConfiguration")
    "SemtechGnss_Status"=@("Write-IOTWPositionConfiguration")
    "ServiceType"=@("Get-IOTWServiceEndpoint")
    "Sidewalk_AmazonIdEventTopic"=@("Update-IOTWResourceEventConfiguration")
    "Sidewalk_DeviceRegistrationState_AmazonIdEventTopic"=@("Update-IOTWResourceEventConfiguration")
    "Sidewalk_MessageDeliveryStatus_AmazonIdEventTopic"=@("Update-IOTWResourceEventConfiguration")
    "Sidewalk_MessageType"=@("Send-IOTWDataToWirelessDevice")
    "Sidewalk_WirelessDeviceEventTopic"=@("Update-IOTWEventConfigurationByResourceType")
    "Status"=@("Get-IOTWDevicesForWirelessDeviceImportTaskList")
    "SummaryMetric_Status"=@("Update-IOTWMetricConfiguration")
    "TaskDefinitionType"=@("Get-IOTWWirelessGatewayTaskDefinitionList")
    "TraceContent_LogLevel"=@("New-IOTWNetworkAnalyzerConfiguration","Update-IOTWNetworkAnalyzerConfiguration")
    "TraceContent_MulticastFrameInfo"=@("New-IOTWNetworkAnalyzerConfiguration","Update-IOTWNetworkAnalyzerConfiguration")
    "TraceContent_WirelessDeviceFrameInfo"=@("New-IOTWNetworkAnalyzerConfiguration","Update-IOTWNetworkAnalyzerConfiguration")
    "Type"=@("New-IOTWWirelessDevice")
    "WirelessDeviceType"=@("Get-IOTWQueuedMessageList","Get-IOTWWirelessDeviceList","Remove-IOTWQueuedMessage","Unregister-IOTWWirelessDevice")
}

_awsArgumentCompleterRegistration $IOTW_Completers $IOTW_map

$IOTW_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IOTW.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IOTW_SelectMap = @{
    "Select"=@("Join-IOTWAwsAccountWithPartnerAccount",
               "Join-IOTWMulticastGroupWithFuotaTask",
               "Join-IOTWWirelessDeviceWithFuotaTask",
               "Join-IOTWWirelessDeviceWithMulticastGroup",
               "Join-IOTWWirelessDeviceWithThing",
               "Join-IOTWWirelessGatewayWithCertificate",
               "Join-IOTWWirelessGatewayWithThing",
               "Stop-IOTWMulticastGroupSession",
               "New-IOTWDestination",
               "New-IOTWDeviceProfile",
               "New-IOTWFuotaTask",
               "New-IOTWMulticastGroup",
               "New-IOTWNetworkAnalyzerConfiguration",
               "New-IOTWServiceProfile",
               "New-IOTWWirelessDevice",
               "New-IOTWWirelessGateway",
               "New-IOTWWirelessGatewayTask",
               "New-IOTWWirelessGatewayTaskDefinition",
               "Remove-IOTWDestination",
               "Remove-IOTWDeviceProfile",
               "Remove-IOTWFuotaTask",
               "Remove-IOTWMulticastGroup",
               "Remove-IOTWNetworkAnalyzerConfiguration",
               "Remove-IOTWQueuedMessage",
               "Remove-IOTWServiceProfile",
               "Remove-IOTWWirelessDevice",
               "Remove-IOTWWirelessDeviceImportTask",
               "Remove-IOTWWirelessGateway",
               "Remove-IOTWWirelessGatewayTask",
               "Remove-IOTWWirelessGatewayTaskDefinition",
               "Unregister-IOTWWirelessDevice",
               "Split-IOTWAwsAccountFromPartnerAccount",
               "Split-IOTWMulticastGroupFromFuotaTask",
               "Split-IOTWWirelessDeviceFromFuotaTask",
               "Split-IOTWWirelessDeviceFromMulticastGroup",
               "Split-IOTWWirelessDeviceFromThing",
               "Split-IOTWWirelessGatewayFromCertificate",
               "Split-IOTWWirelessGatewayFromThing",
               "Get-IOTWDestination",
               "Get-IOTWDeviceProfile",
               "Get-IOTWEventConfigurationByResourceType",
               "Get-IOTWFuotaTask",
               "Get-IOTWLogLevelsByResourceType",
               "Get-IOTWMetricConfiguration",
               "Get-IOTWMetric",
               "Get-IOTWMulticastGroup",
               "Get-IOTWMulticastGroupSession",
               "Get-IOTWNetworkAnalyzerConfiguration",
               "Get-IOTWPartnerAccount",
               "Get-IOTWPosition",
               "Get-IOTWPositionConfiguration",
               "Get-IOTWPositionEstimate",
               "Get-IOTWResourceEventConfiguration",
               "Get-IOTWResourceLogLevel",
               "Get-IOTWResourcePosition",
               "Get-IOTWServiceEndpoint",
               "Get-IOTWServiceProfile",
               "Get-IOTWWirelessDevice",
               "Get-IOTWWirelessDeviceImportTask",
               "Get-IOTWWirelessDeviceStatistic",
               "Get-IOTWWirelessGateway",
               "Get-IOTWWirelessGatewayCertificate",
               "Get-IOTWWirelessGatewayFirmwareInformation",
               "Get-IOTWWirelessGatewayStatistic",
               "Get-IOTWWirelessGatewayTask",
               "Get-IOTWWirelessGatewayTaskDefinition",
               "Get-IOTWDestinationList",
               "Get-IOTWDeviceProfileList",
               "Get-IOTWDevicesForWirelessDeviceImportTaskList",
               "Get-IOTWEventConfigurationList",
               "Get-IOTWFuotaTaskList",
               "Get-IOTWMulticastGroupList",
               "Get-IOTWMulticastGroupsByFuotaTaskList",
               "Get-IOTWNetworkAnalyzerConfigurationList",
               "Get-IOTWPartnerAccountList",
               "Get-IOTWPositionConfigurationList",
               "Get-IOTWQueuedMessageList",
               "Get-IOTWServiceProfileList",
               "Get-IOTWResourceTag",
               "Get-IOTWWirelessDeviceImportTaskList",
               "Get-IOTWWirelessDeviceList",
               "Get-IOTWWirelessGatewayList",
               "Get-IOTWWirelessGatewayTaskDefinitionList",
               "Write-IOTWPositionConfiguration",
               "Write-IOTWResourceLogLevel",
               "Reset-IOTWAllResourceLogLevel",
               "Reset-IOTWResourceLogLevel",
               "Send-IOTWDataToMulticastGroup",
               "Send-IOTWDataToWirelessDevice",
               "Start-IOTWBulkAssociateWirelessDeviceWithMulticastGroup",
               "Start-IOTWBulkDisassociateWirelessDeviceFromMulticastGroup",
               "Start-IOTWFuotaTask",
               "Start-IOTWMulticastGroupSession",
               "Start-IOTWSingleWirelessDeviceImportTask",
               "Start-IOTWWirelessDeviceImportTask",
               "Add-IOTWResourceTag",
               "Test-IOTWWirelessDevice",
               "Remove-IOTWResourceTag",
               "Update-IOTWDestination",
               "Update-IOTWEventConfigurationByResourceType",
               "Update-IOTWFuotaTask",
               "Update-IOTWLogLevelsByResourceType",
               "Update-IOTWMetricConfiguration",
               "Update-IOTWMulticastGroup",
               "Update-IOTWNetworkAnalyzerConfiguration",
               "Update-IOTWPartnerAccount",
               "Update-IOTWPosition",
               "Update-IOTWResourceEventConfiguration",
               "Update-IOTWResourcePosition",
               "Update-IOTWWirelessDevice",
               "Update-IOTWWirelessDeviceImportTask",
               "Update-IOTWWirelessGateway")
}

_awsArgumentCompleterRegistration $IOTW_SelectCompleters $IOTW_SelectMap
# Argument completions for service Amazon Interactive Video Service


$IVS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IVS.ChannelLatencyMode
        {
            ($_ -eq "New-IVSChannel/LatencyMode") -Or
            ($_ -eq "Update-IVSChannel/LatencyMode")
        }
        {
            $v = "LOW","NORMAL"
            break
        }

        # Amazon.IVS.ChannelType
        {
            ($_ -eq "New-IVSChannel/Type") -Or
            ($_ -eq "Update-IVSChannel/Type")
        }
        {
            $v = "ADVANCED_HD","ADVANCED_SD","BASIC","STANDARD"
            break
        }

        # Amazon.IVS.RecordingMode
        "New-IVSRecordingConfiguration/ThumbnailConfiguration_RecordingMode"
        {
            $v = "DISABLED","INTERVAL"
            break
        }

        # Amazon.IVS.RenditionConfigurationRenditionSelection
        "New-IVSRecordingConfiguration/RenditionConfiguration_RenditionSelection"
        {
            $v = "ALL","CUSTOM","NONE"
            break
        }

        # Amazon.IVS.StreamHealth
        "Get-IVSStreamList/FilterBy_Health"
        {
            $v = "HEALTHY","STARVING","UNKNOWN"
            break
        }

        # Amazon.IVS.ThumbnailConfigurationResolution
        "New-IVSRecordingConfiguration/ThumbnailConfiguration_Resolution"
        {
            $v = "FULL_HD","HD","LOWEST_RESOLUTION","SD"
            break
        }

        # Amazon.IVS.TranscodePreset
        {
            ($_ -eq "New-IVSChannel/Preset") -Or
            ($_ -eq "Update-IVSChannel/Preset")
        }
        {
            $v = "CONSTRAINED_BANDWIDTH_DELIVERY","HIGHER_BANDWIDTH_DELIVERY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IVS_map = @{
    "FilterBy_Health"=@("Get-IVSStreamList")
    "LatencyMode"=@("New-IVSChannel","Update-IVSChannel")
    "Preset"=@("New-IVSChannel","Update-IVSChannel")
    "RenditionConfiguration_RenditionSelection"=@("New-IVSRecordingConfiguration")
    "ThumbnailConfiguration_RecordingMode"=@("New-IVSRecordingConfiguration")
    "ThumbnailConfiguration_Resolution"=@("New-IVSRecordingConfiguration")
    "Type"=@("New-IVSChannel","Update-IVSChannel")
}

_awsArgumentCompleterRegistration $IVS_Completers $IVS_map

$IVS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IVS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IVS_SelectMap = @{
    "Select"=@("Get-IVSChannelBatch",
               "Get-IVSStreamKeyBatch",
               "Start-IVSStartViewerSessionRevocation",
               "New-IVSChannel",
               "New-IVSPlaybackRestrictionPolicy",
               "New-IVSRecordingConfiguration",
               "New-IVSStreamKey",
               "Remove-IVSChannel",
               "Remove-IVSPlaybackKeyPair",
               "Remove-IVSPlaybackRestrictionPolicy",
               "Remove-IVSRecordingConfiguration",
               "Remove-IVSStreamKey",
               "Get-IVSChannel",
               "Get-IVSPlaybackKeyPair",
               "Get-IVSPlaybackRestrictionPolicy",
               "Get-IVSRecordingConfiguration",
               "Get-IVSStream",
               "Get-IVSStreamKey",
               "Get-IVSStreamSession",
               "Import-IVSPlaybackKeyPair",
               "Get-IVSChannelList",
               "Get-IVSPlaybackKeyPairList",
               "Get-IVSPlaybackRestrictionPolicyList",
               "Get-IVSRecordingConfigurationList",
               "Get-IVSStreamKeyList",
               "Get-IVSStreamList",
               "Get-IVSStreamSessionList",
               "Get-IVSResourceTag",
               "Write-IVSMetadata",
               "Start-IVSViewerSessionRevocation",
               "Stop-IVSStream",
               "Add-IVSResourceTag",
               "Remove-IVSResourceTag",
               "Update-IVSChannel",
               "Update-IVSPlaybackRestrictionPolicy")
}

_awsArgumentCompleterRegistration $IVS_SelectCompleters $IVS_SelectMap
# Argument completions for service Amazon Interactive Video Service Chat


$IVSC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Ivschat.FallbackResult
        {
            ($_ -eq "New-IVSCRoom/MessageReviewHandler_FallbackResult") -Or
            ($_ -eq "Update-IVSCRoom/MessageReviewHandler_FallbackResult")
        }
        {
            $v = "ALLOW","DENY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IVSC_map = @{
    "MessageReviewHandler_FallbackResult"=@("New-IVSCRoom","Update-IVSCRoom")
}

_awsArgumentCompleterRegistration $IVSC_Completers $IVSC_map

$IVSC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IVSC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IVSC_SelectMap = @{
    "Select"=@("New-IVSCChatToken",
               "New-IVSCLoggingConfiguration",
               "New-IVSCRoom",
               "Remove-IVSCLoggingConfiguration",
               "Remove-IVSCMessage",
               "Remove-IVSCRoom",
               "Disconnect-IVSCUser",
               "Get-IVSCLoggingConfiguration",
               "Get-IVSCRoom",
               "Get-IVSCLoggingConfigurationList",
               "Get-IVSCRoomList",
               "Get-IVSCResourceTag",
               "Send-IVSCEvent",
               "Add-IVSCResourceTag",
               "Remove-IVSCResourceTag",
               "Update-IVSCLoggingConfiguration",
               "Update-IVSCRoom")
}

_awsArgumentCompleterRegistration $IVSC_SelectCompleters $IVSC_SelectMap
# Argument completions for service Amazon Interactive Video Service RealTime


$IVSRT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IVSRealTime.IngestConfigurationState
        "Get-IVSRTIngestConfigurationList/FilterByState"
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.IVSRealTime.IngestProtocol
        "New-IVSRTIngestConfiguration/IngestProtocol"
        {
            $v = "RTMP","RTMPS"
            break
        }

        # Amazon.IVSRealTime.ParticipantRecordingFilterByRecordingState
        "Get-IVSRTParticipantList/FilterByRecordingState"
        {
            $v = "ACTIVE","FAILED","STARTING","STOPPED","STOPPING"
            break
        }

        # Amazon.IVSRealTime.ParticipantState
        "Get-IVSRTParticipantList/FilterByState"
        {
            $v = "CONNECTED","DISCONNECTED"
            break
        }

        # Amazon.IVSRealTime.PipBehavior
        "Start-IVSRTComposition/Pip_PipBehavior"
        {
            $v = "DYNAMIC","STATIC"
            break
        }

        # Amazon.IVSRealTime.PipPosition
        "Start-IVSRTComposition/Pip_PipPosition"
        {
            $v = "BOTTOM_LEFT","BOTTOM_RIGHT","TOP_LEFT","TOP_RIGHT"
            break
        }

        # Amazon.IVSRealTime.VideoAspectRatio
        "Start-IVSRTComposition/Grid_VideoAspectRatio"
        {
            $v = "AUTO","PORTRAIT","SQUARE","VIDEO"
            break
        }

        # Amazon.IVSRealTime.VideoFillMode
        {
            ($_ -eq "Start-IVSRTComposition/Grid_VideoFillMode") -Or
            ($_ -eq "Start-IVSRTComposition/Pip_VideoFillMode")
        }
        {
            $v = "CONTAIN","COVER","FILL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IVSRT_map = @{
    "FilterByRecordingState"=@("Get-IVSRTParticipantList")
    "FilterByState"=@("Get-IVSRTIngestConfigurationList","Get-IVSRTParticipantList")
    "Grid_VideoAspectRatio"=@("Start-IVSRTComposition")
    "Grid_VideoFillMode"=@("Start-IVSRTComposition")
    "IngestProtocol"=@("New-IVSRTIngestConfiguration")
    "Pip_PipBehavior"=@("Start-IVSRTComposition")
    "Pip_PipPosition"=@("Start-IVSRTComposition")
    "Pip_VideoFillMode"=@("Start-IVSRTComposition")
}

_awsArgumentCompleterRegistration $IVSRT_Completers $IVSRT_map

$IVSRT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IVSRT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IVSRT_SelectMap = @{
    "Select"=@("New-IVSRTEncoderConfiguration",
               "New-IVSRTIngestConfiguration",
               "New-IVSRTParticipantToken",
               "New-IVSRTStage",
               "New-IVSRTStorageConfiguration",
               "Remove-IVSRTEncoderConfiguration",
               "Remove-IVSRTIngestConfiguration",
               "Remove-IVSRTPublicKey",
               "Remove-IVSRTStage",
               "Remove-IVSRTStorageConfiguration",
               "Disconnect-IVSRTParticipant",
               "Get-IVSRTComposition",
               "Get-IVSRTEncoderConfiguration",
               "Get-IVSRTIngestConfiguration",
               "Get-IVSRTParticipant",
               "Get-IVSRTPublicKey",
               "Get-IVSRTStage",
               "Get-IVSRTStageSession",
               "Get-IVSRTStorageConfiguration",
               "Import-IVSRTPublicKey",
               "Get-IVSRTCompositionList",
               "Get-IVSRTEncoderConfigurationList",
               "Get-IVSRTIngestConfigurationList",
               "Get-IVSRTParticipantEventList",
               "Get-IVSRTParticipantList",
               "Get-IVSRTPublicKeyList",
               "Get-IVSRTStageList",
               "Get-IVSRTStageSessionList",
               "Get-IVSRTStorageConfigurationList",
               "Get-IVSRTResourceTag",
               "Start-IVSRTComposition",
               "Stop-IVSRTComposition",
               "Add-IVSRTResourceTag",
               "Remove-IVSRTResourceTag",
               "Update-IVSRTIngestConfiguration",
               "Update-IVSRTStage")
}

_awsArgumentCompleterRegistration $IVSRT_SelectCompleters $IVSRT_SelectMap
# Argument completions for service Amazon Managed Streaming for Apache Kafka (MSK)


$MSK_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Kafka.ClientBroker
        {
            ($_ -eq "New-MSKCluster/EncryptionInTransit_ClientBroker") -Or
            ($_ -eq "New-MSKClusterV2/EncryptionInTransit_ClientBroker") -Or
            ($_ -eq "Update-MSKSecurity/EncryptionInTransit_ClientBroker")
        }
        {
            $v = "PLAINTEXT","TLS","TLS_PLAINTEXT"
            break
        }

        # Amazon.Kafka.EnhancedMonitoring
        {
            ($_ -eq "New-MSKCluster/EnhancedMonitoring") -Or
            ($_ -eq "Update-MSKMonitoring/EnhancedMonitoring") -Or
            ($_ -eq "New-MSKClusterV2/Provisioned_EnhancedMonitoring")
        }
        {
            $v = "DEFAULT","PER_BROKER","PER_TOPIC_PER_BROKER","PER_TOPIC_PER_PARTITION"
            break
        }

        # Amazon.Kafka.StorageMode
        {
            ($_ -eq "New-MSKClusterV2/Provisioned_StorageMode") -Or
            ($_ -eq "New-MSKCluster/StorageMode") -Or
            ($_ -eq "Update-MSKStorage/StorageMode")
        }
        {
            $v = "LOCAL","TIERED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MSK_map = @{
    "EncryptionInTransit_ClientBroker"=@("New-MSKCluster","New-MSKClusterV2","Update-MSKSecurity")
    "EnhancedMonitoring"=@("New-MSKCluster","Update-MSKMonitoring")
    "Provisioned_EnhancedMonitoring"=@("New-MSKClusterV2")
    "Provisioned_StorageMode"=@("New-MSKClusterV2")
    "StorageMode"=@("New-MSKCluster","Update-MSKStorage")
}

_awsArgumentCompleterRegistration $MSK_Completers $MSK_map

$MSK_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MSK.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MSK_SelectMap = @{
    "Select"=@("Register-MSKAssociateScramSecret",
               "Unregister-MSKDisassociateScramSecret",
               "New-MSKCluster",
               "New-MSKClusterV2",
               "New-MSKConfiguration",
               "New-MSKReplicator",
               "New-MSKVpcConnection",
               "Remove-MSKCluster",
               "Remove-MSKClusterPolicy",
               "Remove-MSKConfiguration",
               "Remove-MSKReplicator",
               "Remove-MSKVpcConnection",
               "Get-MSKCluster",
               "Get-MSKClusterOperation",
               "Get-MSKClusterOperationV2",
               "Get-MSKClusterV2",
               "Get-MSKConfiguration",
               "Get-MSKConfigurationRevision",
               "Get-MSKReplicator",
               "Get-MSKVpcConnection",
               "Get-MSKBootstrapBroker",
               "Get-MSKClusterPolicy",
               "Get-MSKCompatibleKafkaVersion",
               "Get-MSKClientVpcConnectionList",
               "Get-MSKClusterOperationList",
               "Get-MSKClusterOperationsV2List",
               "Get-MSKClusterList",
               "Get-MSKClustersV2List",
               "Get-MSKConfigurationRevisionList",
               "Get-MSKConfigurationList",
               "Get-MSKKafkaVersionList",
               "Get-MSKNodeList",
               "Get-MSKReplicatorList",
               "Get-MSKScramSecretList",
               "Get-MSKResourceTag",
               "Get-MSKVpcConnectionList",
               "Write-MSKClusterPolicy",
               "Restart-MSKBroker",
               "Deny-MSKClientVpcConnection",
               "Add-MSKResourceTag",
               "Remove-MSKResourceTag",
               "Update-MSKBrokerCount",
               "Update-MSKBrokerStorage",
               "Update-MSKBrokerType",
               "Update-MSKClusterConfiguration",
               "Update-MSKClusterKafkaVersion",
               "Update-MSKConfiguration",
               "Update-MSKConnectivity",
               "Update-MSKMonitoring",
               "Update-MSKReplicationInfo",
               "Update-MSKSecurity",
               "Update-MSKStorage")
}

_awsArgumentCompleterRegistration $MSK_SelectCompleters $MSK_SelectMap
# Argument completions for service Managed Streaming for Kafka Connect


$MSKC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.KafkaConnect.CustomPluginContentType
        "New-MSKCCustomPlugin/ContentType"
        {
            $v = "JAR","ZIP"
            break
        }

        # Amazon.KafkaConnect.KafkaClusterClientAuthenticationType
        "New-MSKCConnector/KafkaClusterClientAuthentication_AuthenticationType"
        {
            $v = "IAM","NONE"
            break
        }

        # Amazon.KafkaConnect.KafkaClusterEncryptionInTransitType
        "New-MSKCConnector/KafkaClusterEncryptionInTransit_EncryptionType"
        {
            $v = "PLAINTEXT","TLS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MSKC_map = @{
    "ContentType"=@("New-MSKCCustomPlugin")
    "KafkaClusterClientAuthentication_AuthenticationType"=@("New-MSKCConnector")
    "KafkaClusterEncryptionInTransit_EncryptionType"=@("New-MSKCConnector")
}

_awsArgumentCompleterRegistration $MSKC_Completers $MSKC_map

$MSKC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MSKC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MSKC_SelectMap = @{
    "Select"=@("New-MSKCConnector",
               "New-MSKCCustomPlugin",
               "New-MSKCWorkerConfiguration",
               "Remove-MSKCConnector",
               "Remove-MSKCCustomPlugin",
               "Remove-MSKCWorkerConfiguration",
               "Get-MSKCConnector",
               "Get-MSKCCustomPlugin",
               "Get-MSKCWorkerConfiguration",
               "Get-MSKCConnectorList",
               "Get-MSKCCustomPluginList",
               "Get-MSKCResourceTag",
               "Get-MSKCWorkerConfigurationList",
               "Add-MSKCResourceTag",
               "Remove-MSKCResourceTag",
               "Update-MSKCConnector")
}

_awsArgumentCompleterRegistration $MSKC_SelectCompleters $MSKC_SelectMap
# Argument completions for service Amazon Kendra


$KNDR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Kendra.AttributeSuggestionsMode
        "Update-KNDRQuerySuggestionsConfig/AttributeSuggestionsConfig_AttributeSuggestionsMode"
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.Kendra.ConditionOperator
        {
            ($_ -eq "New-KNDRDataSource/CustomDocumentEnrichmentConfiguration_PostExtractionHookConfiguration_InvocationCondition_Operator") -Or
            ($_ -eq "Update-KNDRDataSource/CustomDocumentEnrichmentConfiguration_PostExtractionHookConfiguration_InvocationCondition_Operator") -Or
            ($_ -eq "Write-KNDRDocumentBatch/CustomDocumentEnrichmentConfiguration_PostExtractionHookConfiguration_InvocationCondition_Operator") -Or
            ($_ -eq "New-KNDRDataSource/CustomDocumentEnrichmentConfiguration_PreExtractionHookConfiguration_InvocationCondition_Operator") -Or
            ($_ -eq "Update-KNDRDataSource/CustomDocumentEnrichmentConfiguration_PreExtractionHookConfiguration_InvocationCondition_Operator") -Or
            ($_ -eq "Write-KNDRDocumentBatch/CustomDocumentEnrichmentConfiguration_PreExtractionHookConfiguration_InvocationCondition_Operator")
        }
        {
            $v = "BeginsWith","Contains","Equals","Exists","GreaterThan","GreaterThanOrEquals","LessThan","LessThanOrEquals","NotContains","NotEquals","NotExists"
            break
        }

        # Amazon.Kendra.DataSourceSyncJobStatus
        "Get-KNDRDataSourceSyncJobList/StatusFilter"
        {
            $v = "ABORTED","FAILED","INCOMPLETE","STOPPING","SUCCEEDED","SYNCING","SYNCING_INDEXING"
            break
        }

        # Amazon.Kendra.DataSourceType
        "New-KNDRDataSource/Type"
        {
            $v = "ALFRESCO","BOX","CONFLUENCE","CUSTOM","DATABASE","FSX","GITHUB","GOOGLEDRIVE","JIRA","ONEDRIVE","QUIP","S3","SALESFORCE","SERVICENOW","SHAREPOINT","SLACK","TEMPLATE","WEBCRAWLER","WORKDOCS"
            break
        }

        # Amazon.Kendra.FaqFileFormat
        "New-KNDRFaq/FileFormat"
        {
            $v = "CSV","CSV_WITH_HEADER","JSON"
            break
        }

        # Amazon.Kendra.FeaturedResultsSetStatus
        {
            ($_ -eq "New-KNDRFeaturedResultsSet/Status") -Or
            ($_ -eq "Update-KNDRFeaturedResultsSet/Status")
        }
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.Kendra.IndexEdition
        "New-KNDRIndex/Edition"
        {
            $v = "DEVELOPER_EDITION","ENTERPRISE_EDITION"
            break
        }

        # Amazon.Kendra.Interval
        "Get-KNDRSnapshot/Interval"
        {
            $v = "ONE_MONTH_AGO","ONE_WEEK_AGO","THIS_MONTH","THIS_WEEK","TWO_MONTHS_AGO","TWO_WEEKS_AGO"
            break
        }

        # Amazon.Kendra.MetricType
        "Get-KNDRSnapshot/MetricType"
        {
            $v = "AGG_QUERY_DOC_METRICS","DOCS_BY_CLICK_COUNT","QUERIES_BY_COUNT","QUERIES_BY_ZERO_CLICK_RATE","QUERIES_BY_ZERO_RESULT_RATE","TREND_QUERY_DOC_METRICS"
            break
        }

        # Amazon.Kendra.MissingAttributeKeyStrategy
        "Invoke-KNDRQuery/CollapseConfiguration_MissingAttributeKeyStrategy"
        {
            $v = "COLLAPSE","EXPAND","IGNORE"
            break
        }

        # Amazon.Kendra.Mode
        "Update-KNDRQuerySuggestionsConfig/Mode"
        {
            $v = "ENABLED","LEARN_ONLY"
            break
        }

        # Amazon.Kendra.QueryResultType
        "Invoke-KNDRQuery/QueryResultTypeFilter"
        {
            $v = "ANSWER","DOCUMENT","QUESTION_ANSWER"
            break
        }

        # Amazon.Kendra.SortOrder
        "Invoke-KNDRQuery/SortingConfiguration_SortOrder"
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.Kendra.UserContextPolicy
        {
            ($_ -eq "New-KNDRIndex/UserContextPolicy") -Or
            ($_ -eq "Update-KNDRIndex/UserContextPolicy")
        }
        {
            $v = "ATTRIBUTE_FILTER","USER_TOKEN"
            break
        }

        # Amazon.Kendra.UserGroupResolutionMode
        {
            ($_ -eq "New-KNDRIndex/UserGroupResolutionConfiguration_UserGroupResolutionMode") -Or
            ($_ -eq "Update-KNDRIndex/UserGroupResolutionConfiguration_UserGroupResolutionMode")
        }
        {
            $v = "AWS_SSO","NONE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KNDR_map = @{
    "AttributeSuggestionsConfig_AttributeSuggestionsMode"=@("Update-KNDRQuerySuggestionsConfig")
    "CollapseConfiguration_MissingAttributeKeyStrategy"=@("Invoke-KNDRQuery")
    "CustomDocumentEnrichmentConfiguration_PostExtractionHookConfiguration_InvocationCondition_Operator"=@("New-KNDRDataSource","Update-KNDRDataSource","Write-KNDRDocumentBatch")
    "CustomDocumentEnrichmentConfiguration_PreExtractionHookConfiguration_InvocationCondition_Operator"=@("New-KNDRDataSource","Update-KNDRDataSource","Write-KNDRDocumentBatch")
    "Edition"=@("New-KNDRIndex")
    "FileFormat"=@("New-KNDRFaq")
    "Interval"=@("Get-KNDRSnapshot")
    "MetricType"=@("Get-KNDRSnapshot")
    "Mode"=@("Update-KNDRQuerySuggestionsConfig")
    "QueryResultTypeFilter"=@("Invoke-KNDRQuery")
    "SortingConfiguration_SortOrder"=@("Invoke-KNDRQuery")
    "Status"=@("New-KNDRFeaturedResultsSet","Update-KNDRFeaturedResultsSet")
    "StatusFilter"=@("Get-KNDRDataSourceSyncJobList")
    "Type"=@("New-KNDRDataSource")
    "UserContextPolicy"=@("New-KNDRIndex","Update-KNDRIndex")
    "UserGroupResolutionConfiguration_UserGroupResolutionMode"=@("New-KNDRIndex","Update-KNDRIndex")
}

_awsArgumentCompleterRegistration $KNDR_Completers $KNDR_map

$KNDR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KNDR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KNDR_SelectMap = @{
    "Select"=@("Add-KNDREntitiesToExperience",
               "Add-KNDRPersonasToEntity",
               "Remove-KNDRDocumentBatch",
               "Remove-KNDRFeaturedResultsSetBatch",
               "Get-KNDRGetDocumentStatus",
               "Write-KNDRDocumentBatch",
               "Clear-KNDRQuerySuggestion",
               "New-KNDRAccessControlConfiguration",
               "New-KNDRDataSource",
               "New-KNDRExperience",
               "New-KNDRFaq",
               "New-KNDRFeaturedResultsSet",
               "New-KNDRIndex",
               "New-KNDRQuerySuggestionsBlockList",
               "New-KNDRThesaurus",
               "Remove-KNDRAccessControlConfiguration",
               "Remove-KNDRDataSource",
               "Remove-KNDRExperience",
               "Remove-KNDRFaq",
               "Remove-KNDRIndex",
               "Remove-KNDRPrincipalMapping",
               "Remove-KNDRQuerySuggestionsBlockList",
               "Remove-KNDRThesaurus",
               "Get-KNDRAccessControlConfiguration",
               "Get-KNDRDataSource",
               "Get-KNDRExperience",
               "Get-KNDRFaq",
               "Get-KNDRFeaturedResultsSet",
               "Get-KNDRIndex",
               "Get-KNDRPrincipalMapping",
               "Get-KNDRQuerySuggestionsBlockList",
               "Get-KNDRQuerySuggestionsConfig",
               "Get-KNDRThesaurus",
               "Remove-KNDREntitiesFromExperience",
               "Remove-KNDRPersonasFromEntity",
               "Get-KNDRQuerySuggestion",
               "Get-KNDRSnapshot",
               "Get-KNDRAccessControlConfigurationList",
               "Get-KNDRDataSourceList",
               "Get-KNDRDataSourceSyncJobList",
               "Get-KNDREntityPersonaList",
               "Get-KNDRExperienceEntityList",
               "Get-KNDRExperienceList",
               "Get-KNDRFaqList",
               "Get-KNDRFeaturedResultsSetList",
               "Get-KNDRGroupsOlderThanOrderingIdList",
               "Get-KNDRIndexList",
               "Get-KNDRQuerySuggestionsBlockListList",
               "Get-KNDRResourceTag",
               "Get-KNDRThesauriList",
               "Write-KNDRPrincipalMapping",
               "Invoke-KNDRQuery",
               "Invoke-KNDRRetrieve",
               "Start-KNDRDataSourceSyncJob",
               "Stop-KNDRDataSourceSyncJob",
               "Send-KNDRFeedback",
               "Add-KNDRResourceTag",
               "Remove-KNDRResourceTag",
               "Update-KNDRAccessControlConfiguration",
               "Update-KNDRDataSource",
               "Update-KNDRExperience",
               "Update-KNDRFeaturedResultsSet",
               "Update-KNDRIndex",
               "Update-KNDRQuerySuggestionsBlockList",
               "Update-KNDRQuerySuggestionsConfig",
               "Update-KNDRThesaurus")
}

_awsArgumentCompleterRegistration $KNDR_SelectCompleters $KNDR_SelectMap
# Argument completions for service Amazon Kendra Intelligent Ranking


$KNRK_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KNRK.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KNRK_SelectMap = @{
    "Select"=@("New-KNRKRescoreExecutionPlan",
               "Remove-KNRKRescoreExecutionPlan",
               "Get-KNRKRescoreExecutionPlan",
               "Get-KNRKRescoreExecutionPlanList",
               "Get-KNRKResourceTag",
               "Invoke-KNRKRescore",
               "Add-KNRKResourceTag",
               "Remove-KNRKResourceTag",
               "Update-KNRKRescoreExecutionPlan")
}

_awsArgumentCompleterRegistration $KNRK_SelectCompleters $KNRK_SelectMap
# Argument completions for service Amazon Keyspaces


$KS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Keyspaces.ClientSideTimestampsStatus
        {
            ($_ -eq "New-KSTable/ClientSideTimestamps_Status") -Or
            ($_ -eq "Update-KSTable/ClientSideTimestamps_Status")
        }
        {
            $v = "ENABLED"
            break
        }

        # Amazon.Keyspaces.EncryptionType
        {
            ($_ -eq "New-KSTable/EncryptionSpecification_Type") -Or
            ($_ -eq "Update-KSTable/EncryptionSpecification_Type") -Or
            ($_ -eq "Restore-KSTable/EncryptionSpecificationOverride_Type")
        }
        {
            $v = "AWS_OWNED_KMS_KEY","CUSTOMER_MANAGED_KMS_KEY"
            break
        }

        # Amazon.Keyspaces.PointInTimeRecoveryStatus
        {
            ($_ -eq "New-KSTable/PointInTimeRecovery_Status") -Or
            ($_ -eq "Update-KSTable/PointInTimeRecovery_Status") -Or
            ($_ -eq "Restore-KSTable/PointInTimeRecoveryOverride_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Keyspaces.Rs
        "New-KSKeyspace/ReplicationSpecification_ReplicationStrategy"
        {
            $v = "MULTI_REGION","SINGLE_REGION"
            break
        }

        # Amazon.Keyspaces.ThroughputMode
        {
            ($_ -eq "New-KSTable/CapacitySpecification_ThroughputMode") -Or
            ($_ -eq "Update-KSTable/CapacitySpecification_ThroughputMode") -Or
            ($_ -eq "Restore-KSTable/CapacitySpecificationOverride_ThroughputMode")
        }
        {
            $v = "PAY_PER_REQUEST","PROVISIONED"
            break
        }

        # Amazon.Keyspaces.TimeToLiveStatus
        {
            ($_ -eq "New-KSTable/Ttl_Status") -Or
            ($_ -eq "Update-KSTable/Ttl_Status")
        }
        {
            $v = "ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KS_map = @{
    "CapacitySpecification_ThroughputMode"=@("New-KSTable","Update-KSTable")
    "CapacitySpecificationOverride_ThroughputMode"=@("Restore-KSTable")
    "ClientSideTimestamps_Status"=@("New-KSTable","Update-KSTable")
    "EncryptionSpecification_Type"=@("New-KSTable","Update-KSTable")
    "EncryptionSpecificationOverride_Type"=@("Restore-KSTable")
    "PointInTimeRecovery_Status"=@("New-KSTable","Update-KSTable")
    "PointInTimeRecoveryOverride_Status"=@("Restore-KSTable")
    "ReplicationSpecification_ReplicationStrategy"=@("New-KSKeyspace")
    "Ttl_Status"=@("New-KSTable","Update-KSTable")
}

_awsArgumentCompleterRegistration $KS_Completers $KS_map

$KS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KS_SelectMap = @{
    "Select"=@("New-KSKeyspace",
               "New-KSTable",
               "New-KSType",
               "Remove-KSKeyspace",
               "Remove-KSTable",
               "Remove-KSType",
               "Get-KSKeyspace",
               "Get-KSTable",
               "Get-KSTableAutoScalingSetting",
               "Get-KSType",
               "Get-KSKeyspaceList",
               "Get-KSTableList",
               "Get-KSResourceTag",
               "Get-KSTypeList",
               "Restore-KSTable",
               "Add-KSResourceTag",
               "Remove-KSResourceTag",
               "Update-KSTable")
}

_awsArgumentCompleterRegistration $KS_SelectCompleters $KS_SelectMap
# Argument completions for service Amazon Kinesis


$KIN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Kinesis.EncryptionType
        {
            ($_ -eq "Start-KINStreamEncryption/EncryptionType") -Or
            ($_ -eq "Stop-KINStreamEncryption/EncryptionType")
        }
        {
            $v = "KMS","NONE"
            break
        }

        # Amazon.Kinesis.ScalingType
        "Update-KINShardCount/ScalingType"
        {
            $v = "UNIFORM_SCALING"
            break
        }

        # Amazon.Kinesis.ShardFilterType
        "Get-KINShardList/ShardFilter_Type"
        {
            $v = "AFTER_SHARD_ID","AT_LATEST","AT_TIMESTAMP","AT_TRIM_HORIZON","FROM_TIMESTAMP","FROM_TRIM_HORIZON"
            break
        }

        # Amazon.Kinesis.ShardIteratorType
        "Get-KINShardIterator/ShardIteratorType"
        {
            $v = "AFTER_SEQUENCE_NUMBER","AT_SEQUENCE_NUMBER","AT_TIMESTAMP","LATEST","TRIM_HORIZON"
            break
        }

        # Amazon.Kinesis.StreamMode
        {
            ($_ -eq "New-KINStream/StreamModeDetails_StreamMode") -Or
            ($_ -eq "Update-KINStreamMode/StreamModeDetails_StreamMode")
        }
        {
            $v = "ON_DEMAND","PROVISIONED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KIN_map = @{
    "EncryptionType"=@("Start-KINStreamEncryption","Stop-KINStreamEncryption")
    "ScalingType"=@("Update-KINShardCount")
    "ShardFilter_Type"=@("Get-KINShardList")
    "ShardIteratorType"=@("Get-KINShardIterator")
    "StreamModeDetails_StreamMode"=@("New-KINStream","Update-KINStreamMode")
}

_awsArgumentCompleterRegistration $KIN_Completers $KIN_map

$KIN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KIN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KIN_SelectMap = @{
    "Select"=@("Add-KINTagsToStream",
               "New-KINStream",
               "Request-KINStreamRetentionPeriodDecrease",
               "Remove-KINResourcePolicy",
               "Remove-KINStream",
               "Unregister-KINStreamConsumer",
               "Get-KINLimit",
               "Get-KINStream",
               "Get-KINStreamConsumer",
               "Get-KINStreamSummary",
               "Disable-KINEnhancedMonitoring",
               "Enable-KINEnhancedMonitoring",
               "Get-KINRecord",
               "Get-KINResourcePolicy",
               "Get-KINShardIterator",
               "Request-KINStreamRetentionPeriodIncrease",
               "Get-KINShardList",
               "Get-KINStreamConsumerList",
               "Get-KINStreamList",
               "Get-KINTagsForStream",
               "Merge-KINShard",
               "Write-KINRecord",
               "Write-KINMultipleRecord",
               "Write-KINResourcePolicy",
               "Register-KINStreamConsumer",
               "Remove-KINTagsFromStream",
               "Split-KINShard",
               "Start-KINStreamEncryption",
               "Stop-KINStreamEncryption",
               "Update-KINShardCount",
               "Update-KINStreamMode")
}

_awsArgumentCompleterRegistration $KIN_SelectCompleters $KIN_SelectMap
# Argument completions for service Amazon Kinesis Analytics


$KINA_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.KinesisAnalytics.InputStartingPosition
        "Find-KINAInputSchema/InputStartingPositionConfiguration_InputStartingPosition"
        {
            $v = "LAST_STOPPED_POINT","NOW","TRIM_HORIZON"
            break
        }

        # Amazon.KinesisAnalytics.RecordFormatType
        {
            ($_ -eq "Add-KINAApplicationOutput/DestinationSchema_RecordFormatType") -Or
            ($_ -eq "Add-KINAApplicationInput/RecordFormat_RecordFormatType") -Or
            ($_ -eq "Add-KINAApplicationReferenceDataSource/RecordFormat_RecordFormatType")
        }
        {
            $v = "CSV","JSON"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KINA_map = @{
    "DestinationSchema_RecordFormatType"=@("Add-KINAApplicationOutput")
    "InputStartingPositionConfiguration_InputStartingPosition"=@("Find-KINAInputSchema")
    "RecordFormat_RecordFormatType"=@("Add-KINAApplicationInput","Add-KINAApplicationReferenceDataSource")
}

_awsArgumentCompleterRegistration $KINA_Completers $KINA_map

$KINA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KINA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KINA_SelectMap = @{
    "Select"=@("Add-KINAApplicationCloudWatchLoggingOption",
               "Add-KINAApplicationInput",
               "Add-KINAApplicationInputProcessingConfiguration",
               "Add-KINAApplicationOutput",
               "Add-KINAApplicationReferenceDataSource",
               "New-KINAApplication",
               "Remove-KINAApplication",
               "Remove-KINAApplicationCloudWatchLoggingOption",
               "Remove-KINAApplicationInputProcessingConfiguration",
               "Remove-KINAApplicationOutput",
               "Remove-KINAApplicationReferenceDataSource",
               "Get-KINAApplication",
               "Find-KINAInputSchema",
               "Get-KINAResourceTag",
               "Start-KINAApplication",
               "Stop-KINAApplication",
               "Add-KINAResourceTag",
               "Remove-KINAResourceTag",
               "Update-KINAApplication",
               "Get-KINAApplicationList")
}

_awsArgumentCompleterRegistration $KINA_SelectCompleters $KINA_SelectMap
# Argument completions for service Amazon Kinesis Analytics V2


$KINA2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.KinesisAnalyticsV2.ApplicationMode
        "New-KINA2Application/ApplicationMode"
        {
            $v = "INTERACTIVE","STREAMING"
            break
        }

        # Amazon.KinesisAnalyticsV2.OperationStatus
        "Get-KINA2ApplicationOperationList/OperationStatus"
        {
            $v = "CANCELLED","FAILED","IN_PROGRESS","SUCCESSFUL"
            break
        }

        # Amazon.KinesisAnalyticsV2.RuntimeEnvironment
        {
            ($_ -eq "New-KINA2Application/RuntimeEnvironment") -Or
            ($_ -eq "Update-KINA2Application/RuntimeEnvironmentUpdate")
        }
        {
            $v = "FLINK-1_11","FLINK-1_13","FLINK-1_15","FLINK-1_18","FLINK-1_19","FLINK-1_20","FLINK-1_6","FLINK-1_8","SQL-1_0","ZEPPELIN-FLINK-1_0","ZEPPELIN-FLINK-2_0","ZEPPELIN-FLINK-3_0"
            break
        }

        # Amazon.KinesisAnalyticsV2.UrlType
        "New-KINA2ApplicationPresignedUrl/UrlType"
        {
            $v = "FLINK_DASHBOARD_URL","ZEPPELIN_UI_URL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KINA2_map = @{
    "ApplicationMode"=@("New-KINA2Application")
    "OperationStatus"=@("Get-KINA2ApplicationOperationList")
    "RuntimeEnvironment"=@("New-KINA2Application")
    "RuntimeEnvironmentUpdate"=@("Update-KINA2Application")
    "UrlType"=@("New-KINA2ApplicationPresignedUrl")
}

_awsArgumentCompleterRegistration $KINA2_Completers $KINA2_map

$KINA2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KINA2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KINA2_SelectMap = @{
    "Select"=@("Add-KINA2ApplicationCloudWatchLoggingOption",
               "Add-KINA2ApplicationInput",
               "Add-KINA2ApplicationInputProcessingConfiguration",
               "Add-KINA2ApplicationOutput",
               "Add-KINA2ApplicationReferenceDataSource",
               "Add-KINA2ApplicationVpcConfiguration",
               "New-KINA2Application",
               "New-KINA2ApplicationPresignedUrl",
               "New-KINA2ApplicationSnapshot",
               "Remove-KINA2Application",
               "Remove-KINA2ApplicationCloudWatchLoggingOption",
               "Remove-KINA2ApplicationInputProcessingConfiguration",
               "Remove-KINA2ApplicationOutput",
               "Remove-KINA2ApplicationReferenceDataSource",
               "Remove-KINA2ApplicationSnapshot",
               "Remove-KINA2ApplicationVpcConfiguration",
               "Get-KINA2Application",
               "Get-KINA2ApplicationOperation",
               "Get-KINA2ApplicationSnapshot",
               "Get-KINA2ApplicationVersion",
               "Find-KINA2InputSchema",
               "Get-KINA2ApplicationOperationList",
               "Get-KINA2ApplicationList",
               "Get-KINA2ApplicationSnapshotList",
               "Get-KINA2ApplicationVersionList",
               "Get-KINA2ResourceTag",
               "Undo-KINA2Application",
               "Start-KINA2Application",
               "Stop-KINA2Application",
               "Add-KINA2ResourceTag",
               "Remove-KINA2ResourceTag",
               "Update-KINA2Application",
               "Update-KINA2ApplicationMaintenanceConfiguration")
}

_awsArgumentCompleterRegistration $KINA2_SelectCompleters $KINA2_SelectMap
# Argument completions for service Amazon Kinesis Video Streams


$KV_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.KinesisVideo.APIName
        "Get-KVDataEndpoint/APIName"
        {
            $v = "GET_CLIP","GET_DASH_STREAMING_SESSION_URL","GET_HLS_STREAMING_SESSION_URL","GET_IMAGES","GET_MEDIA","GET_MEDIA_FOR_FRAGMENT_LIST","LIST_FRAGMENTS","PUT_MEDIA"
            break
        }

        # Amazon.KinesisVideo.ChannelRole
        "Get-KVSignalingChannelEndpoint/SingleMasterChannelEndpointConfiguration_Role"
        {
            $v = "MASTER","VIEWER"
            break
        }

        # Amazon.KinesisVideo.ChannelType
        "New-KVSignalingChannel/ChannelType"
        {
            $v = "FULL_MESH","SINGLE_MASTER"
            break
        }

        # Amazon.KinesisVideo.ComparisonOperator
        "Get-KVSignalingChannelList/ChannelNameCondition_ComparisonOperator"
        {
            $v = "BEGINS_WITH"
            break
        }

        # Amazon.KinesisVideo.ConfigurationStatus
        {
            ($_ -eq "Update-KVImageGenerationConfiguration/ImageGenerationConfiguration_Status") -Or
            ($_ -eq "Update-KVNotificationConfiguration/NotificationConfiguration_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.KinesisVideo.Format
        "Update-KVImageGenerationConfiguration/ImageGenerationConfiguration_Format"
        {
            $v = "JPEG","PNG"
            break
        }

        # Amazon.KinesisVideo.ImageSelectorType
        "Update-KVImageGenerationConfiguration/ImageGenerationConfiguration_ImageSelectorType"
        {
            $v = "PRODUCER_TIMESTAMP","SERVER_TIMESTAMP"
            break
        }

        # Amazon.KinesisVideo.MediaStorageConfigurationStatus
        "Update-KVMediaStorageConfiguration/MediaStorageConfiguration_Status"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.KinesisVideo.MediaUriType
        "Start-KVEdgeConfigurationUpdate/MediaSourceConfig_MediaUriType"
        {
            $v = "FILE_URI","RTSP_URI"
            break
        }

        # Amazon.KinesisVideo.StrategyOnFullSize
        "Start-KVEdgeConfigurationUpdate/LocalSizeConfig_StrategyOnFullSize"
        {
            $v = "DELETE_OLDEST_MEDIA","DENY_NEW_MEDIA"
            break
        }

        # Amazon.KinesisVideo.UpdateDataRetentionOperation
        "Update-KVDataRetention/Operation"
        {
            $v = "DECREASE_DATA_RETENTION","INCREASE_DATA_RETENTION"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KV_map = @{
    "APIName"=@("Get-KVDataEndpoint")
    "ChannelNameCondition_ComparisonOperator"=@("Get-KVSignalingChannelList")
    "ChannelType"=@("New-KVSignalingChannel")
    "ImageGenerationConfiguration_Format"=@("Update-KVImageGenerationConfiguration")
    "ImageGenerationConfiguration_ImageSelectorType"=@("Update-KVImageGenerationConfiguration")
    "ImageGenerationConfiguration_Status"=@("Update-KVImageGenerationConfiguration")
    "LocalSizeConfig_StrategyOnFullSize"=@("Start-KVEdgeConfigurationUpdate")
    "MediaSourceConfig_MediaUriType"=@("Start-KVEdgeConfigurationUpdate")
    "MediaStorageConfiguration_Status"=@("Update-KVMediaStorageConfiguration")
    "NotificationConfiguration_Status"=@("Update-KVNotificationConfiguration")
    "Operation"=@("Update-KVDataRetention")
    "SingleMasterChannelEndpointConfiguration_Role"=@("Get-KVSignalingChannelEndpoint")
}

_awsArgumentCompleterRegistration $KV_Completers $KV_map

$KV_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KV.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KV_SelectMap = @{
    "Select"=@("New-KVSignalingChannel",
               "New-KVStream",
               "Remove-KVEdgeConfiguration",
               "Remove-KVSignalingChannel",
               "Remove-KVStream",
               "Get-KVEdgeConfiguration",
               "Get-KVImageGenerationConfiguration",
               "Get-KVMappedResourceConfiguration",
               "Get-KVMediaStorageConfiguration",
               "Get-KVNotificationConfiguration",
               "Get-KVSignalingChannel",
               "Get-KVStream",
               "Get-KVDataEndpoint",
               "Get-KVSignalingChannelEndpoint",
               "Get-KVEdgeAgentConfigurationList",
               "Get-KVSignalingChannelList",
               "Get-KVStreamList",
               "Get-KVResourceTag",
               "Get-KVTagsForStreamList",
               "Start-KVEdgeConfigurationUpdate",
               "Add-KVResourceTag",
               "Add-KVStreamTag",
               "Remove-KVResourceTag",
               "Remove-KVStreamTag",
               "Update-KVDataRetention",
               "Update-KVImageGenerationConfiguration",
               "Update-KVMediaStorageConfiguration",
               "Update-KVNotificationConfiguration",
               "Update-KVSignalingChannel",
               "Update-KVStream")
}

_awsArgumentCompleterRegistration $KV_SelectCompleters $KV_SelectMap
# Argument completions for service Amazon Kinesis Video Streams Media


$KVM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KVM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KVM_SelectMap = @{
    "Select"=@("Get-KVMMedia")
}

_awsArgumentCompleterRegistration $KVM_SelectCompleters $KVM_SelectMap
# Argument completions for service Amazon Kinesis Video Signaling Channels


$KVSC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.KinesisVideoSignalingChannels.Service
        "Get-KVSCIceServerConfig/Service"
        {
            $v = "TURN"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KVSC_map = @{
    "Service"=@("Get-KVSCIceServerConfig")
}

_awsArgumentCompleterRegistration $KVSC_Completers $KVSC_map

$KVSC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KVSC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KVSC_SelectMap = @{
    "Select"=@("Get-KVSCIceServerConfig",
               "Send-KVSCAlexaOfferToMaster")
}

_awsArgumentCompleterRegistration $KVSC_SelectCompleters $KVSC_SelectMap
# Argument completions for service Amazon Kinesis Video WebRTC Storage


$KVWS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KVWS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KVWS_SelectMap = @{
    "Select"=@("Join-KVWSStorageSession",
               "Join-KVWSStorageSessionAsViewer")
}

_awsArgumentCompleterRegistration $KVWS_SelectCompleters $KVWS_SelectMap
# Argument completions for service AWS Key Management Service


$KMS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.KeyManagementService.AlgorithmSpec
        "Get-KMSParametersForImport/WrappingAlgorithm"
        {
            $v = "RSAES_OAEP_SHA_1","RSAES_OAEP_SHA_256","RSAES_PKCS1_V1_5","RSA_AES_KEY_WRAP_SHA_1","RSA_AES_KEY_WRAP_SHA_256","SM2PKE"
            break
        }

        # Amazon.KeyManagementService.CustomerMasterKeySpec
        "New-KMSKey/CustomerMasterKeySpec"
        {
            $v = "ECC_NIST_P256","ECC_NIST_P384","ECC_NIST_P521","ECC_SECG_P256K1","HMAC_224","HMAC_256","HMAC_384","HMAC_512","RSA_2048","RSA_3072","RSA_4096","SM2","SYMMETRIC_DEFAULT"
            break
        }

        # Amazon.KeyManagementService.CustomKeyStoreType
        "New-KMSCustomKeyStore/CustomKeyStoreType"
        {
            $v = "AWS_CLOUDHSM","EXTERNAL_KEY_STORE"
            break
        }

        # Amazon.KeyManagementService.DataKeyPairSpec
        {
            ($_ -eq "New-KMSDataKeyPair/KeyPairSpec") -Or
            ($_ -eq "New-KMSDataKeyPairWithoutPlaintext/KeyPairSpec")
        }
        {
            $v = "ECC_NIST_P256","ECC_NIST_P384","ECC_NIST_P521","ECC_SECG_P256K1","RSA_2048","RSA_3072","RSA_4096","SM2"
            break
        }

        # Amazon.KeyManagementService.DataKeySpec
        {
            ($_ -eq "New-KMSDataKey/KeySpec") -Or
            ($_ -eq "New-KMSDataKeyWithoutPlaintext/KeySpec")
        }
        {
            $v = "AES_128","AES_256"
            break
        }

        # Amazon.KeyManagementService.EncryptionAlgorithmSpec
        {
            ($_ -eq "Invoke-KMSReEncrypt/DestinationEncryptionAlgorithm") -Or
            ($_ -eq "Invoke-KMSDecrypt/EncryptionAlgorithm") -Or
            ($_ -eq "Invoke-KMSEncrypt/EncryptionAlgorithm") -Or
            ($_ -eq "Invoke-KMSReEncrypt/SourceEncryptionAlgorithm")
        }
        {
            $v = "RSAES_OAEP_SHA_1","RSAES_OAEP_SHA_256","SM2PKE","SYMMETRIC_DEFAULT"
            break
        }

        # Amazon.KeyManagementService.ExpirationModelType
        "Import-KMSKeyMaterial/ExpirationModel"
        {
            $v = "KEY_MATERIAL_DOES_NOT_EXPIRE","KEY_MATERIAL_EXPIRES"
            break
        }

        # Amazon.KeyManagementService.KeyAgreementAlgorithmSpec
        "Get-KMSSharedSecret/KeyAgreementAlgorithm"
        {
            $v = "ECDH"
            break
        }

        # Amazon.KeyManagementService.KeyEncryptionMechanism
        {
            ($_ -eq "Get-KMSSharedSecret/Recipient_KeyEncryptionAlgorithm") -Or
            ($_ -eq "Invoke-KMSDecrypt/Recipient_KeyEncryptionAlgorithm") -Or
            ($_ -eq "New-KMSDataKey/Recipient_KeyEncryptionAlgorithm") -Or
            ($_ -eq "New-KMSDataKeyPair/Recipient_KeyEncryptionAlgorithm") -Or
            ($_ -eq "New-KMSRandom/Recipient_KeyEncryptionAlgorithm")
        }
        {
            $v = "RSAES_OAEP_SHA_256"
            break
        }

        # Amazon.KeyManagementService.KeySpec
        "New-KMSKey/KeySpec"
        {
            $v = "ECC_NIST_P256","ECC_NIST_P384","ECC_NIST_P521","ECC_SECG_P256K1","HMAC_224","HMAC_256","HMAC_384","HMAC_512","RSA_2048","RSA_3072","RSA_4096","SM2","SYMMETRIC_DEFAULT"
            break
        }

        # Amazon.KeyManagementService.KeyUsageType
        "New-KMSKey/KeyUsage"
        {
            $v = "ENCRYPT_DECRYPT","GENERATE_VERIFY_MAC","KEY_AGREEMENT","SIGN_VERIFY"
            break
        }

        # Amazon.KeyManagementService.MacAlgorithmSpec
        {
            ($_ -eq "New-KMSMac/MacAlgorithm") -Or
            ($_ -eq "Test-KMSMac/MacAlgorithm")
        }
        {
            $v = "HMAC_SHA_224","HMAC_SHA_256","HMAC_SHA_384","HMAC_SHA_512"
            break
        }

        # Amazon.KeyManagementService.MessageType
        {
            ($_ -eq "Invoke-KMSSigning/MessageType") -Or
            ($_ -eq "Test-KMSSignature/MessageType")
        }
        {
            $v = "DIGEST","RAW"
            break
        }

        # Amazon.KeyManagementService.OriginType
        "New-KMSKey/Origin"
        {
            $v = "AWS_CLOUDHSM","AWS_KMS","EXTERNAL","EXTERNAL_KEY_STORE"
            break
        }

        # Amazon.KeyManagementService.SigningAlgorithmSpec
        {
            ($_ -eq "Invoke-KMSSigning/SigningAlgorithm") -Or
            ($_ -eq "Test-KMSSignature/SigningAlgorithm")
        }
        {
            $v = "ECDSA_SHA_256","ECDSA_SHA_384","ECDSA_SHA_512","RSASSA_PKCS1_V1_5_SHA_256","RSASSA_PKCS1_V1_5_SHA_384","RSASSA_PKCS1_V1_5_SHA_512","RSASSA_PSS_SHA_256","RSASSA_PSS_SHA_384","RSASSA_PSS_SHA_512","SM2DSA"
            break
        }

        # Amazon.KeyManagementService.WrappingKeySpec
        "Get-KMSParametersForImport/WrappingKeySpec"
        {
            $v = "RSA_2048","RSA_3072","RSA_4096","SM2"
            break
        }

        # Amazon.KeyManagementService.XksProxyConnectivityType
        {
            ($_ -eq "New-KMSCustomKeyStore/XksProxyConnectivity") -Or
            ($_ -eq "Update-KMSCustomKeyStore/XksProxyConnectivity")
        }
        {
            $v = "PUBLIC_ENDPOINT","VPC_ENDPOINT_SERVICE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KMS_map = @{
    "CustomerMasterKeySpec"=@("New-KMSKey")
    "CustomKeyStoreType"=@("New-KMSCustomKeyStore")
    "DestinationEncryptionAlgorithm"=@("Invoke-KMSReEncrypt")
    "EncryptionAlgorithm"=@("Invoke-KMSDecrypt","Invoke-KMSEncrypt")
    "ExpirationModel"=@("Import-KMSKeyMaterial")
    "KeyAgreementAlgorithm"=@("Get-KMSSharedSecret")
    "KeyPairSpec"=@("New-KMSDataKeyPair","New-KMSDataKeyPairWithoutPlaintext")
    "KeySpec"=@("New-KMSDataKey","New-KMSDataKeyWithoutPlaintext","New-KMSKey")
    "KeyUsage"=@("New-KMSKey")
    "MacAlgorithm"=@("New-KMSMac","Test-KMSMac")
    "MessageType"=@("Invoke-KMSSigning","Test-KMSSignature")
    "Origin"=@("New-KMSKey")
    "Recipient_KeyEncryptionAlgorithm"=@("Get-KMSSharedSecret","Invoke-KMSDecrypt","New-KMSDataKey","New-KMSDataKeyPair","New-KMSRandom")
    "SigningAlgorithm"=@("Invoke-KMSSigning","Test-KMSSignature")
    "SourceEncryptionAlgorithm"=@("Invoke-KMSReEncrypt")
    "WrappingAlgorithm"=@("Get-KMSParametersForImport")
    "WrappingKeySpec"=@("Get-KMSParametersForImport")
    "XksProxyConnectivity"=@("New-KMSCustomKeyStore","Update-KMSCustomKeyStore")
}

_awsArgumentCompleterRegistration $KMS_Completers $KMS_map

$KMS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.KMS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$KMS_SelectMap = @{
    "Select"=@("Stop-KMSKeyDeletion",
               "Connect-KMSCustomKeyStore",
               "New-KMSAlias",
               "New-KMSCustomKeyStore",
               "New-KMSGrant",
               "New-KMSKey",
               "Invoke-KMSDecrypt",
               "Remove-KMSAlias",
               "Remove-KMSCustomKeyStore",
               "Remove-KMSImportedKeyMaterial",
               "Get-KMSSharedSecret",
               "Get-KMSCustomKeyStore",
               "Get-KMSKey",
               "Disable-KMSKey",
               "Disable-KMSKeyRotation",
               "Disconnect-KMSCustomKeyStore",
               "Enable-KMSKey",
               "Enable-KMSKeyRotation",
               "Invoke-KMSEncrypt",
               "New-KMSDataKey",
               "New-KMSDataKeyPair",
               "New-KMSDataKeyPairWithoutPlaintext",
               "New-KMSDataKeyWithoutPlaintext",
               "New-KMSMac",
               "New-KMSRandom",
               "Get-KMSKeyPolicy",
               "Get-KMSKeyRotationStatus",
               "Get-KMSParametersForImport",
               "Get-KMSPublicKey",
               "Import-KMSKeyMaterial",
               "Get-KMSAliasList",
               "Get-KMSGrantList",
               "Get-KMSKeyPolicyList",
               "Get-KMSKeyRotation",
               "Get-KMSKeyList",
               "Get-KMSResourceTag",
               "Get-KMSRetirableGrant",
               "Write-KMSKeyPolicy",
               "Invoke-KMSReEncrypt",
               "New-KMSReplicaKey",
               "Disable-KMSGrant",
               "Revoke-KMSGrant",
               "Start-KMSRotateKeyOnDemand",
               "Request-KMSKeyDeletion",
               "Invoke-KMSSigning",
               "Add-KMSResourceTag",
               "Remove-KMSResourceTag",
               "Update-KMSAlias",
               "Update-KMSCustomKeyStore",
               "Update-KMSKeyDescription",
               "Update-KMSPrimaryRegion",
               "Test-KMSSignature",
               "Test-KMSMac")
}

_awsArgumentCompleterRegistration $KMS_SelectCompleters $KMS_SelectMap
# Argument completions for service AWS Lake Formation


$LKF_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.LakeFormation.ApplicationStatus
        "Update-LKFLakeFormationIdentityCenterConfiguration/ApplicationStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.LakeFormation.DataLakeResourceType
        "Get-LKFPermissionList/ResourceType"
        {
            $v = "CATALOG","DATABASE","DATA_LOCATION","LF_TAG","LF_TAG_POLICY","LF_TAG_POLICY_DATABASE","LF_TAG_POLICY_TABLE","TABLE"
            break
        }

        # Amazon.LakeFormation.EnableStatus
        {
            ($_ -eq "New-LKFLakeFormationIdentityCenterConfiguration/ExternalFiltering_Status") -Or
            ($_ -eq "Update-LKFLakeFormationIdentityCenterConfiguration/ExternalFiltering_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.LakeFormation.OptimizerType
        "Get-LKFTableStorageOptimizerList/StorageOptimizerType"
        {
            $v = "ALL","COMPACTION","GARBAGE_COLLECTION"
            break
        }

        # Amazon.LakeFormation.ResourceShareType
        "Get-LKFLFTagList/ResourceShareType"
        {
            $v = "ALL","FOREIGN"
            break
        }

        # Amazon.LakeFormation.ResourceType
        {
            ($_ -eq "Add-LKFLFTagsToResource/LFTagPolicy_ResourceType") -Or
            ($_ -eq "Get-LKFLakeFormationOptInList/LFTagPolicy_ResourceType") -Or
            ($_ -eq "Get-LKFPermissionList/LFTagPolicy_ResourceType") -Or
            ($_ -eq "Get-LKFResourceLFTag/LFTagPolicy_ResourceType") -Or
            ($_ -eq "Grant-LKFPermission/LFTagPolicy_ResourceType") -Or
            ($_ -eq "New-LKFLakeFormationOptIn/LFTagPolicy_ResourceType") -Or
            ($_ -eq "Remove-LKFLakeFormationOptIn/LFTagPolicy_ResourceType") -Or
            ($_ -eq "Remove-LKFLFTagsFromResource/LFTagPolicy_ResourceType") -Or
            ($_ -eq "Revoke-LKFPermission/LFTagPolicy_ResourceType")
        }
        {
            $v = "DATABASE","TABLE"
            break
        }

        # Amazon.LakeFormation.TransactionStatusFilter
        "Get-LKFTransactionList/StatusFilter"
        {
            $v = "ABORTED","ACTIVE","ALL","COMMITTED","COMPLETED"
            break
        }

        # Amazon.LakeFormation.TransactionType
        "Start-LKFTransaction/TransactionType"
        {
            $v = "READ_AND_WRITE","READ_ONLY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LKF_map = @{
    "ApplicationStatus"=@("Update-LKFLakeFormationIdentityCenterConfiguration")
    "ExternalFiltering_Status"=@("New-LKFLakeFormationIdentityCenterConfiguration","Update-LKFLakeFormationIdentityCenterConfiguration")
    "LFTagPolicy_ResourceType"=@("Add-LKFLFTagsToResource","Get-LKFLakeFormationOptInList","Get-LKFPermissionList","Get-LKFResourceLFTag","Grant-LKFPermission","New-LKFLakeFormationOptIn","Remove-LKFLakeFormationOptIn","Remove-LKFLFTagsFromResource","Revoke-LKFPermission")
    "ResourceShareType"=@("Get-LKFLFTagList")
    "ResourceType"=@("Get-LKFPermissionList")
    "StatusFilter"=@("Get-LKFTransactionList")
    "StorageOptimizerType"=@("Get-LKFTableStorageOptimizerList")
    "TransactionType"=@("Start-LKFTransaction")
}

_awsArgumentCompleterRegistration $LKF_Completers $LKF_map

$LKF_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LKF.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LKF_SelectMap = @{
    "Select"=@("Add-LKFLFTagsToResource",
               "Grant-LKFPermissionBatch",
               "Revoke-LKFPermissionBatch",
               "Stop-LKFTransaction",
               "Write-LKFTransaction",
               "New-LKFDataCellsFilter",
               "New-LKFLakeFormationIdentityCenterConfiguration",
               "New-LKFLakeFormationOptIn",
               "New-LKFLFTag",
               "Remove-LKFDataCellsFilter",
               "Remove-LKFLakeFormationIdentityCenterConfiguration",
               "Remove-LKFLakeFormationOptIn",
               "Remove-LKFLFTag",
               "Remove-LKFObjectsOnCancel",
               "Unregister-LKFResource",
               "Get-LKFLakeFormationIdentityCenterConfiguration",
               "Get-LKFResource",
               "Get-LKFTransaction",
               "Invoke-LKFTransaction",
               "Get-LKFDataCellsFilter",
               "Get-LKFDataLakePrincipal",
               "Get-LKFDataLakeSetting",
               "Get-LKFEffectivePermissionsForPath",
               "Get-LKFLFTag",
               "Get-LKFQueryState",
               "Get-LKFQueryStatistic",
               "Get-LKFResourceLFTag",
               "Get-LKFTableObject",
               "Get-LKFTemporaryGluePartitionCredential",
               "Get-LKFTemporaryGlueTableCredential",
               "Get-LKFWorkUnitResult",
               "Get-LKFWorkUnit",
               "Grant-LKFPermission",
               "Get-LKFDataCellsFilterList",
               "Get-LKFLakeFormationOptInList",
               "Get-LKFLFTagList",
               "Get-LKFPermissionList",
               "Get-LKFResourceList",
               "Get-LKFTableStorageOptimizerList",
               "Get-LKFTransactionList",
               "Write-LKFDataLakeSetting",
               "Register-LKFResource",
               "Remove-LKFLFTagsFromResource",
               "Revoke-LKFPermission",
               "Search-LKFDatabasesByLFTag",
               "Search-LKFTablesByLFTag",
               "Start-LKFQueryPlanning",
               "Start-LKFTransaction",
               "Update-LKFDataCellsFilter",
               "Update-LKFLakeFormationIdentityCenterConfiguration",
               "Update-LKFLFTag",
               "Update-LKFResource",
               "Update-LKFTableObject",
               "Update-LKFTableStorageOptimizer")
}

_awsArgumentCompleterRegistration $LKF_SelectCompleters $LKF_SelectMap
# Argument completions for service AWS Lambda


$LM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Lambda.ApplicationLogLevel
        {
            ($_ -eq "Publish-LMFunction/LoggingConfig_ApplicationLogLevel") -Or
            ($_ -eq "Update-LMFunctionConfiguration/LoggingConfig_ApplicationLogLevel")
        }
        {
            $v = "DEBUG","ERROR","FATAL","INFO","TRACE","WARN"
            break
        }

        # Amazon.Lambda.Architecture
        {
            ($_ -eq "Get-LMLayerList/CompatibleArchitecture") -Or
            ($_ -eq "Get-LMLayerVersionList/CompatibleArchitecture")
        }
        {
            $v = "arm64","x86_64"
            break
        }

        # Amazon.Lambda.CodeSigningPolicy
        {
            ($_ -eq "New-LMCodeSigningConfig/CodeSigningPolicies_UntrustedArtifactOnDeployment") -Or
            ($_ -eq "Update-LMCodeSigningConfig/CodeSigningPolicies_UntrustedArtifactOnDeployment")
        }
        {
            $v = "Enforce","Warn"
            break
        }

        # Amazon.Lambda.EventSourcePosition
        "New-LMEventSourceMapping/StartingPosition"
        {
            $v = "AT_TIMESTAMP","LATEST","TRIM_HORIZON"
            break
        }

        # Amazon.Lambda.FullDocument
        {
            ($_ -eq "New-LMEventSourceMapping/DocumentDBEventSourceConfig_FullDocument") -Or
            ($_ -eq "Update-LMEventSourceMapping/DocumentDBEventSourceConfig_FullDocument")
        }
        {
            $v = "Default","UpdateLookup"
            break
        }

        # Amazon.Lambda.FunctionUrlAuthType
        {
            ($_ -eq "New-LMFunctionUrlConfig/AuthType") -Or
            ($_ -eq "Update-LMFunctionUrlConfig/AuthType") -Or
            ($_ -eq "Add-LMPermission/FunctionUrlAuthType")
        }
        {
            $v = "AWS_IAM","NONE"
            break
        }

        # Amazon.Lambda.FunctionVersion
        "Get-LMFunctionList/FunctionVersion"
        {
            $v = "ALL"
            break
        }

        # Amazon.Lambda.InvocationType
        "Invoke-LMFunction/InvocationType"
        {
            $v = "DryRun","Event","RequestResponse"
            break
        }

        # Amazon.Lambda.InvokeMode
        {
            ($_ -eq "New-LMFunctionUrlConfig/InvokeMode") -Or
            ($_ -eq "Update-LMFunctionUrlConfig/InvokeMode")
        }
        {
            $v = "BUFFERED","RESPONSE_STREAM"
            break
        }

        # Amazon.Lambda.LogFormat
        {
            ($_ -eq "Publish-LMFunction/LoggingConfig_LogFormat") -Or
            ($_ -eq "Update-LMFunctionConfiguration/LoggingConfig_LogFormat")
        }
        {
            $v = "JSON","Text"
            break
        }

        # Amazon.Lambda.LogType
        {
            ($_ -eq "Invoke-LMFunction/LogType") -Or
            ($_ -eq "Invoke-LMWithResponseStream/LogType")
        }
        {
            $v = "None","Tail"
            break
        }

        # Amazon.Lambda.PackageType
        "Publish-LMFunction/PackageType"
        {
            $v = "Image","Zip"
            break
        }

        # Amazon.Lambda.RecursiveLoop
        "Write-LMFunctionRecursionConfig/RecursiveLoop"
        {
            $v = "Allow","Terminate"
            break
        }

        # Amazon.Lambda.ResponseStreamingInvocationType
        "Invoke-LMWithResponseStream/InvocationType"
        {
            $v = "DryRun","RequestResponse"
            break
        }

        # Amazon.Lambda.Runtime
        {
            ($_ -eq "Get-LMLayerList/CompatibleRuntime") -Or
            ($_ -eq "Get-LMLayerVersionList/CompatibleRuntime") -Or
            ($_ -eq "Publish-LMFunction/Runtime") -Or
            ($_ -eq "Update-LMFunctionConfiguration/Runtime")
        }
        {
            $v = "dotnet6","dotnet8","dotnetcore1.0","dotnetcore2.0","dotnetcore2.1","dotnetcore3.1","go1.x","java11","java17","java21","java8","java8.al2","nodejs","nodejs10.x","nodejs12.x","nodejs14.x","nodejs16.x","nodejs18.x","nodejs20.x","nodejs4.3","nodejs4.3-edge","nodejs6.10","nodejs8.10","provided","provided.al2","provided.al2023","python2.7","python3.10","python3.11","python3.12","python3.6","python3.7","python3.8","python3.9","ruby2.5","ruby2.7","ruby3.2","ruby3.3"
            break
        }

        # Amazon.Lambda.SnapStartApplyOn
        {
            ($_ -eq "Publish-LMFunction/SnapStart_ApplyOn") -Or
            ($_ -eq "Update-LMFunctionConfiguration/SnapStart_ApplyOn")
        }
        {
            $v = "None","PublishedVersions"
            break
        }

        # Amazon.Lambda.SystemLogLevel
        {
            ($_ -eq "Publish-LMFunction/LoggingConfig_SystemLogLevel") -Or
            ($_ -eq "Update-LMFunctionConfiguration/LoggingConfig_SystemLogLevel")
        }
        {
            $v = "DEBUG","INFO","WARN"
            break
        }

        # Amazon.Lambda.TracingMode
        {
            ($_ -eq "Publish-LMFunction/TracingConfig_Mode") -Or
            ($_ -eq "Update-LMFunctionConfiguration/TracingConfig_Mode")
        }
        {
            $v = "Active","PassThrough"
            break
        }

        # Amazon.Lambda.UpdateRuntimeOn
        "Write-LMRuntimeManagementConfig/UpdateRuntimeOn"
        {
            $v = "Auto","FunctionUpdate","Manual"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LM_map = @{
    "AuthType"=@("New-LMFunctionUrlConfig","Update-LMFunctionUrlConfig")
    "CodeSigningPolicies_UntrustedArtifactOnDeployment"=@("New-LMCodeSigningConfig","Update-LMCodeSigningConfig")
    "CompatibleArchitecture"=@("Get-LMLayerList","Get-LMLayerVersionList")
    "CompatibleRuntime"=@("Get-LMLayerList","Get-LMLayerVersionList")
    "DocumentDBEventSourceConfig_FullDocument"=@("New-LMEventSourceMapping","Update-LMEventSourceMapping")
    "FunctionUrlAuthType"=@("Add-LMPermission")
    "FunctionVersion"=@("Get-LMFunctionList")
    "InvocationType"=@("Invoke-LMFunction","Invoke-LMWithResponseStream")
    "InvokeMode"=@("New-LMFunctionUrlConfig","Update-LMFunctionUrlConfig")
    "LoggingConfig_ApplicationLogLevel"=@("Publish-LMFunction","Update-LMFunctionConfiguration")
    "LoggingConfig_LogFormat"=@("Publish-LMFunction","Update-LMFunctionConfiguration")
    "LoggingConfig_SystemLogLevel"=@("Publish-LMFunction","Update-LMFunctionConfiguration")
    "LogType"=@("Invoke-LMFunction","Invoke-LMWithResponseStream")
    "PackageType"=@("Publish-LMFunction")
    "RecursiveLoop"=@("Write-LMFunctionRecursionConfig")
    "Runtime"=@("Publish-LMFunction","Update-LMFunctionConfiguration")
    "SnapStart_ApplyOn"=@("Publish-LMFunction","Update-LMFunctionConfiguration")
    "StartingPosition"=@("New-LMEventSourceMapping")
    "TracingConfig_Mode"=@("Publish-LMFunction","Update-LMFunctionConfiguration")
    "UpdateRuntimeOn"=@("Write-LMRuntimeManagementConfig")
}

_awsArgumentCompleterRegistration $LM_Completers $LM_map

$LM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LM_SelectMap = @{
    "Select"=@("Add-LMLayerVersionPermission",
               "Add-LMPermission",
               "New-LMAlias",
               "New-LMCodeSigningConfig",
               "New-LMEventSourceMapping",
               "Publish-LMFunction",
               "New-LMFunctionUrlConfig",
               "Remove-LMAlias",
               "Remove-LMCodeSigningConfig",
               "Remove-LMEventSourceMapping",
               "Remove-LMFunction",
               "Remove-LMFunctionCodeSigningConfig",
               "Remove-LMFunctionConcurrency",
               "Remove-LMFunctionEventInvokeConfig",
               "Remove-LMFunctionUrlConfig",
               "Remove-LMLayerVersion",
               "Remove-LMProvisionedConcurrencyConfig",
               "Get-LMAccountSetting",
               "Get-LMAlias",
               "Get-LMCodeSigningConfig",
               "Get-LMEventSourceMapping",
               "Get-LMFunction",
               "Get-LMFunctionCodeSigningConfig",
               "Get-LMFunctionConcurrency",
               "Get-LMFunctionConfiguration",
               "Get-LMFunctionEventInvokeConfig",
               "Get-LMFunctionRecursionConfig",
               "Get-LMFunctionUrlConfig",
               "Get-LMLayerVersion",
               "Get-LMLayerVersionByArn",
               "Get-LMLayerVersionPolicy",
               "Get-LMPolicy",
               "Get-LMProvisionedConcurrencyConfig",
               "Get-LMRuntimeManagementConfig",
               "Invoke-LMFunction",
               "Invoke-LMFunctionAsync",
               "Invoke-LMWithResponseStream",
               "Get-LMAliasList",
               "Get-LMCodeSigningConfigList",
               "Get-LMEventSourceMappingList",
               "Get-LMFunctionEventInvokeConfigList",
               "Get-LMFunctionList",
               "Get-LMFunctionsByCodeSigningConfigList",
               "Get-LMFunctionUrlConfigList",
               "Get-LMLayerList",
               "Get-LMLayerVersionList",
               "Get-LMProvisionedConcurrencyConfigList",
               "Get-LMResourceTag",
               "Get-LMVersionsByFunction",
               "Publish-LMLayerVersion",
               "Publish-LMVersion",
               "Write-LMFunctionCodeSigningConfig",
               "Write-LMFunctionConcurrency",
               "Write-LMFunctionEventInvokeConfig",
               "Write-LMFunctionRecursionConfig",
               "Write-LMProvisionedConcurrencyConfig",
               "Write-LMRuntimeManagementConfig",
               "Remove-LMLayerVersionPermission",
               "Remove-LMPermission",
               "Add-LMResourceTag",
               "Remove-LMResourceTag",
               "Update-LMAlias",
               "Update-LMCodeSigningConfig",
               "Update-LMEventSourceMapping",
               "Update-LMFunctionCode",
               "Update-LMFunctionConfiguration",
               "Update-LMFunctionEventInvokeConfig",
               "Update-LMFunctionUrlConfig")
}

_awsArgumentCompleterRegistration $LM_SelectCompleters $LM_SelectMap
# Argument completions for service AWS Launch Wizard


$LWIZ_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LWIZ.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LWIZ_SelectMap = @{
    "Select"=@("New-LWIZDeployment",
               "Remove-LWIZDeployment",
               "Get-LWIZDeployment",
               "Get-LWIZWorkload",
               "Get-LWIZWorkloadDeploymentPattern",
               "Get-LWIZDeploymentEventList",
               "Get-LWIZDeploymentList",
               "Get-LWIZResourceTag",
               "Get-LWIZWorkloadDeploymentPatternList",
               "Get-LWIZWorkloadList",
               "Add-LWIZResourceTag",
               "Remove-LWIZResourceTag")
}

_awsArgumentCompleterRegistration $LWIZ_SelectCompleters $LWIZ_SelectMap
# Argument completions for service Amazon Lex Model Building Service


$LMB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.LexModelBuildingService.ExportType
        "Get-LMBExport/ExportType"
        {
            $v = "ALEXA_SKILLS_KIT","LEX"
            break
        }

        # Amazon.LexModelBuildingService.FulfillmentActivityType
        "Write-LMBIntent/FulfillmentActivity_Type"
        {
            $v = "CodeHook","ReturnIntent"
            break
        }

        # Amazon.LexModelBuildingService.Locale
        {
            ($_ -eq "Get-LMBBuiltinIntentList/Locale") -Or
            ($_ -eq "Get-LMBBuiltinSlotType/Locale") -Or
            ($_ -eq "Write-LMBBot/Locale")
        }
        {
            $v = "de-DE","en-AU","en-GB","en-IN","en-US","es-419","es-ES","es-US","fr-CA","fr-FR","it-IT","ja-JP","ko-KR"
            break
        }

        # Amazon.LexModelBuildingService.MergeStrategy
        "Start-LMBImport/MergeStrategy"
        {
            $v = "FAIL_ON_CONFLICT","OVERWRITE_LATEST"
            break
        }

        # Amazon.LexModelBuildingService.MigrationSortAttribute
        "Get-LMBMigrationSummaryList/SortByAttribute"
        {
            $v = "MIGRATION_DATE_TIME","V1_BOT_NAME"
            break
        }

        # Amazon.LexModelBuildingService.MigrationStatus
        "Get-LMBMigrationSummaryList/MigrationStatusEqual"
        {
            $v = "COMPLETED","FAILED","IN_PROGRESS"
            break
        }

        # Amazon.LexModelBuildingService.MigrationStrategy
        "Start-LMBMigration/MigrationStrategy"
        {
            $v = "CREATE_NEW","UPDATE_EXISTING"
            break
        }

        # Amazon.LexModelBuildingService.ProcessBehavior
        "Write-LMBBot/ProcessBehavior"
        {
            $v = "BUILD","SAVE"
            break
        }

        # Amazon.LexModelBuildingService.ResourceType
        {
            ($_ -eq "Get-LMBExport/ResourceType") -Or
            ($_ -eq "Start-LMBImport/ResourceType")
        }
        {
            $v = "BOT","INTENT","SLOT_TYPE"
            break
        }

        # Amazon.LexModelBuildingService.SlotValueSelectionStrategy
        "Write-LMBSlotType/ValueSelectionStrategy"
        {
            $v = "ORIGINAL_VALUE","TOP_RESOLUTION"
            break
        }

        # Amazon.LexModelBuildingService.SortOrder
        "Get-LMBMigrationSummaryList/SortByOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.LexModelBuildingService.StatusType
        "Get-LMBUtterancesView/StatusType"
        {
            $v = "Detected","Missed"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LMB_map = @{
    "ExportType"=@("Get-LMBExport")
    "FulfillmentActivity_Type"=@("Write-LMBIntent")
    "Locale"=@("Get-LMBBuiltinIntentList","Get-LMBBuiltinSlotType","Write-LMBBot")
    "MergeStrategy"=@("Start-LMBImport")
    "MigrationStatusEqual"=@("Get-LMBMigrationSummaryList")
    "MigrationStrategy"=@("Start-LMBMigration")
    "ProcessBehavior"=@("Write-LMBBot")
    "ResourceType"=@("Get-LMBExport","Start-LMBImport")
    "SortByAttribute"=@("Get-LMBMigrationSummaryList")
    "SortByOrder"=@("Get-LMBMigrationSummaryList")
    "StatusType"=@("Get-LMBUtterancesView")
    "ValueSelectionStrategy"=@("Write-LMBSlotType")
}

_awsArgumentCompleterRegistration $LMB_Completers $LMB_map

$LMB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LMB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LMB_SelectMap = @{
    "Select"=@("New-LMBBotVersion",
               "New-LMBIntentVersion",
               "New-LMBSlotTypeVersion",
               "Remove-LMBBot",
               "Remove-LMBBotAlias",
               "Remove-LMBBotChannelAssociation",
               "Remove-LMBBotVersion",
               "Remove-LMBIntent",
               "Remove-LMBIntentVersion",
               "Remove-LMBSlotType",
               "Remove-LMBSlotTypeVersion",
               "Remove-LMBUtterance",
               "Get-LMBBot",
               "Get-LMBBotAlias",
               "Get-LMBBotAliasList",
               "Get-LMBBotChannelAssociation",
               "Get-LMBBotChannelAssociationList",
               "Get-LMBBotList",
               "Get-LMBBotVersionList",
               "Get-LMBBuiltinIntent",
               "Get-LMBBuiltinIntentList",
               "Get-LMBBuiltinSlotType",
               "Get-LMBExport",
               "Get-LMBImport",
               "Get-LMBIntent",
               "Get-LMBIntentList",
               "Get-LMBIntentVersion",
               "Get-LMBMigration",
               "Get-LMBMigrationSummaryList",
               "Get-LMBSlotType",
               "Get-LMBSlotTypeList",
               "Get-LMBSlotTypeVersionList",
               "Get-LMBUtterancesView",
               "Get-LMBResourceTag",
               "Write-LMBBot",
               "Write-LMBBotAlias",
               "Write-LMBIntent",
               "Write-LMBSlotType",
               "Start-LMBImport",
               "Start-LMBMigration",
               "Add-LMBResourceTag",
               "Remove-LMBResourceTag")
}

_awsArgumentCompleterRegistration $LMB_SelectCompleters $LMB_SelectMap
# Argument completions for service AWS License Manager


$LICM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.LicenseManager.ActivationOverrideBehavior
        "New-LICMGrantVersion/Options_ActivationOverrideBehavior"
        {
            $v = "ALL_GRANTS_PERMITTED_BY_ISSUER","DISTRIBUTED_GRANTS_ONLY"
            break
        }

        # Amazon.LicenseManager.CheckoutType
        "Invoke-LICMLicenseCheckout/CheckoutType"
        {
            $v = "PERPETUAL","PROVISIONAL"
            break
        }

        # Amazon.LicenseManager.DigitalSignatureMethod
        "Invoke-LICMLicenseCheckoutBorrow/DigitalSignatureMethod"
        {
            $v = "JWT_PS384"
            break
        }

        # Amazon.LicenseManager.GrantStatus
        "New-LICMGrantVersion/Status"
        {
            $v = "ACTIVE","DELETED","DISABLED","FAILED_WORKFLOW","PENDING_ACCEPT","PENDING_DELETE","PENDING_WORKFLOW","REJECTED","WORKFLOW_COMPLETED"
            break
        }

        # Amazon.LicenseManager.LicenseConfigurationStatus
        "Update-LICMLicenseConfiguration/LicenseConfigurationStatus"
        {
            $v = "AVAILABLE","DISABLED"
            break
        }

        # Amazon.LicenseManager.LicenseCountingType
        "New-LICMLicenseConfiguration/LicenseCountingType"
        {
            $v = "Core","Instance","Socket","vCPU"
            break
        }

        # Amazon.LicenseManager.LicenseStatus
        "New-LICMLicenseVersion/Status"
        {
            $v = "AVAILABLE","DEACTIVATED","DELETED","EXPIRED","PENDING_AVAILABLE","PENDING_DELETE","SUSPENDED"
            break
        }

        # Amazon.LicenseManager.RenewType
        {
            ($_ -eq "New-LICMLicense/ConsumptionConfiguration_RenewType") -Or
            ($_ -eq "New-LICMLicenseVersion/ConsumptionConfiguration_RenewType")
        }
        {
            $v = "Monthly","None","Weekly"
            break
        }

        # Amazon.LicenseManager.ReportFrequencyType
        {
            ($_ -eq "New-LICMLicenseManagerReportGenerator/ReportFrequency_Period") -Or
            ($_ -eq "Update-LICMLicenseManagerReportGenerator/ReportFrequency_Period")
        }
        {
            $v = "DAY","MONTH","WEEK"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LICM_map = @{
    "CheckoutType"=@("Invoke-LICMLicenseCheckout")
    "ConsumptionConfiguration_RenewType"=@("New-LICMLicense","New-LICMLicenseVersion")
    "DigitalSignatureMethod"=@("Invoke-LICMLicenseCheckoutBorrow")
    "LicenseConfigurationStatus"=@("Update-LICMLicenseConfiguration")
    "LicenseCountingType"=@("New-LICMLicenseConfiguration")
    "Options_ActivationOverrideBehavior"=@("New-LICMGrantVersion")
    "ReportFrequency_Period"=@("New-LICMLicenseManagerReportGenerator","Update-LICMLicenseManagerReportGenerator")
    "Status"=@("New-LICMGrantVersion","New-LICMLicenseVersion")
}

_awsArgumentCompleterRegistration $LICM_Completers $LICM_map

$LICM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LICM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LICM_SelectMap = @{
    "Select"=@("Approve-LICMGrant",
               "Invoke-LICMLicenseCheckIn",
               "Invoke-LICMLicenseCheckoutBorrow",
               "Invoke-LICMLicenseCheckout",
               "New-LICMGrant",
               "New-LICMGrantVersion",
               "New-LICMLicense",
               "New-LICMLicenseConfiguration",
               "New-LICMLicenseConversionTaskForResource",
               "New-LICMLicenseManagerReportGenerator",
               "New-LICMLicenseVersion",
               "New-LICMToken",
               "Remove-LICMGrant",
               "Remove-LICMLicense",
               "Remove-LICMLicenseConfiguration",
               "Remove-LICMLicenseManagerReportGenerator",
               "Remove-LICMToken",
               "Invoke-LICMExtendLicenseConsumption",
               "Get-LICMAccessToken",
               "Get-LICMGrant",
               "Get-LICMLicense",
               "Get-LICMLicenseConfiguration",
               "Get-LICMLicenseConversionTask",
               "Get-LICMLicenseManagerReportGenerator",
               "Get-LICMLicenseUsage",
               "Get-LICMServiceSetting",
               "Get-LICMAssociationsForLicenseConfigurationList",
               "Get-LICMDistributedGrantList",
               "Get-LICMFailuresForLicenseConfigurationOperationList",
               "Get-LICMLicenseConfigurationList",
               "Get-LICMLicenseConversionTaskList",
               "Get-LICMLicenseManagerReportGeneratorList",
               "Get-LICMLicenseList",
               "Get-LICMLicenseSpecificationsForResourceList",
               "Get-LICMLicenseVersionList",
               "Get-LICMReceivedGrantList",
               "Get-LICMReceivedGrantsForOrganizationList",
               "Get-LICMReceivedLicenseList",
               "Get-LICMReceivedLicensesForOrganizationList",
               "Get-LICMResourceInventoryList",
               "Get-LICMResourceTagList",
               "Get-LICMTokenList",
               "Get-LICMUsageForLicenseConfigurationList",
               "Deny-LICMGrant",
               "Add-LICMResourceTag",
               "Remove-LICMResourceTag",
               "Update-LICMLicenseConfiguration",
               "Update-LICMLicenseManagerReportGenerator",
               "Update-LICMLicenseSpecificationsForResource",
               "Update-LICMServiceSetting")
}

_awsArgumentCompleterRegistration $LICM_SelectCompleters $LICM_SelectMap
# Argument completions for service AWS License Manager - Linux Subscriptions


$LLMS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.LicenseManagerLinuxSubscriptions.LinuxSubscriptionsDiscovery
        "Update-LLMSServiceSetting/LinuxSubscriptionsDiscovery"
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.LicenseManagerLinuxSubscriptions.OrganizationIntegration
        "Update-LLMSServiceSetting/LinuxSubscriptionsDiscoverySettings_OrganizationIntegration"
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.LicenseManagerLinuxSubscriptions.SubscriptionProviderSource
        "Register-LLMSSubscriptionProvider/SubscriptionProviderSource"
        {
            $v = "RedHat"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LLMS_map = @{
    "LinuxSubscriptionsDiscovery"=@("Update-LLMSServiceSetting")
    "LinuxSubscriptionsDiscoverySettings_OrganizationIntegration"=@("Update-LLMSServiceSetting")
    "SubscriptionProviderSource"=@("Register-LLMSSubscriptionProvider")
}

_awsArgumentCompleterRegistration $LLMS_Completers $LLMS_map

$LLMS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LLMS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LLMS_SelectMap = @{
    "Select"=@("Remove-LLMSSubscriptionProvider",
               "Get-LLMSRegisteredSubscriptionProvider",
               "Get-LLMSServiceSetting",
               "Get-LLMSLinuxSubscriptionInstanceList",
               "Get-LLMSLinuxSubscriptionList",
               "Get-LLMSRegisteredSubscriptionProviderList",
               "Get-LLMSResourceTag",
               "Register-LLMSSubscriptionProvider",
               "Add-LLMSResourceTag",
               "Remove-LLMSResourceTag",
               "Update-LLMSServiceSetting")
}

_awsArgumentCompleterRegistration $LLMS_SelectCompleters $LLMS_SelectMap
# Argument completions for service AWS License Manager User Subscription


$LMUS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LMUS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LMUS_SelectMap = @{
    "Select"=@("Add-LMUSUser",
               "Unregister-LMUSIdentityProvider",
               "Remove-LMUSUser",
               "Get-LMUSIdentityProviderList",
               "Get-LMUSInstanceList",
               "Get-LMUSProductSubscriptionList",
               "Get-LMUSUserAssociationList",
               "Register-LMUSIdentityProvider",
               "Start-LMUSProductSubscription",
               "Stop-LMUSProductSubscription",
               "Update-LMUSIdentityProviderSetting")
}

_awsArgumentCompleterRegistration $LMUS_SelectCompleters $LMUS_SelectMap
# Argument completions for service Amazon Lightsail


$LS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Lightsail.AccessType
        "Update-LSBucket/AccessRules_GetObject"
        {
            $v = "private","public"
            break
        }

        # Amazon.Lightsail.AddOnType
        {
            ($_ -eq "Enable-LSAddOn/AddOnRequest_AddOnType") -Or
            ($_ -eq "Disable-LSAddOn/AddOnType")
        }
        {
            $v = "AutoSnapshot","StopInstanceOnIdle"
            break
        }

        # Amazon.Lightsail.AlarmState
        "Test-LSAlarm/State"
        {
            $v = "ALARM","INSUFFICIENT_DATA","OK"
            break
        }

        # Amazon.Lightsail.AppCategory
        {
            ($_ -eq "Get-LSBlueprintList/AppCategory") -Or
            ($_ -eq "Get-LSBundleList/AppCategory")
        }
        {
            $v = "LfR"
            break
        }

        # Amazon.Lightsail.BehaviorEnum
        {
            ($_ -eq "New-LSDistribution/DefaultCacheBehavior_Behavior") -Or
            ($_ -eq "Update-LSDistribution/DefaultCacheBehavior_Behavior")
        }
        {
            $v = "cache","dont-cache"
            break
        }

        # Amazon.Lightsail.BucketMetricName
        "Get-LSBucketMetricData/MetricName"
        {
            $v = "BucketSizeBytes","NumberOfObjects"
            break
        }

        # Amazon.Lightsail.CertificateProvider
        "Set-LSInstanceHttp/CertificateProvider"
        {
            $v = "LetsEncrypt"
            break
        }

        # Amazon.Lightsail.ComparisonOperator
        "Add-LSAlarm/ComparisonOperator"
        {
            $v = "GreaterThanOrEqualToThreshold","GreaterThanThreshold","LessThanOrEqualToThreshold","LessThanThreshold"
            break
        }

        # Amazon.Lightsail.ContactMethodVerificationProtocol
        "Send-LSContactMethodVerification/Protocol"
        {
            $v = "Email"
            break
        }

        # Amazon.Lightsail.ContactProtocol
        {
            ($_ -eq "New-LSContactMethod/Protocol") -Or
            ($_ -eq "Remove-LSContactMethod/Protocol")
        }
        {
            $v = "Email","SMS"
            break
        }

        # Amazon.Lightsail.ContainerServiceMetricName
        "Get-LSContainerServiceMetricData/MetricName"
        {
            $v = "CPUUtilization","MemoryUtilization"
            break
        }

        # Amazon.Lightsail.ContainerServicePowerName
        {
            ($_ -eq "New-LSContainerService/Power") -Or
            ($_ -eq "Update-LSContainerService/Power")
        }
        {
            $v = "large","medium","micro","nano","small","xlarge"
            break
        }

        # Amazon.Lightsail.DistributionMetricName
        "Get-LSDistributionMetricData/MetricName"
        {
            $v = "BytesDownloaded","BytesUploaded","Http4xxErrorRate","Http5xxErrorRate","Requests","TotalErrorRate"
            break
        }

        # Amazon.Lightsail.ForwardValues
        {
            ($_ -eq "New-LSDistribution/ForwardedCookies_Option") -Or
            ($_ -eq "Update-LSDistribution/ForwardedCookies_Option") -Or
            ($_ -eq "New-LSDistribution/ForwardedHeaders_Option") -Or
            ($_ -eq "Update-LSDistribution/ForwardedHeaders_Option")
        }
        {
            $v = "all","allow-list","none"
            break
        }

        # Amazon.Lightsail.HttpEndpoint
        "Update-LSInstanceMetadataOption/HttpEndpoint"
        {
            $v = "disabled","enabled"
            break
        }

        # Amazon.Lightsail.HttpProtocolIpv6
        "Update-LSInstanceMetadataOption/HttpProtocolIpv6"
        {
            $v = "disabled","enabled"
            break
        }

        # Amazon.Lightsail.HttpTokens
        "Update-LSInstanceMetadataOption/HttpToken"
        {
            $v = "optional","required"
            break
        }

        # Amazon.Lightsail.InstanceAccessProtocol
        "Get-LSInstanceAccessDetail/Protocol"
        {
            $v = "rdp","ssh"
            break
        }

        # Amazon.Lightsail.InstanceMetricName
        "Get-LSInstanceMetricData/MetricName"
        {
            $v = "BurstCapacityPercentage","BurstCapacityTime","CPUUtilization","MetadataNoToken","NetworkIn","NetworkOut","StatusCheckFailed","StatusCheckFailed_Instance","StatusCheckFailed_System"
            break
        }

        # Amazon.Lightsail.IpAddressType
        {
            ($_ -eq "New-LSDistribution/IpAddressType") -Or
            ($_ -eq "New-LSInstance/IpAddressType") -Or
            ($_ -eq "New-LSInstancesFromSnapshot/IpAddressType") -Or
            ($_ -eq "New-LSLoadBalancer/IpAddressType") -Or
            ($_ -eq "Set-LSIpAddressType/IpAddressType")
        }
        {
            $v = "dualstack","ipv4","ipv6"
            break
        }

        # Amazon.Lightsail.LoadBalancerAttributeName
        "Update-LSLoadBalancerAttribute/AttributeName"
        {
            $v = "HealthCheckPath","HttpsRedirectionEnabled","SessionStickinessEnabled","SessionStickiness_LB_CookieDurationSeconds","TlsPolicyName"
            break
        }

        # Amazon.Lightsail.LoadBalancerMetricName
        "Get-LSLoadBalancerMetricData/MetricName"
        {
            $v = "ClientTLSNegotiationErrorCount","HealthyHostCount","HTTPCode_Instance_2XX_Count","HTTPCode_Instance_3XX_Count","HTTPCode_Instance_4XX_Count","HTTPCode_Instance_5XX_Count","HTTPCode_LB_4XX_Count","HTTPCode_LB_5XX_Count","InstanceResponseTime","RejectedConnectionCount","RequestCount","UnhealthyHostCount"
            break
        }

        # Amazon.Lightsail.MetricName
        "Add-LSAlarm/MetricName"
        {
            $v = "BurstCapacityPercentage","BurstCapacityTime","ClientTLSNegotiationErrorCount","CPUUtilization","DatabaseConnections","DiskQueueDepth","FreeStorageSpace","HealthyHostCount","HTTPCode_Instance_2XX_Count","HTTPCode_Instance_3XX_Count","HTTPCode_Instance_4XX_Count","HTTPCode_Instance_5XX_Count","HTTPCode_LB_4XX_Count","HTTPCode_LB_5XX_Count","InstanceResponseTime","NetworkIn","NetworkOut","NetworkReceiveThroughput","NetworkTransmitThroughput","RejectedConnectionCount","RequestCount","StatusCheckFailed","StatusCheckFailed_Instance","StatusCheckFailed_System","UnhealthyHostCount"
            break
        }

        # Amazon.Lightsail.MetricUnit
        {
            ($_ -eq "Get-LSBucketMetricData/Unit") -Or
            ($_ -eq "Get-LSDistributionMetricData/Unit") -Or
            ($_ -eq "Get-LSInstanceMetricData/Unit") -Or
            ($_ -eq "Get-LSLoadBalancerMetricData/Unit") -Or
            ($_ -eq "Get-LSRelationalDatabaseMetricData/Unit")
        }
        {
            $v = "Bits","Bits/Second","Bytes","Bytes/Second","Count","Count/Second","Gigabits","Gigabits/Second","Gigabytes","Gigabytes/Second","Kilobits","Kilobits/Second","Kilobytes","Kilobytes/Second","Megabits","Megabits/Second","Megabytes","Megabytes/Second","Microseconds","Milliseconds","None","Percent","Seconds","Terabits","Terabits/Second","Terabytes","Terabytes/Second"
            break
        }

        # Amazon.Lightsail.NetworkProtocol
        {
            ($_ -eq "Close-LSInstancePublicPort/PortInfo_Protocol") -Or
            ($_ -eq "Open-LSInstancePublicPort/PortInfo_Protocol")
        }
        {
            $v = "all","icmp","icmpv6","tcp","udp"
            break
        }

        # Amazon.Lightsail.OriginProtocolPolicyEnum
        {
            ($_ -eq "New-LSDistribution/Origin_ProtocolPolicy") -Or
            ($_ -eq "Update-LSDistribution/Origin_ProtocolPolicy")
        }
        {
            $v = "http-only","https-only"
            break
        }

        # Amazon.Lightsail.RegionName
        {
            ($_ -eq "New-LSDistribution/Origin_RegionName") -Or
            ($_ -eq "Update-LSDistribution/Origin_RegionName") -Or
            ($_ -eq "Copy-LSSnapshot/SourceRegion")
        }
        {
            $v = "ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-west-1","eu-west-2","eu-west-3","us-east-1","us-east-2","us-west-1","us-west-2"
            break
        }

        # Amazon.Lightsail.RelationalDatabaseMetricName
        "Get-LSRelationalDatabaseMetricData/MetricName"
        {
            $v = "CPUUtilization","DatabaseConnections","DiskQueueDepth","FreeStorageSpace","NetworkReceiveThroughput","NetworkTransmitThroughput"
            break
        }

        # Amazon.Lightsail.RelationalDatabasePasswordVersion
        "Get-LSRelationalDatabaseMasterUserPassword/PasswordVersion"
        {
            $v = "CURRENT","PENDING","PREVIOUS"
            break
        }

        # Amazon.Lightsail.ResourceBucketAccess
        "Set-LSResourceAccessForBucket/Access"
        {
            $v = "allow","deny"
            break
        }

        # Amazon.Lightsail.ResourceType
        "Set-LSIpAddressType/ResourceType"
        {
            $v = "Alarm","Bucket","Certificate","CloudFormationStackRecord","ContactMethod","ContainerService","Disk","DiskSnapshot","Distribution","Domain","ExportSnapshotRecord","Instance","InstanceSnapshot","KeyPair","LoadBalancer","LoadBalancerTlsCertificate","PeeredVpc","RelationalDatabase","RelationalDatabaseSnapshot","StaticIp"
            break
        }

        # Amazon.Lightsail.TreatMissingData
        "Add-LSAlarm/TreatMissingData"
        {
            $v = "breaching","ignore","missing","notBreaching"
            break
        }

        # Amazon.Lightsail.ViewerMinimumTlsProtocolVersionEnum
        {
            ($_ -eq "New-LSDistribution/ViewerMinimumTlsProtocolVersion") -Or
            ($_ -eq "Update-LSDistribution/ViewerMinimumTlsProtocolVersion")
        }
        {
            $v = "TLSv1.1_2016","TLSv1.2_2018","TLSv1.2_2019","TLSv1.2_2021"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LS_map = @{
    "Access"=@("Set-LSResourceAccessForBucket")
    "AccessRules_GetObject"=@("Update-LSBucket")
    "AddOnRequest_AddOnType"=@("Enable-LSAddOn")
    "AddOnType"=@("Disable-LSAddOn")
    "AppCategory"=@("Get-LSBlueprintList","Get-LSBundleList")
    "AttributeName"=@("Update-LSLoadBalancerAttribute")
    "CertificateProvider"=@("Set-LSInstanceHttp")
    "ComparisonOperator"=@("Add-LSAlarm")
    "DefaultCacheBehavior_Behavior"=@("New-LSDistribution","Update-LSDistribution")
    "ForwardedCookies_Option"=@("New-LSDistribution","Update-LSDistribution")
    "ForwardedHeaders_Option"=@("New-LSDistribution","Update-LSDistribution")
    "HttpEndpoint"=@("Update-LSInstanceMetadataOption")
    "HttpProtocolIpv6"=@("Update-LSInstanceMetadataOption")
    "HttpToken"=@("Update-LSInstanceMetadataOption")
    "IpAddressType"=@("New-LSDistribution","New-LSInstance","New-LSInstancesFromSnapshot","New-LSLoadBalancer","Set-LSIpAddressType")
    "MetricName"=@("Add-LSAlarm","Get-LSBucketMetricData","Get-LSContainerServiceMetricData","Get-LSDistributionMetricData","Get-LSInstanceMetricData","Get-LSLoadBalancerMetricData","Get-LSRelationalDatabaseMetricData")
    "Origin_ProtocolPolicy"=@("New-LSDistribution","Update-LSDistribution")
    "Origin_RegionName"=@("New-LSDistribution","Update-LSDistribution")
    "PasswordVersion"=@("Get-LSRelationalDatabaseMasterUserPassword")
    "PortInfo_Protocol"=@("Close-LSInstancePublicPort","Open-LSInstancePublicPort")
    "Power"=@("New-LSContainerService","Update-LSContainerService")
    "Protocol"=@("Get-LSInstanceAccessDetail","New-LSContactMethod","Remove-LSContactMethod","Send-LSContactMethodVerification")
    "ResourceType"=@("Set-LSIpAddressType")
    "SourceRegion"=@("Copy-LSSnapshot")
    "State"=@("Test-LSAlarm")
    "TreatMissingData"=@("Add-LSAlarm")
    "Unit"=@("Get-LSBucketMetricData","Get-LSDistributionMetricData","Get-LSInstanceMetricData","Get-LSLoadBalancerMetricData","Get-LSRelationalDatabaseMetricData")
    "ViewerMinimumTlsProtocolVersion"=@("New-LSDistribution","Update-LSDistribution")
}

_awsArgumentCompleterRegistration $LS_Completers $LS_map

$LS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LS_SelectMap = @{
    "Select"=@("New-LSStaticIp",
               "Mount-LSCertificateToDistribution",
               "Add-LSDisk",
               "Add-LSInstancesToLoadBalancer",
               "Add-LSLoadBalancerTlsCertificate",
               "Mount-LSStaticIp",
               "Close-LSInstancePublicPort",
               "Copy-LSSnapshot",
               "New-LSBucket",
               "New-LSBucketAccessKey",
               "New-LSCertificate",
               "New-LSCloudFormationStack",
               "New-LSContactMethod",
               "New-LSContainerService",
               "New-LSContainerServiceDeployment",
               "New-LSContainerServiceRegistryLogin",
               "New-LSDisk",
               "New-LSDiskFromSnapshot",
               "New-LSDiskSnapshot",
               "New-LSDistribution",
               "New-LSDomain",
               "New-LSDomainEntry",
               "New-LSGUISessionAccessDetail",
               "New-LSInstance",
               "New-LSInstancesFromSnapshot",
               "New-LSInstanceSnapshot",
               "New-LSKeyPair",
               "New-LSLoadBalancer",
               "New-LSLoadBalancerTlsCertificate",
               "New-LSRelationalDatabase",
               "New-LSRelationalDatabaseFromSnapshot",
               "New-LSRelationalDatabaseSnapshot",
               "Remove-LSAlarm",
               "Remove-LSAutoSnapshot",
               "Remove-LSBucket",
               "Remove-LSBucketAccessKey",
               "Remove-LSCertificate",
               "Remove-LSContactMethod",
               "Remove-LSContainerImage",
               "Remove-LSContainerService",
               "Remove-LSDisk",
               "Remove-LSDiskSnapshot",
               "Remove-LSDistribution",
               "Remove-LSDomain",
               "Remove-LSDomainEntry",
               "Remove-LSInstance",
               "Remove-LSInstanceSnapshot",
               "Remove-LSKeyPair",
               "Remove-LSKnownHostKey",
               "Remove-LSLoadBalancer",
               "Remove-LSLoadBalancerTlsCertificate",
               "Remove-LSRelationalDatabase",
               "Remove-LSRelationalDatabaseSnapshot",
               "Dismount-LSCertificateFromDistribution",
               "Dismount-LSDisk",
               "Dismount-LSInstancesFromLoadBalancer",
               "Dismount-LSStaticIp",
               "Disable-LSAddOn",
               "Read-LSDefaultKeyPair",
               "Enable-LSAddOn",
               "Export-LSSnapshot",
               "Get-LSActiveNameList",
               "Get-LSAlarm",
               "Get-LSAutoSnapshot",
               "Get-LSBlueprintList",
               "Get-LSBucketAccessKey",
               "Get-LSBucketBundle",
               "Get-LSBucketMetricData",
               "Get-LSBucket",
               "Get-LSBundleList",
               "Get-LSCertificate",
               "Get-LSCloudFormationStackRecord",
               "Get-LSContactMethod",
               "Get-LSContainerAPIMetadata",
               "Get-LSContainerImage",
               "Get-LSContainerLog",
               "Get-LSContainerServiceDeployment",
               "Get-LSContainerServiceMetricData",
               "Get-LSContainerServicePower",
               "Get-LSContainerService",
               "Get-LSCostEstimate",
               "Get-LSDisk",
               "Get-LSDiskList",
               "Get-LSDiskSnapshot",
               "Get-LSDiskSnapshotList",
               "Get-LSDistributionBundle",
               "Get-LSDistributionLatestCacheReset",
               "Get-LSDistributionMetricData",
               "Get-LSDistribution",
               "Get-LSDomain",
               "Get-LSDomainList",
               "Get-LSExportSnapshotRecord",
               "Get-LSInstance",
               "Get-LSInstanceAccessDetail",
               "Get-LSInstanceMetricData",
               "Get-LSInstancePortStateList",
               "Get-LSInstanceList",
               "Get-LSInstanceSnapshot",
               "Get-LSInstanceSnapshotList",
               "Get-LSInstanceState",
               "Get-LSKeyPairInfo",
               "Get-LSKeypairList",
               "Get-LSLoadBalancer",
               "Get-LSLoadBalancerMetricData",
               "Get-LSLoadBalancerList",
               "Get-LSLoadBalancerTlsCertificate",
               "Get-LSLoadBalancerTlsPolicy",
               "Get-LSOperation",
               "Get-LSOperationList",
               "Get-LSOperationListForResource",
               "Get-LSRegionList",
               "Get-LSRelationalDatabase",
               "Get-LSRelationalDatabaseBlueprint",
               "Get-LSRelationalDatabaseBundle",
               "Get-LSRelationalDatabaseEvent",
               "Get-LSRelationalDatabaseLogEvent",
               "Get-LSRelationalDatabaseLogStream",
               "Get-LSRelationalDatabaseMasterUserPassword",
               "Get-LSRelationalDatabaseMetricData",
               "Get-LSRelationalDatabaseParameter",
               "Get-LSRelationalDatabaseList",
               "Get-LSRelationalDatabaseSnapshot",
               "Get-LSRelationalDatabaseSnapshotList",
               "Get-LSSetupHistory",
               "Get-LSStaticIp",
               "Get-LSStaticIpList",
               "Import-LSKeyPair",
               "Test-LSVpcPeered",
               "Open-LSInstancePublicPort",
               "Add-LSPeerVpc",
               "Add-LSAlarm",
               "Set-LSInstancePublicPort",
               "Restart-LSInstance",
               "Restart-LSRelationalDatabase",
               "Register-LSContainerImage",
               "Remove-LSStaticIp",
               "Reset-LSDistributionCache",
               "Send-LSContactMethodVerification",
               "Set-LSIpAddressType",
               "Set-LSResourceAccessForBucket",
               "Set-LSInstanceHttp",
               "Start-LSGUISession",
               "Start-LSInstance",
               "Start-LSRelationalDatabase",
               "Stop-LSGUISession",
               "Stop-LSInstance",
               "Stop-LSRelationalDatabase",
               "Add-LSResourceTag",
               "Test-LSAlarm",
               "Remove-LSPeerVpc",
               "Remove-LSResourceTag",
               "Update-LSBucket",
               "Update-LSBucketBundle",
               "Update-LSContainerService",
               "Update-LSDistribution",
               "Update-LSDistributionBundle",
               "Update-LSDomainEntry",
               "Update-LSInstanceMetadataOption",
               "Update-LSLoadBalancerAttribute",
               "Update-LSRelationalDatabase",
               "Update-LSRelationalDatabaseParameter")
}

_awsArgumentCompleterRegistration $LS_SelectCompleters $LS_SelectMap
# Argument completions for service Amazon Location Service


$LOC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.LocationService.DimensionUnit
        {
            ($_ -eq "Get-LOCRoute/Dimensions_Unit") -Or
            ($_ -eq "Get-LOCRouteMatrix/Dimensions_Unit")
        }
        {
            $v = "Feet","Meters"
            break
        }

        # Amazon.LocationService.DistanceUnit
        {
            ($_ -eq "Get-LOCRoute/DistanceUnit") -Or
            ($_ -eq "Get-LOCRouteMatrix/DistanceUnit") -Or
            ($_ -eq "Invoke-LOCForecastGeofenceEventsOperation/DistanceUnit") -Or
            ($_ -eq "Invoke-LOCVerifyDevicePositionOperation/DistanceUnit")
        }
        {
            $v = "Kilometers","Miles"
            break
        }

        # Amazon.LocationService.IntendedUse
        {
            ($_ -eq "Edit-LOCPlaceIndex/DataSourceConfiguration_IntendedUse") -Or
            ($_ -eq "New-LOCPlaceIndex/DataSourceConfiguration_IntendedUse")
        }
        {
            $v = "SingleUse","Storage"
            break
        }

        # Amazon.LocationService.OptimizationMode
        "Get-LOCRoute/OptimizeFor"
        {
            $v = "FastestRoute","ShortestRoute"
            break
        }

        # Amazon.LocationService.PositionFiltering
        {
            ($_ -eq "Edit-LOCTracker/PositionFiltering") -Or
            ($_ -eq "New-LOCTracker/PositionFiltering")
        }
        {
            $v = "AccuracyBased","DistanceBased","TimeBased"
            break
        }

        # Amazon.LocationService.PricingPlan
        {
            ($_ -eq "Edit-LOCGeofenceCollection/PricingPlan") -Or
            ($_ -eq "Edit-LOCMap/PricingPlan") -Or
            ($_ -eq "Edit-LOCPlaceIndex/PricingPlan") -Or
            ($_ -eq "Edit-LOCRouteCalculator/PricingPlan") -Or
            ($_ -eq "Edit-LOCTracker/PricingPlan") -Or
            ($_ -eq "New-LOCGeofenceCollection/PricingPlan") -Or
            ($_ -eq "New-LOCMap/PricingPlan") -Or
            ($_ -eq "New-LOCPlaceIndex/PricingPlan") -Or
            ($_ -eq "New-LOCRouteCalculator/PricingPlan") -Or
            ($_ -eq "New-LOCTracker/PricingPlan")
        }
        {
            $v = "MobileAssetManagement","MobileAssetTracking","RequestBasedUsage"
            break
        }

        # Amazon.LocationService.SpeedUnit
        "Invoke-LOCForecastGeofenceEventsOperation/SpeedUnit"
        {
            $v = "KilometersPerHour","MilesPerHour"
            break
        }

        # Amazon.LocationService.Status
        "Get-LOCKeyList/Filter_KeyStatus"
        {
            $v = "Active","Expired"
            break
        }

        # Amazon.LocationService.TravelMode
        {
            ($_ -eq "Get-LOCRoute/TravelMode") -Or
            ($_ -eq "Get-LOCRouteMatrix/TravelMode")
        }
        {
            $v = "Bicycle","Car","Motorcycle","Truck","Walking"
            break
        }

        # Amazon.LocationService.VehicleWeightUnit
        {
            ($_ -eq "Get-LOCRoute/Weight_Unit") -Or
            ($_ -eq "Get-LOCRouteMatrix/Weight_Unit")
        }
        {
            $v = "Kilograms","Pounds"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LOC_map = @{
    "DataSourceConfiguration_IntendedUse"=@("Edit-LOCPlaceIndex","New-LOCPlaceIndex")
    "Dimensions_Unit"=@("Get-LOCRoute","Get-LOCRouteMatrix")
    "DistanceUnit"=@("Get-LOCRoute","Get-LOCRouteMatrix","Invoke-LOCForecastGeofenceEventsOperation","Invoke-LOCVerifyDevicePositionOperation")
    "Filter_KeyStatus"=@("Get-LOCKeyList")
    "OptimizeFor"=@("Get-LOCRoute")
    "PositionFiltering"=@("Edit-LOCTracker","New-LOCTracker")
    "PricingPlan"=@("Edit-LOCGeofenceCollection","Edit-LOCMap","Edit-LOCPlaceIndex","Edit-LOCRouteCalculator","Edit-LOCTracker","New-LOCGeofenceCollection","New-LOCMap","New-LOCPlaceIndex","New-LOCRouteCalculator","New-LOCTracker")
    "SpeedUnit"=@("Invoke-LOCForecastGeofenceEventsOperation")
    "TravelMode"=@("Get-LOCRoute","Get-LOCRouteMatrix")
    "Weight_Unit"=@("Get-LOCRoute","Get-LOCRouteMatrix")
}

_awsArgumentCompleterRegistration $LOC_Completers $LOC_map

$LOC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LOC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LOC_SelectMap = @{
    "Select"=@("Register-LOCTrackerConsumer",
               "Remove-LOCDevicePositionHistoryBatch",
               "Remove-LOCGeofenceBatch",
               "Submit-LOCGeofenceEvaluationBatch",
               "Get-LOCDevicePositionBatch",
               "Set-LOCGeofenceBatch",
               "Set-LOCDevicePositionBatch",
               "Get-LOCRoute",
               "Get-LOCRouteMatrix",
               "New-LOCGeofenceCollection",
               "New-LOCKey",
               "New-LOCMap",
               "New-LOCPlaceIndex",
               "New-LOCRouteCalculator",
               "New-LOCTracker",
               "Remove-LOCGeofenceCollection",
               "Remove-LOCKey",
               "Remove-LOCMap",
               "Remove-LOCPlaceIndex",
               "Remove-LOCRouteCalculator",
               "Remove-LOCTracker",
               "Get-LOCGeofenceCollection",
               "Get-LOCKey",
               "Get-LOCMap",
               "Get-LOCPlaceIndex",
               "Get-LOCRouteCalculator",
               "Get-LOCTracker",
               "Unregister-LOCTrackerConsumer",
               "Invoke-LOCForecastGeofenceEventsOperation",
               "Get-LOCDevicePosition",
               "Get-LOCDevicePositionHistory",
               "Get-LOCGeofence",
               "Get-LOCMapGlyph",
               "Get-LOCMapSprite",
               "Get-LOCMapStyleDescriptor",
               "Get-LOCMapTile",
               "Get-LOCPlace",
               "Get-LOCDevicePositionList",
               "Get-LOCGeofenceCollectionList",
               "Get-LOCGeofenceList",
               "Get-LOCKeyList",
               "Get-LOCMapList",
               "Get-LOCPlaceIndexList",
               "Get-LOCRouteCalculatorList",
               "Get-LOCResourceTagSet",
               "Get-LOCTrackerConsumerList",
               "Get-LOCTrackerList",
               "Set-LOCGeofence",
               "Search-LOCPlaceIndexForPosition",
               "Search-LOCPlaceIndexForSuggestion",
               "Search-LOCPlaceIndexForText",
               "Add-LOCResourceTagSet",
               "Remove-LOCResourceTagSet",
               "Edit-LOCGeofenceCollection",
               "Update-LOCKey",
               "Edit-LOCMap",
               "Edit-LOCPlaceIndex",
               "Edit-LOCRouteCalculator",
               "Edit-LOCTracker",
               "Invoke-LOCVerifyDevicePositionOperation")
}

_awsArgumentCompleterRegistration $LOC_SelectCompleters $LOC_SelectMap
# Argument completions for service Amazon CloudWatch Logs


$CWL_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudWatchLogs.Distribution
        "Write-CWLSubscriptionFilter/Distribution"
        {
            $v = "ByLogStream","Random"
            break
        }

        # Amazon.CloudWatchLogs.EvaluationFrequency
        {
            ($_ -eq "New-CWLLogAnomalyDetector/EvaluationFrequency") -Or
            ($_ -eq "Update-CWLLogAnomalyDetector/EvaluationFrequency")
        }
        {
            $v = "FIFTEEN_MIN","FIVE_MIN","ONE_HOUR","ONE_MIN","TEN_MIN","THIRTY_MIN"
            break
        }

        # Amazon.CloudWatchLogs.ExportTaskStatusCode
        "Get-CWLExportTask/StatusCode"
        {
            $v = "CANCELLED","COMPLETED","FAILED","PENDING","PENDING_CANCEL","RUNNING"
            break
        }

        # Amazon.CloudWatchLogs.LogGroupClass
        {
            ($_ -eq "Get-CWLLogGroup/LogGroupClass") -Or
            ($_ -eq "New-CWLLogGroup/LogGroupClass")
        }
        {
            $v = "INFREQUENT_ACCESS","STANDARD"
            break
        }

        # Amazon.CloudWatchLogs.OrderBy
        "Get-CWLLogStream/OrderBy"
        {
            $v = "LastEventTime","LogStreamName"
            break
        }

        # Amazon.CloudWatchLogs.OutputFormat
        "Write-CWLDeliveryDestination/OutputFormat"
        {
            $v = "json","parquet","plain","raw","w3c"
            break
        }

        # Amazon.CloudWatchLogs.PolicyType
        {
            ($_ -eq "Get-CWLAccountPolicy/PolicyType") -Or
            ($_ -eq "Remove-CWLAccountPolicy/PolicyType") -Or
            ($_ -eq "Write-CWLAccountPolicy/PolicyType")
        }
        {
            $v = "DATA_PROTECTION_POLICY","SUBSCRIPTION_FILTER_POLICY"
            break
        }

        # Amazon.CloudWatchLogs.QueryStatus
        "Get-CWLQuery/Status"
        {
            $v = "Cancelled","Complete","Failed","Running","Scheduled","Timeout","Unknown"
            break
        }

        # Amazon.CloudWatchLogs.Scope
        "Write-CWLAccountPolicy/Scope"
        {
            $v = "ALL"
            break
        }

        # Amazon.CloudWatchLogs.SuppressionState
        "Get-CWLAnomalyList/SuppressionState"
        {
            $v = "SUPPRESSED","UNSUPPRESSED"
            break
        }

        # Amazon.CloudWatchLogs.SuppressionType
        "Update-CWLAnomaly/SuppressionType"
        {
            $v = "INFINITE","LIMITED"
            break
        }

        # Amazon.CloudWatchLogs.SuppressionUnit
        "Update-CWLAnomaly/SuppressionPeriod_SuppressionUnit"
        {
            $v = "HOURS","MINUTES","SECONDS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWL_map = @{
    "Distribution"=@("Write-CWLSubscriptionFilter")
    "EvaluationFrequency"=@("New-CWLLogAnomalyDetector","Update-CWLLogAnomalyDetector")
    "LogGroupClass"=@("Get-CWLLogGroup","New-CWLLogGroup")
    "OrderBy"=@("Get-CWLLogStream")
    "OutputFormat"=@("Write-CWLDeliveryDestination")
    "PolicyType"=@("Get-CWLAccountPolicy","Remove-CWLAccountPolicy","Write-CWLAccountPolicy")
    "Scope"=@("Write-CWLAccountPolicy")
    "Status"=@("Get-CWLQuery")
    "StatusCode"=@("Get-CWLExportTask")
    "SuppressionPeriod_SuppressionUnit"=@("Update-CWLAnomaly")
    "SuppressionState"=@("Get-CWLAnomalyList")
    "SuppressionType"=@("Update-CWLAnomaly")
}

_awsArgumentCompleterRegistration $CWL_Completers $CWL_map

$CWL_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CWL.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWL_SelectMap = @{
    "Select"=@("Register-CWLKmsKey",
               "Stop-CWLExportTask",
               "New-CWLDelivery",
               "New-CWLExportTask",
               "New-CWLLogAnomalyDetector",
               "New-CWLLogGroup",
               "New-CWLLogStream",
               "Remove-CWLAccountPolicy",
               "Remove-CWLDataProtectionPolicy",
               "Remove-CWLDelivery",
               "Remove-CWLDeliveryDestination",
               "Remove-CWLDeliveryDestinationPolicy",
               "Remove-CWLDeliverySource",
               "Remove-CWLDestination",
               "Remove-CWLLogAnomalyDetector",
               "Remove-CWLLogGroup",
               "Remove-CWLLogStream",
               "Remove-CWLMetricFilter",
               "Remove-CWLQueryDefinition",
               "Remove-CWLResourcePolicy",
               "Remove-CWLRetentionPolicy",
               "Remove-CWLSubscriptionFilter",
               "Get-CWLAccountPolicy",
               "Find-CWLConfigurationTemplate",
               "Find-CWLDelivery",
               "Find-CWLDeliveryDestination",
               "Find-CWLDeliverySource",
               "Get-CWLDestination",
               "Get-CWLExportTask",
               "Get-CWLLogGroup",
               "Get-CWLLogStream",
               "Get-CWLMetricFilter",
               "Get-CWLQuery",
               "Get-CWLQueryDefinition",
               "Get-CWLResourcePolicy",
               "Get-CWLSubscriptionFilter",
               "Unregister-CWLKmsKey",
               "Get-CWLFilteredLogEvent",
               "Get-CWLDataProtectionPolicy",
               "Get-CWLDelivery",
               "Get-CWLDeliveryDestination",
               "Get-CWLDeliveryDestinationPolicy",
               "Get-CWLDeliverySource",
               "Get-CWLLogAnomalyDetector",
               "Get-CWLLogEvent",
               "Get-CWLLogGroupField",
               "Get-CWLLogRecord",
               "Get-CWLQueryResult",
               "Get-CWLAnomalyList",
               "Get-CWLLogAnomalyDetectorList",
               "Get-CWLResourceTag",
               "Get-CWLLogGroupTag",
               "Write-CWLAccountPolicy",
               "Write-CWLDataProtectionPolicy",
               "Write-CWLDeliveryDestination",
               "Write-CWLDeliveryDestinationPolicy",
               "Write-CWLDeliverySource",
               "Write-CWLDestination",
               "Write-CWLDestinationPolicy",
               "Write-CWLLogEvent",
               "Write-CWLMetricFilter",
               "Write-CWLQueryDefinition",
               "Write-CWLResourcePolicy",
               "Write-CWLRetentionPolicy",
               "Write-CWLSubscriptionFilter",
               "Start-CWLLiveTail",
               "Start-CWLQuery",
               "Stop-CWLQuery",
               "Add-CWLLogGroupTag",
               "Add-CWLResourceTag",
               "Test-CWLMetricFilter",
               "Remove-CWLLogGroupTag",
               "Remove-CWLResourceTag",
               "Update-CWLAnomaly",
               "Update-CWLDeliveryConfiguration",
               "Update-CWLLogAnomalyDetector")
}

_awsArgumentCompleterRegistration $CWL_SelectCompleters $CWL_SelectMap
# Argument completions for service Amazon Lookout for Equipment


$L4E_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.LookoutEquipment.DataUploadFrequency
        {
            ($_ -eq "New-L4EInferenceScheduler/DataUploadFrequency") -Or
            ($_ -eq "Update-L4EInferenceScheduler/DataUploadFrequency")
        }
        {
            $v = "PT10M","PT15M","PT1H","PT30M","PT5M"
            break
        }

        # Amazon.LookoutEquipment.InferenceDataImportStrategy
        "Import-L4EModelVersion/InferenceDataImportStrategy"
        {
            $v = "ADD_WHEN_EMPTY","NO_IMPORT","OVERWRITE"
            break
        }

        # Amazon.LookoutEquipment.InferenceExecutionStatus
        "Get-L4EInferenceExecutionList/Status"
        {
            $v = "FAILED","IN_PROGRESS","SUCCESS"
            break
        }

        # Amazon.LookoutEquipment.InferenceSchedulerStatus
        "Get-L4EInferenceSchedulerList/Status"
        {
            $v = "PENDING","RUNNING","STOPPED","STOPPING"
            break
        }

        # Amazon.LookoutEquipment.IngestionJobStatus
        "Get-L4EDataIngestionJobList/Status"
        {
            $v = "FAILED","IMPORT_IN_PROGRESS","IN_PROGRESS","SUCCESS"
            break
        }

        # Amazon.LookoutEquipment.LabelRating
        "New-L4ELabel/Rating"
        {
            $v = "ANOMALY","NEUTRAL","NO_ANOMALY"
            break
        }

        # Amazon.LookoutEquipment.ModelPromoteMode
        {
            ($_ -eq "New-L4ERetrainingScheduler/PromoteMode") -Or
            ($_ -eq "Update-L4ERetrainingScheduler/PromoteMode")
        }
        {
            $v = "MANAGED","MANUAL"
            break
        }

        # Amazon.LookoutEquipment.ModelStatus
        "Get-L4EModelList/Status"
        {
            $v = "FAILED","IMPORT_IN_PROGRESS","IN_PROGRESS","SUCCESS"
            break
        }

        # Amazon.LookoutEquipment.ModelVersionSourceType
        "Get-L4EModelVersionList/SourceType"
        {
            $v = "IMPORT","RETRAINING","TRAINING"
            break
        }

        # Amazon.LookoutEquipment.ModelVersionStatus
        "Get-L4EModelVersionList/Status"
        {
            $v = "CANCELED","FAILED","IMPORT_IN_PROGRESS","IN_PROGRESS","SUCCESS"
            break
        }

        # Amazon.LookoutEquipment.RetrainingSchedulerStatus
        "Get-L4ERetrainingSchedulerList/Status"
        {
            $v = "PENDING","RUNNING","STOPPED","STOPPING"
            break
        }

        # Amazon.LookoutEquipment.TargetSamplingRate
        "New-L4EModel/DataPreProcessingConfiguration_TargetSamplingRate"
        {
            $v = "PT10M","PT10S","PT15M","PT15S","PT1H","PT1M","PT1S","PT30M","PT30S","PT5M","PT5S"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$L4E_map = @{
    "DataPreProcessingConfiguration_TargetSamplingRate"=@("New-L4EModel")
    "DataUploadFrequency"=@("New-L4EInferenceScheduler","Update-L4EInferenceScheduler")
    "InferenceDataImportStrategy"=@("Import-L4EModelVersion")
    "PromoteMode"=@("New-L4ERetrainingScheduler","Update-L4ERetrainingScheduler")
    "Rating"=@("New-L4ELabel")
    "SourceType"=@("Get-L4EModelVersionList")
    "Status"=@("Get-L4EDataIngestionJobList","Get-L4EInferenceExecutionList","Get-L4EInferenceSchedulerList","Get-L4EModelList","Get-L4EModelVersionList","Get-L4ERetrainingSchedulerList")
}

_awsArgumentCompleterRegistration $L4E_Completers $L4E_map

$L4E_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.L4E.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$L4E_SelectMap = @{
    "Select"=@("New-L4EDataset",
               "New-L4EInferenceScheduler",
               "New-L4ELabel",
               "New-L4ELabelGroup",
               "New-L4EModel",
               "New-L4ERetrainingScheduler",
               "Remove-L4EDataset",
               "Remove-L4EInferenceScheduler",
               "Remove-L4ELabel",
               "Remove-L4ELabelGroup",
               "Remove-L4EModel",
               "Remove-L4EResourcePolicy",
               "Remove-L4ERetrainingScheduler",
               "Get-L4EDataIngestionJob",
               "Get-L4EDataset",
               "Get-L4EInferenceScheduler",
               "Get-L4ELabel",
               "Get-L4ELabelGroup",
               "Get-L4EModel",
               "Get-L4EModelVersion",
               "Get-L4EResourcePolicy",
               "Get-L4ERetrainingScheduler",
               "Import-L4EDataset",
               "Import-L4EModelVersion",
               "Get-L4EDataIngestionJobList",
               "Get-L4EDatasetList",
               "Get-L4EInferenceEventList",
               "Get-L4EInferenceExecutionList",
               "Get-L4EInferenceSchedulerList",
               "Get-L4ELabelGroupList",
               "Get-L4ELabelList",
               "Get-L4EModelList",
               "Get-L4EModelVersionList",
               "Get-L4ERetrainingSchedulerList",
               "Get-L4ESensorStatisticList",
               "Get-L4EResourceTag",
               "Write-L4EResourcePolicy",
               "Start-L4EDataIngestionJob",
               "Start-L4EInferenceScheduler",
               "Start-L4ERetrainingScheduler",
               "Stop-L4EInferenceScheduler",
               "Stop-L4ERetrainingScheduler",
               "Add-L4EResourceTag",
               "Remove-L4EResourceTag",
               "Update-L4EActiveModelVersion",
               "Update-L4EInferenceScheduler",
               "Update-L4ELabelGroup",
               "Update-L4EModel",
               "Update-L4ERetrainingScheduler")
}

_awsArgumentCompleterRegistration $L4E_SelectCompleters $L4E_SelectMap
# Argument completions for service Amazon Lookout for Metrics


$LOM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.LookoutMetrics.CSVFileCompression
        {
            ($_ -eq "Get-LOMSampleData/CsvFormatDescriptor_FileCompression") -Or
            ($_ -eq "New-LOMMetricSet/CsvFormatDescriptor_FileCompression") -Or
            ($_ -eq "Update-LOMMetricSet/CsvFormatDescriptor_FileCompression")
        }
        {
            $v = "GZIP","NONE"
            break
        }

        # Amazon.LookoutMetrics.Frequency
        {
            ($_ -eq "New-LOMAnomalyDetector/AnomalyDetectorConfig_AnomalyDetectorFrequency") -Or
            ($_ -eq "Update-LOMAnomalyDetector/AnomalyDetectorConfig_AnomalyDetectorFrequency") -Or
            ($_ -eq "New-LOMMetricSet/MetricSetFrequency") -Or
            ($_ -eq "Update-LOMMetricSet/MetricSetFrequency")
        }
        {
            $v = "P1D","PT10M","PT1H","PT5M"
            break
        }

        # Amazon.LookoutMetrics.JsonFileCompression
        {
            ($_ -eq "Get-LOMSampleData/JsonFormatDescriptor_FileCompression") -Or
            ($_ -eq "New-LOMMetricSet/JsonFormatDescriptor_FileCompression") -Or
            ($_ -eq "Update-LOMMetricSet/JsonFormatDescriptor_FileCompression")
        }
        {
            $v = "GZIP","NONE"
            break
        }

        # Amazon.LookoutMetrics.RelationshipType
        "Get-LOMAnomalyGroupRelatedMetricList/RelationshipTypeFilter"
        {
            $v = "CAUSE_OF_INPUT_ANOMALY_GROUP","EFFECT_OF_INPUT_ANOMALY_GROUP"
            break
        }

        # Amazon.LookoutMetrics.SnsFormat
        {
            ($_ -eq "New-LOMAlert/SNSConfiguration_SnsFormat") -Or
            ($_ -eq "Update-LOMAlert/SNSConfiguration_SnsFormat")
        }
        {
            $v = "JSON","LONG_TEXT","SHORT_TEXT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LOM_map = @{
    "AnomalyDetectorConfig_AnomalyDetectorFrequency"=@("New-LOMAnomalyDetector","Update-LOMAnomalyDetector")
    "CsvFormatDescriptor_FileCompression"=@("Get-LOMSampleData","New-LOMMetricSet","Update-LOMMetricSet")
    "JsonFormatDescriptor_FileCompression"=@("Get-LOMSampleData","New-LOMMetricSet","Update-LOMMetricSet")
    "MetricSetFrequency"=@("New-LOMMetricSet","Update-LOMMetricSet")
    "RelationshipTypeFilter"=@("Get-LOMAnomalyGroupRelatedMetricList")
    "SNSConfiguration_SnsFormat"=@("New-LOMAlert","Update-LOMAlert")
}

_awsArgumentCompleterRegistration $LOM_Completers $LOM_map

$LOM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LOM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LOM_SelectMap = @{
    "Select"=@("Enable-LOMAnomalyDetector",
               "Enable-LOMBackTestAnomalyDetector",
               "New-LOMAlert",
               "New-LOMAnomalyDetector",
               "New-LOMMetricSet",
               "Disable-LOMAnomalyDetector",
               "Remove-LOMAlert",
               "Remove-LOMAnomalyDetector",
               "Get-LOMAlert",
               "Get-LOMAnomalyDetectionExecution",
               "Get-LOMAnomalyDetector",
               "Get-LOMMetricSet",
               "Get-LOMMetricSetConfig",
               "Get-LOMAnomalyGroup",
               "Get-LOMDataQualityMetricList",
               "Get-LOMFeedback",
               "Get-LOMSampleData",
               "Get-LOMAlertList",
               "Get-LOMAnomalyDetectorList",
               "Get-LOMAnomalyGroupRelatedMetricList",
               "Get-LOMAnomalyGroupSummaryList",
               "Get-LOMAnomalyGroupTimeSeriesList",
               "Get-LOMMetricSetList",
               "Get-LOMResourceTag",
               "Write-LOMFeedback",
               "Add-LOMResourceTag",
               "Remove-LOMResourceTag",
               "Update-LOMAlert",
               "Update-LOMAnomalyDetector",
               "Update-LOMMetricSet")
}

_awsArgumentCompleterRegistration $LOM_SelectCompleters $LOM_SelectMap
# Argument completions for service Amazon Lookout for Vision


$LFV_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.LookoutforVision.TargetDevice
        "Start-LFVModelPackagingJob/Greengrass_TargetDevice"
        {
            $v = "jetson_xavier"
            break
        }

        # Amazon.LookoutforVision.TargetPlatformAccelerator
        "Start-LFVModelPackagingJob/TargetPlatform_Accelerator"
        {
            $v = "NVIDIA"
            break
        }

        # Amazon.LookoutforVision.TargetPlatformArch
        "Start-LFVModelPackagingJob/TargetPlatform_Arch"
        {
            $v = "ARM64","X86_64"
            break
        }

        # Amazon.LookoutforVision.TargetPlatformOs
        "Start-LFVModelPackagingJob/TargetPlatform_Os"
        {
            $v = "LINUX"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LFV_map = @{
    "Greengrass_TargetDevice"=@("Start-LFVModelPackagingJob")
    "TargetPlatform_Accelerator"=@("Start-LFVModelPackagingJob")
    "TargetPlatform_Arch"=@("Start-LFVModelPackagingJob")
    "TargetPlatform_Os"=@("Start-LFVModelPackagingJob")
}

_awsArgumentCompleterRegistration $LFV_Completers $LFV_map

$LFV_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LFV.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LFV_SelectMap = @{
    "Select"=@("New-LFVDataset",
               "New-LFVModel",
               "New-LFVProject",
               "Remove-LFVDataset",
               "Remove-LFVModel",
               "Remove-LFVProject",
               "Get-LFVDataset",
               "Get-LFVModel",
               "Get-LFVModelPackagingJob",
               "Get-LFVProject",
               "Find-LFVAnomaly",
               "Get-LFVDatasetEntryList",
               "Get-LFVModelPackagingJobList",
               "Get-LFVModelList",
               "Get-LFVProjectList",
               "Get-LFVResourceTag",
               "Start-LFVModel",
               "Start-LFVModelPackagingJob",
               "Stop-LFVModel",
               "Add-LFVResourceTag",
               "Remove-LFVResourceTag",
               "Update-LFVDatasetEntry")
}

_awsArgumentCompleterRegistration $LFV_SelectCompleters $LFV_SelectMap
# Argument completions for service M2


$AMM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MainframeModernization.BatchJobExecutionStatus
        "Get-AMMBatchJobExecutionList/Status"
        {
            $v = "Cancelled","Cancelling","Dispatching","Failed","Holding","Purged","Running","Submitting","Succeeded","Succeeded With Warning"
            break
        }

        # Amazon.MainframeModernization.EngineType
        {
            ($_ -eq "Get-AMMEngineVersionList/EngineType") -Or
            ($_ -eq "Get-AMMEnvironmentList/EngineType") -Or
            ($_ -eq "New-AMMApplication/EngineType") -Or
            ($_ -eq "New-AMMEnvironment/EngineType")
        }
        {
            $v = "bluage","microfocus"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AMM_map = @{
    "EngineType"=@("Get-AMMEngineVersionList","Get-AMMEnvironmentList","New-AMMApplication","New-AMMEnvironment")
    "Status"=@("Get-AMMBatchJobExecutionList")
}

_awsArgumentCompleterRegistration $AMM_Completers $AMM_map

$AMM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AMM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AMM_SelectMap = @{
    "Select"=@("Stop-AMMBatchJobExecution",
               "New-AMMApplication",
               "New-AMMDataSetImportTask",
               "New-AMMDeployment",
               "New-AMMEnvironment",
               "Remove-AMMApplication",
               "Remove-AMMApplicationFromEnvironment",
               "Remove-AMMEnvironment",
               "Get-AMMApplication",
               "Get-AMMApplicationVersion",
               "Get-AMMBatchJobExecution",
               "Get-AMMDataSetDetail",
               "Get-AMMDataSetImportTask",
               "Get-AMMDeployment",
               "Get-AMMEnvironment",
               "Get-AMMSignedBluinsightsUrl",
               "Get-AMMApplicationList",
               "Get-AMMApplicationVersionList",
               "Get-AMMBatchJobDefinitionList",
               "Get-AMMBatchJobExecutionList",
               "Get-AMMBatchJobRestartPointList",
               "Get-AMMDataSetImportHistoryList",
               "Get-AMMDataSetList",
               "Get-AMMDeploymentList",
               "Get-AMMEngineVersionList",
               "Get-AMMEnvironmentList",
               "Get-AMMResourceTag",
               "Start-AMMApplication",
               "Start-AMMBatchJob",
               "Stop-AMMApplication",
               "Add-AMMResourceTag",
               "Remove-AMMResourceTag",
               "Update-AMMApplication",
               "Update-AMMEnvironment")
}

_awsArgumentCompleterRegistration $AMM_SelectCompleters $AMM_SelectMap
# Argument completions for service Amazon Machine Learning


$ML_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MachineLearning.BatchPredictionFilterVariable
        "Get-MLBatchPredictionList/FilterVariable"
        {
            $v = "CreatedAt","DataSourceId","DataURI","IAMUser","LastUpdatedAt","MLModelId","Name","Status"
            break
        }

        # Amazon.MachineLearning.DataSourceFilterVariable
        "Get-MLDataSourceList/FilterVariable"
        {
            $v = "CreatedAt","DataLocationS3","IAMUser","LastUpdatedAt","Name","Status"
            break
        }

        # Amazon.MachineLearning.EvaluationFilterVariable
        "Get-MLEvaluationList/FilterVariable"
        {
            $v = "CreatedAt","DataSourceId","DataURI","IAMUser","LastUpdatedAt","MLModelId","Name","Status"
            break
        }

        # Amazon.MachineLearning.MLModelFilterVariable
        "Get-MLModelList/FilterVariable"
        {
            $v = "Algorithm","CreatedAt","IAMUser","LastUpdatedAt","MLModelType","Name","RealtimeEndpointStatus","Status","TrainingDataSourceId","TrainingDataURI"
            break
        }

        # Amazon.MachineLearning.MLModelType
        "New-MLModel/MLModelType"
        {
            $v = "BINARY","MULTICLASS","REGRESSION"
            break
        }

        # Amazon.MachineLearning.SortOrder
        {
            ($_ -eq "Get-MLBatchPredictionList/SortOrder") -Or
            ($_ -eq "Get-MLDataSourceList/SortOrder") -Or
            ($_ -eq "Get-MLEvaluationList/SortOrder") -Or
            ($_ -eq "Get-MLModelList/SortOrder")
        }
        {
            $v = "asc","dsc"
            break
        }

        # Amazon.MachineLearning.TaggableResourceType
        {
            ($_ -eq "Add-MLResourceTag/ResourceType") -Or
            ($_ -eq "Get-MLResourceTag/ResourceType") -Or
            ($_ -eq "Remove-MLResourceTag/ResourceType")
        }
        {
            $v = "BatchPrediction","DataSource","Evaluation","MLModel"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ML_map = @{
    "FilterVariable"=@("Get-MLBatchPredictionList","Get-MLDataSourceList","Get-MLEvaluationList","Get-MLModelList")
    "MLModelType"=@("New-MLModel")
    "ResourceType"=@("Add-MLResourceTag","Get-MLResourceTag","Remove-MLResourceTag")
    "SortOrder"=@("Get-MLBatchPredictionList","Get-MLDataSourceList","Get-MLEvaluationList","Get-MLModelList")
}

_awsArgumentCompleterRegistration $ML_Completers $ML_map

$ML_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ML.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ML_SelectMap = @{
    "Select"=@("Add-MLResourceTag",
               "New-MLBatchPrediction",
               "New-MLDataSourceFromRDS",
               "New-MLDataSourceFromRedshift",
               "New-MLDataSourceFromS3",
               "New-MLEvaluation",
               "New-MLModel",
               "New-MLRealtimeEndpoint",
               "Remove-MLBatchPrediction",
               "Remove-MLDataSource",
               "Remove-MLEvaluation",
               "Remove-MLModel",
               "Remove-MLRealtimeEndpoint",
               "Remove-MLResourceTag",
               "Get-MLBatchPredictionList",
               "Get-MLDataSourceList",
               "Get-MLEvaluationList",
               "Get-MLModelList",
               "Get-MLResourceTag",
               "Get-MLBatchPrediction",
               "Get-MLDataSource",
               "Get-MLEvaluation",
               "Get-MLModel",
               "Get-MLPrediction",
               "Update-MLBatchPrediction",
               "Update-MLDataSource",
               "Update-MLEvaluation",
               "Update-MLMLModel")
}

_awsArgumentCompleterRegistration $ML_SelectCompleters $ML_SelectMap
# Argument completions for service Amazon Macie 2


$MAC2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Macie2.AutoEnableMode
        "Update-MAC2AutomatedDiscoveryConfiguration/AutoEnableOrganizationMember"
        {
            $v = "ALL","NEW","NONE"
            break
        }

        # Amazon.Macie2.AutomatedDiscoveryStatus
        "Update-MAC2AutomatedDiscoveryConfiguration/Status"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Macie2.ClassificationScopeUpdateOperation
        "Update-MAC2ClassificationScope/Excludes_Operation"
        {
            $v = "ADD","REMOVE","REPLACE"
            break
        }

        # Amazon.Macie2.DayOfWeek
        "New-MAC2ClassificationJob/WeeklySchedule_DayOfWeek"
        {
            $v = "FRIDAY","MONDAY","SATURDAY","SUNDAY","THURSDAY","TUESDAY","WEDNESDAY"
            break
        }

        # Amazon.Macie2.FindingPublishingFrequency
        {
            ($_ -eq "Enable-MAC2Macie/FindingPublishingFrequency") -Or
            ($_ -eq "Update-MAC2MacieSession/FindingPublishingFrequency")
        }
        {
            $v = "FIFTEEN_MINUTES","ONE_HOUR","SIX_HOURS"
            break
        }

        # Amazon.Macie2.FindingsFilterAction
        {
            ($_ -eq "New-MAC2FindingsFilter/Action") -Or
            ($_ -eq "Update-MAC2FindingsFilter/Action")
        }
        {
            $v = "ARCHIVE","NOOP"
            break
        }

        # Amazon.Macie2.FindingStatisticsSortAttributeName
        "Get-MAC2FindingStatistic/SortCriteria_AttributeName"
        {
            $v = "count","groupKey"
            break
        }

        # Amazon.Macie2.GroupBy
        "Get-MAC2FindingStatistic/GroupBy"
        {
            $v = "classificationDetails.jobId","resourcesAffected.s3Bucket.name","severity.description","type"
            break
        }

        # Amazon.Macie2.JobStatus
        "Update-MAC2ClassificationJob/JobStatus"
        {
            $v = "CANCELLED","COMPLETE","IDLE","PAUSED","RUNNING","USER_PAUSED"
            break
        }

        # Amazon.Macie2.JobType
        "New-MAC2ClassificationJob/JobType"
        {
            $v = "ONE_TIME","SCHEDULED"
            break
        }

        # Amazon.Macie2.ListJobsSortAttributeName
        "Get-MAC2ClassificationJobList/SortCriteria_AttributeName"
        {
            $v = "createdAt","jobStatus","jobType","name"
            break
        }

        # Amazon.Macie2.MacieStatus
        {
            ($_ -eq "Enable-MAC2Macie/Status") -Or
            ($_ -eq "Update-MAC2MacieSession/Status") -Or
            ($_ -eq "Update-MAC2MemberSession/Status")
        }
        {
            $v = "ENABLED","PAUSED"
            break
        }

        # Amazon.Macie2.ManagedDataIdentifierSelector
        "New-MAC2ClassificationJob/ManagedDataIdentifierSelector"
        {
            $v = "ALL","EXCLUDE","INCLUDE","NONE","RECOMMENDED"
            break
        }

        # Amazon.Macie2.OrderBy
        {
            ($_ -eq "Get-MAC2UsageStatistic/SortBy_OrderBy") -Or
            ($_ -eq "Get-MAC2Bucket/SortCriteria_OrderBy") -Or
            ($_ -eq "Get-MAC2ClassificationJobList/SortCriteria_OrderBy") -Or
            ($_ -eq "Get-MAC2Finding/SortCriteria_OrderBy") -Or
            ($_ -eq "Get-MAC2FindingList/SortCriteria_OrderBy") -Or
            ($_ -eq "Get-MAC2FindingStatistic/SortCriteria_OrderBy") -Or
            ($_ -eq "Search-MAC2Resource/SortCriteria_OrderBy")
        }
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.Macie2.RetrievalMode
        "Update-MAC2RevealConfiguration/RetrievalConfiguration_RetrievalMode"
        {
            $v = "ASSUME_ROLE","CALLER_CREDENTIALS"
            break
        }

        # Amazon.Macie2.RevealStatus
        "Update-MAC2RevealConfiguration/Configuration_Status"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Macie2.SearchResourcesSortAttributeName
        "Search-MAC2Resource/SortCriteria_AttributeName"
        {
            $v = "ACCOUNT_ID","RESOURCE_NAME","S3_CLASSIFIABLE_OBJECT_COUNT","S3_CLASSIFIABLE_SIZE_IN_BYTES"
            break
        }

        # Amazon.Macie2.TimeRange
        "Get-MAC2UsageStatistic/TimeRange"
        {
            $v = "MONTH_TO_DATE","PAST_30_DAYS"
            break
        }

        # Amazon.Macie2.UsageStatisticsSortKey
        "Get-MAC2UsageStatistic/SortBy_Key"
        {
            $v = "accountId","freeTrialStartDate","serviceLimitValue","total"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MAC2_map = @{
    "Action"=@("New-MAC2FindingsFilter","Update-MAC2FindingsFilter")
    "AutoEnableOrganizationMember"=@("Update-MAC2AutomatedDiscoveryConfiguration")
    "Configuration_Status"=@("Update-MAC2RevealConfiguration")
    "Excludes_Operation"=@("Update-MAC2ClassificationScope")
    "FindingPublishingFrequency"=@("Enable-MAC2Macie","Update-MAC2MacieSession")
    "GroupBy"=@("Get-MAC2FindingStatistic")
    "JobStatus"=@("Update-MAC2ClassificationJob")
    "JobType"=@("New-MAC2ClassificationJob")
    "ManagedDataIdentifierSelector"=@("New-MAC2ClassificationJob")
    "RetrievalConfiguration_RetrievalMode"=@("Update-MAC2RevealConfiguration")
    "SortBy_Key"=@("Get-MAC2UsageStatistic")
    "SortBy_OrderBy"=@("Get-MAC2UsageStatistic")
    "SortCriteria_AttributeName"=@("Get-MAC2ClassificationJobList","Get-MAC2FindingStatistic","Search-MAC2Resource")
    "SortCriteria_OrderBy"=@("Get-MAC2Bucket","Get-MAC2ClassificationJobList","Get-MAC2Finding","Get-MAC2FindingList","Get-MAC2FindingStatistic","Search-MAC2Resource")
    "Status"=@("Enable-MAC2Macie","Update-MAC2AutomatedDiscoveryConfiguration","Update-MAC2MacieSession","Update-MAC2MemberSession")
    "TimeRange"=@("Get-MAC2UsageStatistic")
    "WeeklySchedule_DayOfWeek"=@("New-MAC2ClassificationJob")
}

_awsArgumentCompleterRegistration $MAC2_Completers $MAC2_map

$MAC2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MAC2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MAC2_SelectMap = @{
    "Select"=@("Approve-MAC2Invitation",
               "Get-MAC2GetCustomDataIdentifier",
               "Update-MAC2UpdateAutomatedDiscoveryAccount",
               "New-MAC2AllowList",
               "New-MAC2ClassificationJob",
               "New-MAC2CustomDataIdentifier",
               "New-MAC2FindingsFilter",
               "New-MAC2Invitation",
               "New-MAC2Member",
               "New-MAC2SampleFinding",
               "Deny-MAC2Invitation",
               "Remove-MAC2AllowList",
               "Remove-MAC2CustomDataIdentifier",
               "Remove-MAC2FindingsFilter",
               "Remove-MAC2Invitation",
               "Remove-MAC2Member",
               "Get-MAC2Bucket",
               "Get-MAC2ClassificationJob",
               "Get-MAC2OrganizationConfiguration",
               "Disable-MAC2Macie",
               "Disable-MAC2OrganizationAdminAccount",
               "Unregister-MAC2FromAdministratorAccount",
               "Unregister-MAC2FromMasterAccount",
               "Unregister-MAC2Member",
               "Enable-MAC2Macie",
               "Enable-MAC2OrganizationAdminAccount",
               "Get-MAC2AdministratorAccount",
               "Get-MAC2AllowList",
               "Get-MAC2AutomatedDiscoveryConfiguration",
               "Get-MAC2BucketStatistic",
               "Get-MAC2ClassificationExportConfiguration",
               "Get-MAC2ClassificationScope",
               "Get-MAC2CustomDataIdentifier",
               "Get-MAC2Finding",
               "Get-MAC2FindingsFilter",
               "Get-MAC2FindingsPublicationConfiguration",
               "Get-MAC2FindingStatistic",
               "Get-MAC2InvitationsCount",
               "Get-MAC2MacieSession",
               "Get-MAC2MasterAccount",
               "Get-MAC2Member",
               "Get-MAC2ResourceProfile",
               "Get-MAC2RevealConfiguration",
               "Get-MAC2SensitiveDataOccurrence",
               "Get-MAC2SensitiveDataOccurrencesAvailability",
               "Get-MAC2SensitivityInspectionTemplate",
               "Get-MAC2UsageStatistic",
               "Get-MAC2UsageTotal",
               "Get-MAC2AllowListList",
               "Get-MAC2AutomatedDiscoveryAccountList",
               "Get-MAC2ClassificationJobList",
               "Get-MAC2ClassificationScopeList",
               "Get-MAC2CustomDataIdentifierList",
               "Get-MAC2FindingList",
               "Get-MAC2FindingsFilterList",
               "Get-MAC2InvitationList",
               "Get-MAC2ManagedDataIdentifierList",
               "Get-MAC2MemberList",
               "Get-MAC2OrganizationAdminAccountList",
               "Get-MAC2ResourceProfileArtifactList",
               "Get-MAC2ResourceProfileDetectionList",
               "Get-MAC2SensitivityInspectionTemplateList",
               "Get-MAC2ResourceTag",
               "Write-MAC2ClassificationExportConfiguration",
               "Write-MAC2FindingsPublicationConfiguration",
               "Search-MAC2Resource",
               "Add-MAC2ResourceTag",
               "Test-MAC2CustomDataIdentifier",
               "Remove-MAC2ResourceTag",
               "Update-MAC2AllowList",
               "Update-MAC2AutomatedDiscoveryConfiguration",
               "Update-MAC2ClassificationJob",
               "Update-MAC2ClassificationScope",
               "Update-MAC2FindingsFilter",
               "Update-MAC2MacieSession",
               "Update-MAC2MemberSession",
               "Update-MAC2OrganizationConfiguration",
               "Update-MAC2ResourceProfile",
               "Update-MAC2ResourceProfileDetection",
               "Update-MAC2RevealConfiguration",
               "Update-MAC2SensitivityInspectionTemplate")
}

_awsArgumentCompleterRegistration $MAC2_SelectCompleters $MAC2_SelectMap
# Argument completions for service Amazon SES Mail Manager


$MMGR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MailManager.AcceptAction
        {
            ($_ -eq "New-MMGRTrafficPolicy/DefaultAction") -Or
            ($_ -eq "Update-MMGRTrafficPolicy/DefaultAction")
        }
        {
            $v = "ALLOW","DENY"
            break
        }

        # Amazon.MailManager.IngressPointStatusToUpdate
        "Update-MMGRIngressPoint/StatusToUpdate"
        {
            $v = "ACTIVE","CLOSED"
            break
        }

        # Amazon.MailManager.IngressPointType
        "New-MMGRIngressPoint/Type"
        {
            $v = "AUTH","OPEN"
            break
        }

        # Amazon.MailManager.RetentionPeriod
        {
            ($_ -eq "New-MMGRArchive/Retention_RetentionPeriod") -Or
            ($_ -eq "Update-MMGRArchive/Retention_RetentionPeriod")
        }
        {
            $v = "EIGHTEEN_MONTHS","EIGHT_YEARS","FIVE_YEARS","FOUR_YEARS","NINE_MONTHS","NINE_YEARS","ONE_YEAR","PERMANENT","SEVEN_YEARS","SIX_MONTHS","SIX_YEARS","TEN_YEARS","THIRTY_MONTHS","THREE_MONTHS","THREE_YEARS","TWO_YEARS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MMGR_map = @{
    "DefaultAction"=@("New-MMGRTrafficPolicy","Update-MMGRTrafficPolicy")
    "Retention_RetentionPeriod"=@("New-MMGRArchive","Update-MMGRArchive")
    "StatusToUpdate"=@("Update-MMGRIngressPoint")
    "Type"=@("New-MMGRIngressPoint")
}

_awsArgumentCompleterRegistration $MMGR_Completers $MMGR_map

$MMGR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MMGR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MMGR_SelectMap = @{
    "Select"=@("New-MMGRAddonInstance",
               "New-MMGRAddonSubscription",
               "New-MMGRArchive",
               "New-MMGRIngressPoint",
               "New-MMGRRelay",
               "New-MMGRRuleSet",
               "New-MMGRTrafficPolicy",
               "Remove-MMGRAddonInstance",
               "Remove-MMGRAddonSubscription",
               "Remove-MMGRArchive",
               "Remove-MMGRIngressPoint",
               "Remove-MMGRRelay",
               "Remove-MMGRRuleSet",
               "Remove-MMGRTrafficPolicy",
               "Get-MMGRAddonInstance",
               "Get-MMGRAddonSubscription",
               "Get-MMGRArchive",
               "Get-MMGRArchiveExport",
               "Get-MMGRArchiveMessage",
               "Get-MMGRArchiveMessageContent",
               "Get-MMGRArchiveSearch",
               "Get-MMGRArchiveSearchResult",
               "Get-MMGRIngressPoint",
               "Get-MMGRRelay",
               "Get-MMGRRuleSet",
               "Get-MMGRTrafficPolicy",
               "Get-MMGRAddonInstanceList",
               "Get-MMGRAddonSubscriptionList",
               "Get-MMGRArchiveExportList",
               "Get-MMGRArchiveList",
               "Get-MMGRArchiveSearchList",
               "Get-MMGRIngressPointList",
               "Get-MMGRRelayList",
               "Get-MMGRRuleSetList",
               "Get-MMGRResourceTag",
               "Get-MMGRTrafficPolicyList",
               "Start-MMGRArchiveExport",
               "Start-MMGRArchiveSearch",
               "Stop-MMGRArchiveExport",
               "Stop-MMGRArchiveSearch",
               "Add-MMGRResourceTag",
               "Remove-MMGRResourceTag",
               "Update-MMGRArchive",
               "Update-MMGRIngressPoint",
               "Update-MMGRRelay",
               "Update-MMGRRuleSet",
               "Update-MMGRTrafficPolicy")
}

_awsArgumentCompleterRegistration $MMGR_SelectCompleters $MMGR_SelectMap
# Argument completions for service Amazon Managed Blockchain


$MBC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ManagedBlockchain.AccessorNetworkType
        {
            ($_ -eq "Get-MBCAccessorList/NetworkType") -Or
            ($_ -eq "New-MBCAccessor/NetworkType")
        }
        {
            $v = "ETHEREUM_GOERLI","ETHEREUM_MAINNET","ETHEREUM_MAINNET_AND_GOERLI","POLYGON_MAINNET","POLYGON_MUMBAI"
            break
        }

        # Amazon.ManagedBlockchain.AccessorType
        "New-MBCAccessor/AccessorType"
        {
            $v = "BILLING_TOKEN"
            break
        }

        # Amazon.ManagedBlockchain.Edition
        "New-MBCNetwork/Fabric_Edition"
        {
            $v = "STANDARD","STARTER"
            break
        }

        # Amazon.ManagedBlockchain.Framework
        {
            ($_ -eq "Get-MBCNetworkList/Framework") -Or
            ($_ -eq "New-MBCNetwork/Framework")
        }
        {
            $v = "ETHEREUM","HYPERLEDGER_FABRIC"
            break
        }

        # Amazon.ManagedBlockchain.MemberStatus
        "Get-MBCMemberList/Status"
        {
            $v = "AVAILABLE","CREATE_FAILED","CREATING","DELETED","DELETING","INACCESSIBLE_ENCRYPTION_KEY","UPDATING"
            break
        }

        # Amazon.ManagedBlockchain.NetworkStatus
        "Get-MBCNetworkList/Status"
        {
            $v = "AVAILABLE","CREATE_FAILED","CREATING","DELETED","DELETING"
            break
        }

        # Amazon.ManagedBlockchain.NodeStatus
        "Get-MBCNodeList/Status"
        {
            $v = "AVAILABLE","CREATE_FAILED","CREATING","DELETED","DELETING","FAILED","INACCESSIBLE_ENCRYPTION_KEY","UNHEALTHY","UPDATING"
            break
        }

        # Amazon.ManagedBlockchain.StateDBType
        "New-MBCNode/NodeConfiguration_StateDB"
        {
            $v = "CouchDB","LevelDB"
            break
        }

        # Amazon.ManagedBlockchain.ThresholdComparator
        "New-MBCNetwork/ApprovalThresholdPolicy_ThresholdComparator"
        {
            $v = "GREATER_THAN","GREATER_THAN_OR_EQUAL_TO"
            break
        }

        # Amazon.ManagedBlockchain.VoteValue
        "Send-MBCProposalVote/Vote"
        {
            $v = "NO","YES"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MBC_map = @{
    "AccessorType"=@("New-MBCAccessor")
    "ApprovalThresholdPolicy_ThresholdComparator"=@("New-MBCNetwork")
    "Fabric_Edition"=@("New-MBCNetwork")
    "Framework"=@("Get-MBCNetworkList","New-MBCNetwork")
    "NetworkType"=@("Get-MBCAccessorList","New-MBCAccessor")
    "NodeConfiguration_StateDB"=@("New-MBCNode")
    "Status"=@("Get-MBCMemberList","Get-MBCNetworkList","Get-MBCNodeList")
    "Vote"=@("Send-MBCProposalVote")
}

_awsArgumentCompleterRegistration $MBC_Completers $MBC_map

$MBC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MBC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MBC_SelectMap = @{
    "Select"=@("New-MBCAccessor",
               "New-MBCMember",
               "New-MBCNetwork",
               "New-MBCNode",
               "New-MBCProposal",
               "Remove-MBCAccessor",
               "Remove-MBCMember",
               "Remove-MBCNode",
               "Get-MBCAccessor",
               "Get-MBCMember",
               "Get-MBCNetwork",
               "Get-MBCNode",
               "Get-MBCProposal",
               "Get-MBCAccessorList",
               "Get-MBCInvitationList",
               "Get-MBCMemberList",
               "Get-MBCNetworkList",
               "Get-MBCNodeList",
               "Get-MBCProposalList",
               "Get-MBCProposalVoteList",
               "Get-MBCResourceTag",
               "Deny-MBCInvitation",
               "Add-MBCResourceTag",
               "Remove-MBCResourceTag",
               "Update-MBCMember",
               "Update-MBCNode",
               "Send-MBCProposalVote")
}

_awsArgumentCompleterRegistration $MBC_SelectCompleters $MBC_SelectMap
# Argument completions for service Amazon Managed Blockchain Query


$MBCQ_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ManagedBlockchainQuery.ListFilteredTransactionEventsSortBy
        "Get-MBCQFilteredTransactionEventList/Sort_SortBy"
        {
            $v = "blockchainInstant"
            break
        }

        # Amazon.ManagedBlockchainQuery.ListTransactionsSortBy
        "Get-MBCQTransactionList/Sort_SortBy"
        {
            $v = "TRANSACTION_TIMESTAMP"
            break
        }

        # Amazon.ManagedBlockchainQuery.QueryNetwork
        {
            ($_ -eq "Get-MBCQAssetContractList/ContractFilter_Network") -Or
            ($_ -eq "Get-MBCQAssetContract/ContractIdentifier_Network") -Or
            ($_ -eq "Get-MBCQTransaction/Network") -Or
            ($_ -eq "Get-MBCQTransactionEventList/Network") -Or
            ($_ -eq "Get-MBCQTransactionList/Network") -Or
            ($_ -eq "Get-MBCQTokenBalanceList/TokenFilter_Network") -Or
            ($_ -eq "Get-MBCQTokenBalance/TokenIdentifier_Network")
        }
        {
            $v = "BITCOIN_MAINNET","BITCOIN_TESTNET","ETHEREUM_MAINNET","ETHEREUM_SEPOLIA_TESTNET"
            break
        }

        # Amazon.ManagedBlockchainQuery.QueryTokenStandard
        "Get-MBCQAssetContractList/ContractFilter_TokenStandard"
        {
            $v = "ERC1155","ERC20","ERC721"
            break
        }

        # Amazon.ManagedBlockchainQuery.SortOrder
        {
            ($_ -eq "Get-MBCQFilteredTransactionEventList/Sort_SortOrder") -Or
            ($_ -eq "Get-MBCQTransactionList/Sort_SortOrder")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MBCQ_map = @{
    "ContractFilter_Network"=@("Get-MBCQAssetContractList")
    "ContractFilter_TokenStandard"=@("Get-MBCQAssetContractList")
    "ContractIdentifier_Network"=@("Get-MBCQAssetContract")
    "Network"=@("Get-MBCQTransaction","Get-MBCQTransactionEventList","Get-MBCQTransactionList")
    "Sort_SortBy"=@("Get-MBCQFilteredTransactionEventList","Get-MBCQTransactionList")
    "Sort_SortOrder"=@("Get-MBCQFilteredTransactionEventList","Get-MBCQTransactionList")
    "TokenFilter_Network"=@("Get-MBCQTokenBalanceList")
    "TokenIdentifier_Network"=@("Get-MBCQTokenBalance")
}

_awsArgumentCompleterRegistration $MBCQ_Completers $MBCQ_map

$MBCQ_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MBCQ.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MBCQ_SelectMap = @{
    "Select"=@("Get-MBCQBatchTokenBalance",
               "Get-MBCQAssetContract",
               "Get-MBCQTokenBalance",
               "Get-MBCQTransaction",
               "Get-MBCQAssetContractList",
               "Get-MBCQFilteredTransactionEventList",
               "Get-MBCQTokenBalanceList",
               "Get-MBCQTransactionEventList",
               "Get-MBCQTransactionList")
}

_awsArgumentCompleterRegistration $MBCQ_SelectCompleters $MBCQ_SelectMap
# Argument completions for service AWS Marketplace Agreement Service


$MAS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MarketplaceAgreement.SortOrder
        "Search-MASAgreement/Sort_SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MAS_map = @{
    "Sort_SortOrder"=@("Search-MASAgreement")
}

_awsArgumentCompleterRegistration $MAS_Completers $MAS_map

$MAS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MAS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MAS_SelectMap = @{
    "Select"=@("Get-MASAgreement",
               "Get-MASAgreementTerm",
               "Search-MASAgreement")
}

_awsArgumentCompleterRegistration $MAS_SelectCompleters $MAS_SelectMap
# Argument completions for service AWS Marketplace Catalog Service


$MCAT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MarketplaceCatalog.AmiProductSortBy
        "Get-MCATEntityList/AmiProductSort_SortBy"
        {
            $v = "EntityId","LastModifiedDate","ProductTitle","Visibility"
            break
        }

        # Amazon.MarketplaceCatalog.ContainerProductSortBy
        "Get-MCATEntityList/ContainerProductSort_SortBy"
        {
            $v = "EntityId","LastModifiedDate","ProductTitle","Visibility"
            break
        }

        # Amazon.MarketplaceCatalog.DataProductSortBy
        "Get-MCATEntityList/DataProductSort_SortBy"
        {
            $v = "EntityId","LastModifiedDate","ProductTitle","Visibility"
            break
        }

        # Amazon.MarketplaceCatalog.Intent
        "Start-MCATChangeSet/Intent"
        {
            $v = "APPLY","VALIDATE"
            break
        }

        # Amazon.MarketplaceCatalog.OfferSortBy
        "Get-MCATEntityList/OfferSort_SortBy"
        {
            $v = "AvailabilityEndDate","BuyerAccounts","EntityId","LastModifiedDate","Name","ProductId","ReleaseDate","ResaleAuthorizationId","State","Targeting"
            break
        }

        # Amazon.MarketplaceCatalog.OwnershipType
        "Get-MCATEntityList/OwnershipType"
        {
            $v = "SELF","SHARED"
            break
        }

        # Amazon.MarketplaceCatalog.ResaleAuthorizationSortBy
        "Get-MCATEntityList/ResaleAuthorizationSort_SortBy"
        {
            $v = "AvailabilityEndDate","CreatedDate","EntityId","LastModifiedDate","ManufacturerAccountId","ManufacturerLegalName","Name","OfferExtendedStatus","ProductId","ProductName","ResellerAccountID","ResellerLegalName","Status"
            break
        }

        # Amazon.MarketplaceCatalog.SaaSProductSortBy
        "Get-MCATEntityList/SaaSProductSort_SortBy"
        {
            $v = "EntityId","LastModifiedDate","ProductTitle","Visibility"
            break
        }

        # Amazon.MarketplaceCatalog.SortOrder
        {
            ($_ -eq "Get-MCATEntityList/AmiProductSort_SortOrder") -Or
            ($_ -eq "Get-MCATEntityList/ContainerProductSort_SortOrder") -Or
            ($_ -eq "Get-MCATEntityList/DataProductSort_SortOrder") -Or
            ($_ -eq "Get-MCATEntityList/OfferSort_SortOrder") -Or
            ($_ -eq "Get-MCATEntityList/ResaleAuthorizationSort_SortOrder") -Or
            ($_ -eq "Get-MCATEntityList/SaaSProductSort_SortOrder") -Or
            ($_ -eq "Get-MCATChangeSetList/Sort_SortOrder") -Or
            ($_ -eq "Get-MCATEntityList/Sort_SortOrder")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MCAT_map = @{
    "AmiProductSort_SortBy"=@("Get-MCATEntityList")
    "AmiProductSort_SortOrder"=@("Get-MCATEntityList")
    "ContainerProductSort_SortBy"=@("Get-MCATEntityList")
    "ContainerProductSort_SortOrder"=@("Get-MCATEntityList")
    "DataProductSort_SortBy"=@("Get-MCATEntityList")
    "DataProductSort_SortOrder"=@("Get-MCATEntityList")
    "Intent"=@("Start-MCATChangeSet")
    "OfferSort_SortBy"=@("Get-MCATEntityList")
    "OfferSort_SortOrder"=@("Get-MCATEntityList")
    "OwnershipType"=@("Get-MCATEntityList")
    "ResaleAuthorizationSort_SortBy"=@("Get-MCATEntityList")
    "ResaleAuthorizationSort_SortOrder"=@("Get-MCATEntityList")
    "SaaSProductSort_SortBy"=@("Get-MCATEntityList")
    "SaaSProductSort_SortOrder"=@("Get-MCATEntityList")
    "Sort_SortOrder"=@("Get-MCATChangeSetList","Get-MCATEntityList")
}

_awsArgumentCompleterRegistration $MCAT_Completers $MCAT_map

$MCAT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MCAT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MCAT_SelectMap = @{
    "Select"=@("Get-MCATBatchEntity",
               "Stop-MCATChangeSet",
               "Remove-MCATResourcePolicy",
               "Get-MCATChangeSet",
               "Get-MCATEntity",
               "Get-MCATResourcePolicy",
               "Get-MCATChangeSetList",
               "Get-MCATEntityList",
               "Get-MCATResourceTag",
               "Write-MCATResourcePolicy",
               "Start-MCATChangeSet",
               "Add-MCATResourceTag",
               "Remove-MCATResourceTag")
}

_awsArgumentCompleterRegistration $MCAT_SelectCompleters $MCAT_SelectMap
# Argument completions for service AWS Marketplace Commerce Analytics


$MCA_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AWSMarketplaceCommerceAnalytics.DataSetType
        "New-MCADataSet/DataSetType"
        {
            $v = "customer_profile_by_geography","customer_profile_by_industry","customer_profile_by_revenue","customer_subscriber_annual_subscriptions","customer_subscriber_hourly_monthly_subscriptions","daily_business_canceled_product_subscribers","daily_business_fees","daily_business_free_trial_conversions","daily_business_new_instances","daily_business_new_product_subscribers","daily_business_usage_by_instance_type","disbursed_amount_by_age_of_disbursed_funds","disbursed_amount_by_age_of_past_due_funds","disbursed_amount_by_age_of_uncollected_funds","disbursed_amount_by_customer_geo","disbursed_amount_by_instance_hours","disbursed_amount_by_product","disbursed_amount_by_product_with_uncollected_funds","disbursed_amount_by_uncollected_funds_breakdown","monthly_revenue_annual_subscriptions","monthly_revenue_billing_and_revenue_data","monthly_revenue_field_demonstration_usage","monthly_revenue_flexible_payment_schedule","sales_compensation_billed_revenue","us_sales_and_use_tax_records"
            break
        }

        # Amazon.AWSMarketplaceCommerceAnalytics.SupportDataSetType
        "Start-MCASupportDataExport/DataSetType"
        {
            $v = "customer_support_contacts_data","test_customer_support_contacts_data"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MCA_map = @{
    "DataSetType"=@("New-MCADataSet","Start-MCASupportDataExport")
}

_awsArgumentCompleterRegistration $MCA_Completers $MCA_map

$MCA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MCA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MCA_SelectMap = @{
    "Select"=@("New-MCADataSet",
               "Start-MCASupportDataExport")
}

_awsArgumentCompleterRegistration $MCA_SelectCompleters $MCA_SelectMap
# Argument completions for service AWS Marketplace Deployment Service


$MD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MD_SelectMap = @{
    "Select"=@("Get-MDResourceTag",
               "Write-MDDeploymentParameter",
               "Add-MDResourceTag",
               "Remove-MDResourceTag")
}

_awsArgumentCompleterRegistration $MD_SelectCompleters $MD_SelectMap
# Argument completions for service AWS Marketplace Reporting Service


$MR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MR_SelectMap = @{
    "Select"=@("Get-MRBuyerDashboard")
}

_awsArgumentCompleterRegistration $MR_SelectCompleters $MR_SelectMap
# Argument completions for service AWS Elemental MediaConnect


$EMCN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MediaConnect.BridgePlacement
        "Update-EMCNGatewayInstance/BridgePlacement"
        {
            $v = "AVAILABLE","LOCKED"
            break
        }

        # Amazon.MediaConnect.Colorimetry
        "Update-EMCNFlowMediaStream/Fmtp_Colorimetry"
        {
            $v = "BT2020","BT2100","BT601","BT709","ST2065-1","ST2065-3","XYZ"
            break
        }

        # Amazon.MediaConnect.DesiredState
        "Update-EMCNBridgeState/DesiredState"
        {
            $v = "ACTIVE","DELETED","STANDBY"
            break
        }

        # Amazon.MediaConnect.EntitlementStatus
        "Update-EMCNFlowEntitlement/EntitlementStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.MediaConnect.FailoverMode
        {
            ($_ -eq "New-EMCNBridge/SourceFailoverConfig_FailoverMode") -Or
            ($_ -eq "New-EMCNFlow/SourceFailoverConfig_FailoverMode") -Or
            ($_ -eq "Update-EMCNBridge/SourceFailoverConfig_FailoverMode") -Or
            ($_ -eq "Update-EMCNFlow/SourceFailoverConfig_FailoverMode")
        }
        {
            $v = "FAILOVER","MERGE"
            break
        }

        # Amazon.MediaConnect.MaintenanceDay
        {
            ($_ -eq "New-EMCNFlow/Maintenance_MaintenanceDay") -Or
            ($_ -eq "Update-EMCNFlow/Maintenance_MaintenanceDay")
        }
        {
            $v = "Friday","Monday","Saturday","Sunday","Thursday","Tuesday","Wednesday"
            break
        }

        # Amazon.MediaConnect.MediaStreamType
        "Update-EMCNFlowMediaStream/MediaStreamType"
        {
            $v = "ancillary-data","audio","video"
            break
        }

        # Amazon.MediaConnect.OutputStatus
        "Update-EMCNFlowOutput/OutputStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.MediaConnect.Protocol
        {
            ($_ -eq "Update-EMCNBridgeOutput/NetworkOutput_Protocol") -Or
            ($_ -eq "Update-EMCNBridgeSource/NetworkSource_Protocol") -Or
            ($_ -eq "Update-EMCNFlowOutput/Protocol") -Or
            ($_ -eq "Update-EMCNFlowSource/Protocol")
        }
        {
            $v = "cdi","fujitsu-qos","rist","rtp","rtp-fec","srt-caller","srt-listener","st2110-jpegxs","udp","zixi-pull","zixi-push"
            break
        }

        # Amazon.MediaConnect.Range
        "Update-EMCNFlowMediaStream/Fmtp_Range"
        {
            $v = "FULL","FULLPROTECT","NARROW"
            break
        }

        # Amazon.MediaConnect.ScanMode
        "Update-EMCNFlowMediaStream/Fmtp_ScanMode"
        {
            $v = "interlace","progressive","progressive-segmented-frame"
            break
        }

        # Amazon.MediaConnect.State
        {
            ($_ -eq "New-EMCNBridge/SourceFailoverConfig_State") -Or
            ($_ -eq "New-EMCNFlow/SourceFailoverConfig_State") -Or
            ($_ -eq "Update-EMCNBridge/SourceFailoverConfig_State") -Or
            ($_ -eq "Update-EMCNFlow/SourceFailoverConfig_State")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.MediaConnect.Tcs
        "Update-EMCNFlowMediaStream/Fmtp_Tc"
        {
            $v = "BT2100LINHLG","BT2100LINPQ","DENSITY","HLG","LINEAR","PQ","SDR","ST2065-1","ST428-1"
            break
        }

        # Amazon.MediaConnect.ThumbnailState
        {
            ($_ -eq "New-EMCNFlow/SourceMonitoringConfig_ThumbnailState") -Or
            ($_ -eq "Update-EMCNFlow/SourceMonitoringConfig_ThumbnailState")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMCN_map = @{
    "BridgePlacement"=@("Update-EMCNGatewayInstance")
    "DesiredState"=@("Update-EMCNBridgeState")
    "EntitlementStatus"=@("Update-EMCNFlowEntitlement")
    "Fmtp_Colorimetry"=@("Update-EMCNFlowMediaStream")
    "Fmtp_Range"=@("Update-EMCNFlowMediaStream")
    "Fmtp_ScanMode"=@("Update-EMCNFlowMediaStream")
    "Fmtp_Tc"=@("Update-EMCNFlowMediaStream")
    "Maintenance_MaintenanceDay"=@("New-EMCNFlow","Update-EMCNFlow")
    "MediaStreamType"=@("Update-EMCNFlowMediaStream")
    "NetworkOutput_Protocol"=@("Update-EMCNBridgeOutput")
    "NetworkSource_Protocol"=@("Update-EMCNBridgeSource")
    "OutputStatus"=@("Update-EMCNFlowOutput")
    "Protocol"=@("Update-EMCNFlowOutput","Update-EMCNFlowSource")
    "SourceFailoverConfig_FailoverMode"=@("New-EMCNBridge","New-EMCNFlow","Update-EMCNBridge","Update-EMCNFlow")
    "SourceFailoverConfig_State"=@("New-EMCNBridge","New-EMCNFlow","Update-EMCNBridge","Update-EMCNFlow")
    "SourceMonitoringConfig_ThumbnailState"=@("New-EMCNFlow","Update-EMCNFlow")
}

_awsArgumentCompleterRegistration $EMCN_Completers $EMCN_map

$EMCN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EMCN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMCN_SelectMap = @{
    "Select"=@("Add-EMCNBridgeOutput",
               "Add-EMCNBridgeSource",
               "Add-EMCNFlowMediaStream",
               "Add-EMCNFlowOutput",
               "Add-EMCNFlowSource",
               "Add-EMCNFlowVpcInterface",
               "New-EMCNBridge",
               "New-EMCNFlow",
               "New-EMCNGateway",
               "Remove-EMCNBridge",
               "Remove-EMCNFlow",
               "Remove-EMCNGateway",
               "Remove-EMCNGatewayInstance",
               "Get-EMCNBridge",
               "Get-EMCNFlow",
               "Get-EMCNFlowSourceMetadata",
               "Get-EMCNFlowSourceThumbnail",
               "Get-EMCNGateway",
               "Get-EMCNGatewayInstance",
               "Get-EMCNOffering",
               "Get-EMCNReservation",
               "Grant-EMCNFlowEntitlement",
               "Get-EMCNBridgeList",
               "Get-EMCNEntitlementList",
               "Get-EMCNFlowList",
               "Get-EMCNGatewayInstanceList",
               "Get-EMCNGatewayList",
               "Get-EMCNOfferingList",
               "Get-EMCNReservationList",
               "Get-EMCNResourceTag",
               "New-EMCNOffering",
               "Remove-EMCNBridgeOutput",
               "Remove-EMCNBridgeSource",
               "Remove-EMCNFlowMediaStream",
               "Remove-EMCNFlowOutput",
               "Remove-EMCNFlowSource",
               "Remove-EMCNFlowVpcInterface",
               "Revoke-EMCNFlowEntitlement",
               "Start-EMCNFlow",
               "Stop-EMCNFlow",
               "Add-EMCNResourceTag",
               "Remove-EMCNResourceTag",
               "Update-EMCNBridge",
               "Update-EMCNBridgeOutput",
               "Update-EMCNBridgeSource",
               "Update-EMCNBridgeState",
               "Update-EMCNFlow",
               "Update-EMCNFlowEntitlement",
               "Update-EMCNFlowMediaStream",
               "Update-EMCNFlowOutput",
               "Update-EMCNFlowSource",
               "Update-EMCNGatewayInstance")
}

_awsArgumentCompleterRegistration $EMCN_SelectCompleters $EMCN_SelectMap
# Argument completions for service AWS Elemental MediaConvert


$EMC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MediaConvert.AccelerationMode
        {
            ($_ -eq "New-EMCJob/AccelerationSettings_Mode") -Or
            ($_ -eq "New-EMCJobTemplate/AccelerationSettings_Mode") -Or
            ($_ -eq "Update-EMCJobTemplate/AccelerationSettings_Mode")
        }
        {
            $v = "DISABLED","ENABLED","PREFERRED"
            break
        }

        # Amazon.MediaConvert.BillingTagsSource
        "New-EMCJob/BillingTagsSource"
        {
            $v = "JOB","JOB_TEMPLATE","PRESET","QUEUE"
            break
        }

        # Amazon.MediaConvert.Commitment
        {
            ($_ -eq "New-EMCQueue/ReservationPlanSettings_Commitment") -Or
            ($_ -eq "Update-EMCQueue/ReservationPlanSettings_Commitment")
        }
        {
            $v = "ONE_YEAR"
            break
        }

        # Amazon.MediaConvert.DescribeEndpointsMode
        "Get-EMCEndpoint/Mode"
        {
            $v = "DEFAULT","GET_ONLY"
            break
        }

        # Amazon.MediaConvert.InputPolicy
        {
            ($_ -eq "Write-EMCPolicy/Policy_HttpInput") -Or
            ($_ -eq "Write-EMCPolicy/Policy_HttpsInput") -Or
            ($_ -eq "Write-EMCPolicy/Policy_S3Input")
        }
        {
            $v = "ALLOWED","DISALLOWED"
            break
        }

        # Amazon.MediaConvert.JobStatus
        {
            ($_ -eq "Get-EMCJobList/Status") -Or
            ($_ -eq "Search-EMCJob/Status")
        }
        {
            $v = "CANCELED","COMPLETE","ERROR","PROGRESSING","SUBMITTED"
            break
        }

        # Amazon.MediaConvert.JobTemplateListBy
        "Get-EMCJobTemplateList/ListBy"
        {
            $v = "CREATION_DATE","NAME","SYSTEM"
            break
        }

        # Amazon.MediaConvert.Order
        {
            ($_ -eq "Get-EMCJobList/Order") -Or
            ($_ -eq "Get-EMCJobTemplateList/Order") -Or
            ($_ -eq "Get-EMCPresetList/Order") -Or
            ($_ -eq "Get-EMCQueueList/Order") -Or
            ($_ -eq "Search-EMCJob/Order")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.MediaConvert.PresetListBy
        "Get-EMCPresetList/ListBy"
        {
            $v = "CREATION_DATE","NAME","SYSTEM"
            break
        }

        # Amazon.MediaConvert.PricingPlan
        "New-EMCQueue/PricingPlan"
        {
            $v = "ON_DEMAND","RESERVED"
            break
        }

        # Amazon.MediaConvert.QueueListBy
        "Get-EMCQueueList/ListBy"
        {
            $v = "CREATION_DATE","NAME"
            break
        }

        # Amazon.MediaConvert.QueueStatus
        {
            ($_ -eq "New-EMCQueue/Status") -Or
            ($_ -eq "Update-EMCQueue/Status")
        }
        {
            $v = "ACTIVE","PAUSED"
            break
        }

        # Amazon.MediaConvert.RenewalType
        {
            ($_ -eq "New-EMCQueue/ReservationPlanSettings_RenewalType") -Or
            ($_ -eq "Update-EMCQueue/ReservationPlanSettings_RenewalType")
        }
        {
            $v = "AUTO_RENEW","EXPIRE"
            break
        }

        # Amazon.MediaConvert.SimulateReservedQueue
        "New-EMCJob/SimulateReservedQueue"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.MediaConvert.StatusUpdateInterval
        {
            ($_ -eq "New-EMCJob/StatusUpdateInterval") -Or
            ($_ -eq "New-EMCJobTemplate/StatusUpdateInterval") -Or
            ($_ -eq "Update-EMCJobTemplate/StatusUpdateInterval")
        }
        {
            $v = "SECONDS_10","SECONDS_12","SECONDS_120","SECONDS_15","SECONDS_180","SECONDS_20","SECONDS_240","SECONDS_30","SECONDS_300","SECONDS_360","SECONDS_420","SECONDS_480","SECONDS_540","SECONDS_60","SECONDS_600"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMC_map = @{
    "AccelerationSettings_Mode"=@("New-EMCJob","New-EMCJobTemplate","Update-EMCJobTemplate")
    "BillingTagsSource"=@("New-EMCJob")
    "ListBy"=@("Get-EMCJobTemplateList","Get-EMCPresetList","Get-EMCQueueList")
    "Mode"=@("Get-EMCEndpoint")
    "Order"=@("Get-EMCJobList","Get-EMCJobTemplateList","Get-EMCPresetList","Get-EMCQueueList","Search-EMCJob")
    "Policy_HttpInput"=@("Write-EMCPolicy")
    "Policy_HttpsInput"=@("Write-EMCPolicy")
    "Policy_S3Input"=@("Write-EMCPolicy")
    "PricingPlan"=@("New-EMCQueue")
    "ReservationPlanSettings_Commitment"=@("New-EMCQueue","Update-EMCQueue")
    "ReservationPlanSettings_RenewalType"=@("New-EMCQueue","Update-EMCQueue")
    "SimulateReservedQueue"=@("New-EMCJob")
    "Status"=@("Get-EMCJobList","New-EMCQueue","Search-EMCJob","Update-EMCQueue")
    "StatusUpdateInterval"=@("New-EMCJob","New-EMCJobTemplate","Update-EMCJobTemplate")
}

_awsArgumentCompleterRegistration $EMC_Completers $EMC_map

$EMC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EMC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMC_SelectMap = @{
    "Select"=@("Register-EMCCertificate",
               "Stop-EMCJob",
               "New-EMCJob",
               "New-EMCJobTemplate",
               "New-EMCPreset",
               "New-EMCQueue",
               "Remove-EMCJobTemplate",
               "Remove-EMCPolicy",
               "Remove-EMCPreset",
               "Remove-EMCQueue",
               "Get-EMCEndpoint",
               "Unregister-EMCCertificate",
               "Get-EMCJob",
               "Get-EMCJobTemplate",
               "Get-EMCPolicy",
               "Get-EMCPreset",
               "Get-EMCQueue",
               "Get-EMCJobList",
               "Get-EMCJobTemplateList",
               "Get-EMCPresetList",
               "Get-EMCQueueList",
               "Get-EMCResourceTag",
               "Get-EMCVersionList",
               "Write-EMCPolicy",
               "Search-EMCJob",
               "Add-EMCResourceTag",
               "Remove-EMCResourceTag",
               "Update-EMCJobTemplate",
               "Update-EMCPreset",
               "Update-EMCQueue")
}

_awsArgumentCompleterRegistration $EMC_SelectCompleters $EMC_SelectMap
# Argument completions for service AWS Elemental MediaLive


$EML_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MediaLive.AcceptHeader
        "Get-EMLInputDeviceThumbnail/Accept"
        {
            $v = "image/jpeg"
            break
        }

        # Amazon.MediaLive.CdiInputResolution
        {
            ($_ -eq "New-EMLChannel/CdiInputSpecification_Resolution") -Or
            ($_ -eq "Update-EMLChannel/CdiInputSpecification_Resolution")
        }
        {
            $v = "FHD","HD","SD","UHD"
            break
        }

        # Amazon.MediaLive.ChannelClass
        {
            ($_ -eq "New-EMLChannel/ChannelClass") -Or
            ($_ -eq "Update-EMLChannelClass/ChannelClass")
        }
        {
            $v = "SINGLE_PIPELINE","STANDARD"
            break
        }

        # Amazon.MediaLive.CloudWatchAlarmTemplateComparisonOperator
        {
            ($_ -eq "New-EMLCloudWatchAlarmTemplate/ComparisonOperator") -Or
            ($_ -eq "Update-EMLCloudWatchAlarmTemplate/ComparisonOperator")
        }
        {
            $v = "GreaterThanOrEqualToThreshold","GreaterThanThreshold","LessThanOrEqualToThreshold","LessThanThreshold"
            break
        }

        # Amazon.MediaLive.CloudWatchAlarmTemplateStatistic
        {
            ($_ -eq "New-EMLCloudWatchAlarmTemplate/Statistic") -Or
            ($_ -eq "Update-EMLCloudWatchAlarmTemplate/Statistic")
        }
        {
            $v = "Average","Maximum","Minimum","SampleCount","Sum"
            break
        }

        # Amazon.MediaLive.CloudWatchAlarmTemplateTargetResourceType
        {
            ($_ -eq "New-EMLCloudWatchAlarmTemplate/TargetResourceType") -Or
            ($_ -eq "Update-EMLCloudWatchAlarmTemplate/TargetResourceType")
        }
        {
            $v = "CLOUDFRONT_DISTRIBUTION","MEDIACONNECT_FLOW","MEDIALIVE_CHANNEL","MEDIALIVE_INPUT_DEVICE","MEDIALIVE_MULTIPLEX","MEDIAPACKAGE_CHANNEL","MEDIAPACKAGE_ORIGIN_ENDPOINT","S3_BUCKET"
            break
        }

        # Amazon.MediaLive.CloudWatchAlarmTemplateTreatMissingData
        {
            ($_ -eq "New-EMLCloudWatchAlarmTemplate/TreatMissingData") -Or
            ($_ -eq "Update-EMLCloudWatchAlarmTemplate/TreatMissingData")
        }
        {
            $v = "breaching","ignore","missing","notBreaching"
            break
        }

        # Amazon.MediaLive.ClusterType
        "New-EMLCluster/ClusterType"
        {
            $v = "ON_PREMISES"
            break
        }

        # Amazon.MediaLive.EventBridgeRuleTemplateEventType
        {
            ($_ -eq "New-EMLEventBridgeRuleTemplate/EventType") -Or
            ($_ -eq "Update-EMLEventBridgeRuleTemplate/EventType")
        }
        {
            $v = "MEDIACONNECT_ALERT","MEDIACONNECT_FLOW_STATUS_CHANGE","MEDIACONNECT_OUTPUT_HEALTH","MEDIACONNECT_SOURCE_HEALTH","MEDIALIVE_CHANNEL_ALERT","MEDIALIVE_CHANNEL_INPUT_CHANGE","MEDIALIVE_CHANNEL_STATE_CHANGE","MEDIALIVE_MULTIPLEX_ALERT","MEDIALIVE_MULTIPLEX_STATE_CHANGE","MEDIAPACKAGE_HARVEST_JOB_NOTIFICATION","MEDIAPACKAGE_INPUT_NOTIFICATION","MEDIAPACKAGE_KEY_PROVIDER_NOTIFICATION","SIGNAL_MAP_ACTIVE_ALARM"
            break
        }

        # Amazon.MediaLive.InputCodec
        {
            ($_ -eq "New-EMLChannel/InputSpecification_Codec") -Or
            ($_ -eq "Update-EMLChannel/InputSpecification_Codec")
        }
        {
            $v = "AVC","HEVC","MPEG2"
            break
        }

        # Amazon.MediaLive.InputDeviceCodec
        {
            ($_ -eq "Update-EMLInputDevice/HdDeviceSettings_Codec") -Or
            ($_ -eq "Update-EMLInputDevice/UhdDeviceSettings_Codec")
        }
        {
            $v = "AVC","HEVC"
            break
        }

        # Amazon.MediaLive.InputDeviceConfiguredInput
        {
            ($_ -eq "Update-EMLInputDevice/HdDeviceSettings_ConfiguredInput") -Or
            ($_ -eq "Update-EMLInputDevice/UhdDeviceSettings_ConfiguredInput")
        }
        {
            $v = "AUTO","HDMI","SDI"
            break
        }

        # Amazon.MediaLive.InputMaximumBitrate
        {
            ($_ -eq "New-EMLChannel/InputSpecification_MaximumBitrate") -Or
            ($_ -eq "Update-EMLChannel/InputSpecification_MaximumBitrate")
        }
        {
            $v = "MAX_10_MBPS","MAX_20_MBPS","MAX_50_MBPS"
            break
        }

        # Amazon.MediaLive.InputNetworkLocation
        "New-EMLInput/InputNetworkLocation"
        {
            $v = "AWS","ON_PREMISES"
            break
        }

        # Amazon.MediaLive.InputResolution
        {
            ($_ -eq "New-EMLChannel/InputSpecification_Resolution") -Or
            ($_ -eq "Update-EMLChannel/InputSpecification_Resolution")
        }
        {
            $v = "HD","SD","UHD"
            break
        }

        # Amazon.MediaLive.InputType
        "New-EMLInput/Type"
        {
            $v = "AWS_CDI","INPUT_DEVICE","MEDIACONNECT","MP4_FILE","MULTICAST","RTMP_PULL","RTMP_PUSH","RTP_PUSH","SRT_CALLER","TS_FILE","UDP_PUSH","URL_PULL"
            break
        }

        # Amazon.MediaLive.LogLevel
        {
            ($_ -eq "New-EMLChannel/LogLevel") -Or
            ($_ -eq "Update-EMLChannel/LogLevel")
        }
        {
            $v = "DEBUG","DISABLED","ERROR","INFO","WARNING"
            break
        }

        # Amazon.MediaLive.MaintenanceDay
        {
            ($_ -eq "New-EMLChannel/Maintenance_MaintenanceDay") -Or
            ($_ -eq "Update-EMLChannel/Maintenance_MaintenanceDay")
        }
        {
            $v = "FRIDAY","MONDAY","SATURDAY","SUNDAY","THURSDAY","TUESDAY","WEDNESDAY"
            break
        }

        # Amazon.MediaLive.NodeRole
        {
            ($_ -eq "New-EMLNode/Role") -Or
            ($_ -eq "New-EMLNodeRegistrationScript/Role") -Or
            ($_ -eq "Update-EMLNode/Role")
        }
        {
            $v = "ACTIVE","BACKUP"
            break
        }

        # Amazon.MediaLive.PreferredChannelPipeline
        {
            ($_ -eq "New-EMLMultiplexProgram/MultiplexProgramSettings_PreferredChannelPipeline") -Or
            ($_ -eq "Update-EMLMultiplexProgram/MultiplexProgramSettings_PreferredChannelPipeline")
        }
        {
            $v = "CURRENTLY_ACTIVE","PIPELINE_0","PIPELINE_1"
            break
        }

        # Amazon.MediaLive.RebootInputDeviceForce
        "Restart-EMLInputDevice/IgnoreStreaming"
        {
            $v = "NO","YES"
            break
        }

        # Amazon.MediaLive.ReservationAutomaticRenewal
        {
            ($_ -eq "New-EMLOfferingPurchase/RenewalSettings_AutomaticRenewal") -Or
            ($_ -eq "Update-EMLReservation/RenewalSettings_AutomaticRenewal")
        }
        {
            $v = "DISABLED","ENABLED","UNAVAILABLE"
            break
        }

        # Amazon.MediaLive.UpdateNodeState
        "Update-EMLNodeState/State"
        {
            $v = "ACTIVE","DRAINING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EML_map = @{
    "Accept"=@("Get-EMLInputDeviceThumbnail")
    "CdiInputSpecification_Resolution"=@("New-EMLChannel","Update-EMLChannel")
    "ChannelClass"=@("New-EMLChannel","Update-EMLChannelClass")
    "ClusterType"=@("New-EMLCluster")
    "ComparisonOperator"=@("New-EMLCloudWatchAlarmTemplate","Update-EMLCloudWatchAlarmTemplate")
    "EventType"=@("New-EMLEventBridgeRuleTemplate","Update-EMLEventBridgeRuleTemplate")
    "HdDeviceSettings_Codec"=@("Update-EMLInputDevice")
    "HdDeviceSettings_ConfiguredInput"=@("Update-EMLInputDevice")
    "IgnoreStreaming"=@("Restart-EMLInputDevice")
    "InputNetworkLocation"=@("New-EMLInput")
    "InputSpecification_Codec"=@("New-EMLChannel","Update-EMLChannel")
    "InputSpecification_MaximumBitrate"=@("New-EMLChannel","Update-EMLChannel")
    "InputSpecification_Resolution"=@("New-EMLChannel","Update-EMLChannel")
    "LogLevel"=@("New-EMLChannel","Update-EMLChannel")
    "Maintenance_MaintenanceDay"=@("New-EMLChannel","Update-EMLChannel")
    "MultiplexProgramSettings_PreferredChannelPipeline"=@("New-EMLMultiplexProgram","Update-EMLMultiplexProgram")
    "RenewalSettings_AutomaticRenewal"=@("New-EMLOfferingPurchase","Update-EMLReservation")
    "Role"=@("New-EMLNode","New-EMLNodeRegistrationScript","Update-EMLNode")
    "State"=@("Update-EMLNodeState")
    "Statistic"=@("New-EMLCloudWatchAlarmTemplate","Update-EMLCloudWatchAlarmTemplate")
    "TargetResourceType"=@("New-EMLCloudWatchAlarmTemplate","Update-EMLCloudWatchAlarmTemplate")
    "TreatMissingData"=@("New-EMLCloudWatchAlarmTemplate","Update-EMLCloudWatchAlarmTemplate")
    "Type"=@("New-EMLInput")
    "UhdDeviceSettings_Codec"=@("Update-EMLInputDevice")
    "UhdDeviceSettings_ConfiguredInput"=@("Update-EMLInputDevice")
}

_awsArgumentCompleterRegistration $EML_Completers $EML_map

$EML_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EML.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EML_SelectMap = @{
    "Select"=@("Receive-EMLInputDeviceTransfer",
               "Remove-EMLResourceBatch",
               "Start-EMLResourceBatch",
               "Stop-EMLResourceBatch",
               "Update-EMLScheduleBatch",
               "Stop-EMLInputDeviceTransfer",
               "Request-EMLDevice",
               "New-EMLChannel",
               "New-EMLChannelPlacementGroup",
               "New-EMLCloudWatchAlarmTemplate",
               "New-EMLCloudWatchAlarmTemplateGroup",
               "New-EMLCluster",
               "New-EMLEventBridgeRuleTemplate",
               "New-EMLEventBridgeRuleTemplateGroup",
               "New-EMLInput",
               "New-EMLInputSecurityGroup",
               "New-EMLMultiplex",
               "New-EMLMultiplexProgram",
               "New-EMLNetwork",
               "New-EMLNode",
               "New-EMLNodeRegistrationScript",
               "New-EMLPartnerInput",
               "New-EMLSignalMap",
               "Add-EMLResourceTag",
               "Remove-EMLChannel",
               "Remove-EMLChannelPlacementGroup",
               "Remove-EMLCloudWatchAlarmTemplate",
               "Remove-EMLCloudWatchAlarmTemplateGroup",
               "Remove-EMLCluster",
               "Remove-EMLEventBridgeRuleTemplate",
               "Remove-EMLEventBridgeRuleTemplateGroup",
               "Remove-EMLInput",
               "Remove-EMLInputSecurityGroup",
               "Remove-EMLMultiplex",
               "Remove-EMLMultiplexProgram",
               "Remove-EMLNetwork",
               "Remove-EMLNode",
               "Remove-EMLReservation",
               "Remove-EMLSchedule",
               "Remove-EMLSignalMap",
               "Remove-EMLResourceTag",
               "Get-EMLAccountConfiguration",
               "Get-EMLChannel",
               "Get-EMLChannelPlacementGroup",
               "Get-EMLCluster",
               "Get-EMLInput",
               "Get-EMLInputDevice",
               "Get-EMLInputDeviceThumbnail",
               "Get-EMLInputSecurityGroup",
               "Get-EMLMultiplex",
               "Get-EMLMultiplexProgram",
               "Get-EMLNetwork",
               "Get-EMLNode",
               "Get-EMLOffering",
               "Get-EMLReservation",
               "Get-EMLSchedule",
               "Get-EMLThumbnail",
               "Get-EMLCloudWatchAlarmTemplate",
               "Get-EMLCloudWatchAlarmTemplateGroup",
               "Get-EMLEventBridgeRuleTemplate",
               "Get-EMLEventBridgeRuleTemplateGroup",
               "Get-EMLSignalMap",
               "Get-EMLChannelPlacementGroupList",
               "Get-EMLChannelList",
               "Get-EMLCloudWatchAlarmTemplateGroupList",
               "Get-EMLCloudWatchAlarmTemplateList",
               "Get-EMLClusterList",
               "Get-EMLEventBridgeRuleTemplateGroupList",
               "Get-EMLEventBridgeRuleTemplateList",
               "Get-EMLInputDeviceList",
               "Get-EMLInputDeviceTransferList",
               "Get-EMLInputList",
               "Get-EMLInputSecurityGroupList",
               "Get-EMLMultiplexList",
               "Get-EMLMultiplexProgramList",
               "Get-EMLNetworkList",
               "Get-EMLNodeList",
               "Get-EMLOfferingList",
               "Get-EMLReservationList",
               "Get-EMLSignalMapList",
               "Get-EMLResourceTag",
               "New-EMLOfferingPurchase",
               "Restart-EMLInputDevice",
               "Deny-EMLInputDeviceTransfer",
               "Restart-EMLChannelPipeline",
               "Start-EMLChannel",
               "Start-EMLDeleteMonitorDeployment",
               "Start-EMLInputDevice",
               "Start-EMLInputDeviceMaintenanceWindow",
               "Start-EMLMonitorDeployment",
               "Start-EMLMultiplex",
               "Start-EMLUpdateSignalMap",
               "Stop-EMLChannel",
               "Stop-EMLInputDevice",
               "Stop-EMLMultiplex",
               "Move-EMLInputDevice",
               "Update-EMLAccountConfiguration",
               "Update-EMLChannel",
               "Update-EMLChannelClass",
               "Update-EMLChannelPlacementGroup",
               "Update-EMLCloudWatchAlarmTemplate",
               "Update-EMLCloudWatchAlarmTemplateGroup",
               "Update-EMLCluster",
               "Update-EMLEventBridgeRuleTemplate",
               "Update-EMLEventBridgeRuleTemplateGroup",
               "Update-EMLInput",
               "Update-EMLInputDevice",
               "Update-EMLInputSecurityGroup",
               "Update-EMLMultiplex",
               "Update-EMLMultiplexProgram",
               "Update-EMLNetwork",
               "Update-EMLNode",
               "Update-EMLNodeState",
               "Update-EMLReservation")
}

_awsArgumentCompleterRegistration $EML_SelectCompleters $EML_SelectMap
# Argument completions for service AWS Elemental MediaPackage


$EMP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MediaPackage.CmafEncryptionMethod
        {
            ($_ -eq "New-EMPOriginEndpoint/Encryption_EncryptionMethod") -Or
            ($_ -eq "Update-EMPOriginEndpoint/Encryption_EncryptionMethod")
        }
        {
            $v = "AES_CTR","SAMPLE_AES"
            break
        }

        # Amazon.MediaPackage.Origination
        {
            ($_ -eq "New-EMPOriginEndpoint/Origination") -Or
            ($_ -eq "Update-EMPOriginEndpoint/Origination")
        }
        {
            $v = "ALLOW","DENY"
            break
        }

        # Amazon.MediaPackage.PresetSpeke20Audio
        {
            ($_ -eq "New-EMPOriginEndpoint/EncryptionContractConfiguration_PresetSpeke20Audio") -Or
            ($_ -eq "Update-EMPOriginEndpoint/EncryptionContractConfiguration_PresetSpeke20Audio")
        }
        {
            $v = "PRESET-AUDIO-1","PRESET-AUDIO-2","PRESET-AUDIO-3","SHARED","UNENCRYPTED"
            break
        }

        # Amazon.MediaPackage.PresetSpeke20Video
        {
            ($_ -eq "New-EMPOriginEndpoint/EncryptionContractConfiguration_PresetSpeke20Video") -Or
            ($_ -eq "Update-EMPOriginEndpoint/EncryptionContractConfiguration_PresetSpeke20Video")
        }
        {
            $v = "PRESET-VIDEO-1","PRESET-VIDEO-2","PRESET-VIDEO-3","PRESET-VIDEO-4","PRESET-VIDEO-5","PRESET-VIDEO-6","PRESET-VIDEO-7","PRESET-VIDEO-8","SHARED","UNENCRYPTED"
            break
        }

        # Amazon.MediaPackage.StreamOrder
        {
            ($_ -eq "New-EMPOriginEndpoint/StreamSelection_StreamOrder") -Or
            ($_ -eq "Update-EMPOriginEndpoint/StreamSelection_StreamOrder")
        }
        {
            $v = "ORIGINAL","VIDEO_BITRATE_ASCENDING","VIDEO_BITRATE_DESCENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMP_map = @{
    "Encryption_EncryptionMethod"=@("New-EMPOriginEndpoint","Update-EMPOriginEndpoint")
    "EncryptionContractConfiguration_PresetSpeke20Audio"=@("New-EMPOriginEndpoint","Update-EMPOriginEndpoint")
    "EncryptionContractConfiguration_PresetSpeke20Video"=@("New-EMPOriginEndpoint","Update-EMPOriginEndpoint")
    "Origination"=@("New-EMPOriginEndpoint","Update-EMPOriginEndpoint")
    "StreamSelection_StreamOrder"=@("New-EMPOriginEndpoint","Update-EMPOriginEndpoint")
}

_awsArgumentCompleterRegistration $EMP_Completers $EMP_map

$EMP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EMP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMP_SelectMap = @{
    "Select"=@("Update-EMPLogConfiguration",
               "New-EMPChannel",
               "New-EMPHarvestJob",
               "New-EMPOriginEndpoint",
               "Remove-EMPChannel",
               "Remove-EMPOriginEndpoint",
               "Get-EMPChannel",
               "Get-EMPHarvestJob",
               "Get-EMPOriginEndpoint",
               "Get-EMPChannelList",
               "Get-EMPHarvestJobList",
               "Get-EMPOriginEndpointList",
               "Get-EMPResourceTag",
               "Invoke-EMPChannelCredentialRotation",
               "Invoke-EMPIngestEndpointCredentialRotation",
               "Add-EMPResourceTag",
               "Remove-EMPResourceTag",
               "Update-EMPChannel",
               "Update-EMPOriginEndpoint")
}

_awsArgumentCompleterRegistration $EMP_SelectCompleters $EMP_SelectMap
# Argument completions for service AWS Elemental MediaPackage v2


$MPV2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MediaPackageV2.CmafEncryptionMethod
        {
            ($_ -eq "New-MPV2OriginEndpoint/EncryptionMethod_CmafEncryptionMethod") -Or
            ($_ -eq "Update-MPV2OriginEndpoint/EncryptionMethod_CmafEncryptionMethod")
        }
        {
            $v = "CBCS","CENC"
            break
        }

        # Amazon.MediaPackageV2.ContainerType
        {
            ($_ -eq "New-MPV2OriginEndpoint/ContainerType") -Or
            ($_ -eq "Update-MPV2OriginEndpoint/ContainerType")
        }
        {
            $v = "CMAF","TS"
            break
        }

        # Amazon.MediaPackageV2.HarvestJobStatus
        "Get-MPV2HarvestJobList/Status"
        {
            $v = "CANCELLED","COMPLETED","FAILED","IN_PROGRESS","QUEUED"
            break
        }

        # Amazon.MediaPackageV2.InputType
        "New-MPV2Channel/InputType"
        {
            $v = "CMAF","HLS"
            break
        }

        # Amazon.MediaPackageV2.PresetSpeke20Audio
        {
            ($_ -eq "New-MPV2OriginEndpoint/EncryptionContractConfiguration_PresetSpeke20Audio") -Or
            ($_ -eq "Update-MPV2OriginEndpoint/EncryptionContractConfiguration_PresetSpeke20Audio")
        }
        {
            $v = "PRESET_AUDIO_1","PRESET_AUDIO_2","PRESET_AUDIO_3","SHARED","UNENCRYPTED"
            break
        }

        # Amazon.MediaPackageV2.PresetSpeke20Video
        {
            ($_ -eq "New-MPV2OriginEndpoint/EncryptionContractConfiguration_PresetSpeke20Video") -Or
            ($_ -eq "Update-MPV2OriginEndpoint/EncryptionContractConfiguration_PresetSpeke20Video")
        }
        {
            $v = "PRESET_VIDEO_1","PRESET_VIDEO_2","PRESET_VIDEO_3","PRESET_VIDEO_4","PRESET_VIDEO_5","PRESET_VIDEO_6","PRESET_VIDEO_7","PRESET_VIDEO_8","SHARED","UNENCRYPTED"
            break
        }

        # Amazon.MediaPackageV2.TsEncryptionMethod
        {
            ($_ -eq "New-MPV2OriginEndpoint/EncryptionMethod_TsEncryptionMethod") -Or
            ($_ -eq "Update-MPV2OriginEndpoint/EncryptionMethod_TsEncryptionMethod")
        }
        {
            $v = "AES_128","SAMPLE_AES"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MPV2_map = @{
    "ContainerType"=@("New-MPV2OriginEndpoint","Update-MPV2OriginEndpoint")
    "EncryptionContractConfiguration_PresetSpeke20Audio"=@("New-MPV2OriginEndpoint","Update-MPV2OriginEndpoint")
    "EncryptionContractConfiguration_PresetSpeke20Video"=@("New-MPV2OriginEndpoint","Update-MPV2OriginEndpoint")
    "EncryptionMethod_CmafEncryptionMethod"=@("New-MPV2OriginEndpoint","Update-MPV2OriginEndpoint")
    "EncryptionMethod_TsEncryptionMethod"=@("New-MPV2OriginEndpoint","Update-MPV2OriginEndpoint")
    "InputType"=@("New-MPV2Channel")
    "Status"=@("Get-MPV2HarvestJobList")
}

_awsArgumentCompleterRegistration $MPV2_Completers $MPV2_map

$MPV2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MPV2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MPV2_SelectMap = @{
    "Select"=@("Stop-MPV2HarvestJob",
               "New-MPV2Channel",
               "New-MPV2ChannelGroup",
               "New-MPV2HarvestJob",
               "New-MPV2OriginEndpoint",
               "Remove-MPV2Channel",
               "Remove-MPV2ChannelGroup",
               "Remove-MPV2ChannelPolicy",
               "Remove-MPV2OriginEndpoint",
               "Remove-MPV2OriginEndpointPolicy",
               "Get-MPV2Channel",
               "Get-MPV2ChannelGroup",
               "Get-MPV2ChannelPolicy",
               "Get-MPV2HarvestJob",
               "Get-MPV2OriginEndpoint",
               "Get-MPV2OriginEndpointPolicy",
               "Get-MPV2ChannelGroupList",
               "Get-MPV2ChannelList",
               "Get-MPV2HarvestJobList",
               "Get-MPV2OriginEndpointList",
               "Get-MPV2ResourceTag",
               "Write-MPV2ChannelPolicy",
               "Write-MPV2OriginEndpointPolicy",
               "Add-MPV2ResourceTag",
               "Remove-MPV2ResourceTag",
               "Update-MPV2Channel",
               "Update-MPV2ChannelGroup",
               "Update-MPV2OriginEndpoint")
}

_awsArgumentCompleterRegistration $MPV2_SelectCompleters $MPV2_SelectMap
# Argument completions for service AWS Elemental MediaPackage VOD


$EMPV_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EMPV.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMPV_SelectMap = @{
    "Select"=@("Update-EMPVLog",
               "New-EMPVAsset",
               "New-EMPVPackagingConfiguration",
               "New-EMPVPackagingGroup",
               "Remove-EMPVAsset",
               "Remove-EMPVPackagingConfiguration",
               "Remove-EMPVPackagingGroup",
               "Get-EMPVAsset",
               "Get-EMPVPackagingConfiguration",
               "Get-EMPVPackagingGroup",
               "Get-EMPVAssetList",
               "Get-EMPVPackagingConfigurationList",
               "Get-EMPVPackagingGroupList",
               "Get-EMPVResourceTag",
               "Add-EMPVResourceTag",
               "Remove-EMPVResourceTag",
               "Update-EMPVPackagingGroup")
}

_awsArgumentCompleterRegistration $EMPV_SelectCompleters $EMPV_SelectMap
# Argument completions for service AWS Elemental MediaStore


$EMS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MediaStore.ContainerLevelMetrics
        "Write-EMSMetricPolicy/MetricPolicy_ContainerLevelMetric"
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMS_map = @{
    "MetricPolicy_ContainerLevelMetric"=@("Write-EMSMetricPolicy")
}

_awsArgumentCompleterRegistration $EMS_Completers $EMS_map

$EMS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EMS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMS_SelectMap = @{
    "Select"=@("New-EMSContainer",
               "Remove-EMSContainer",
               "Remove-EMSContainerPolicy",
               "Remove-EMSCorsPolicy",
               "Remove-EMSLifecyclePolicy",
               "Remove-EMSMetricPolicy",
               "Get-EMSContainer",
               "Get-EMSContainerPolicy",
               "Get-EMSCorsPolicy",
               "Get-EMSLifecyclePolicy",
               "Get-EMSMetricPolicy",
               "Get-EMSContainerList",
               "Get-EMSResourceTag",
               "Write-EMSContainerPolicy",
               "Write-EMSCorsPolicy",
               "Write-EMSLifecyclePolicy",
               "Write-EMSMetricPolicy",
               "Start-EMSAccessLogging",
               "Stop-EMSAccessLogging",
               "Add-EMSResourceTag",
               "Remove-EMSResourceTag")
}

_awsArgumentCompleterRegistration $EMS_SelectCompleters $EMS_SelectMap
# Argument completions for service AWS Elemental MediaStore Data Plane


$EMSD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MediaStoreData.StorageClass
        "Write-EMSDObject/StorageClass"
        {
            $v = "TEMPORAL"
            break
        }

        # Amazon.MediaStoreData.UploadAvailability
        "Write-EMSDObject/UploadAvailability"
        {
            $v = "STANDARD","STREAMING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMSD_map = @{
    "StorageClass"=@("Write-EMSDObject")
    "UploadAvailability"=@("Write-EMSDObject")
}

_awsArgumentCompleterRegistration $EMSD_Completers $EMSD_map

$EMSD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EMSD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMSD_SelectMap = @{
    "Select"=@("Remove-EMSDObject",
               "Get-EMSDObjectMetadata",
               "Get-EMSDObject",
               "Get-EMSDItemList",
               "Write-EMSDObject")
}

_awsArgumentCompleterRegistration $EMSD_SelectCompleters $EMSD_SelectMap
# Argument completions for service AWS Elemental MediaTailor


$EMT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MediaTailor.AccessType
        {
            ($_ -eq "New-EMTSourceLocation/AccessConfiguration_AccessType") -Or
            ($_ -eq "Update-EMTSourceLocation/AccessConfiguration_AccessType")
        }
        {
            $v = "AUTODETECT_SIGV4","S3_SIGV4","SECRETS_MANAGER_ACCESS_TOKEN"
            break
        }

        # Amazon.MediaTailor.FillPolicy
        "Set-EMTPlaybackConfiguration/AvailSuppression_FillPolicy"
        {
            $v = "FULL_AVAIL_ONLY","PARTIAL_AVAIL"
            break
        }

        # Amazon.MediaTailor.InsertionMode
        "Set-EMTPlaybackConfiguration/InsertionMode"
        {
            $v = "PLAYER_SELECT","STITCHED_ONLY"
            break
        }

        # Amazon.MediaTailor.Mode
        "Set-EMTPlaybackConfiguration/AvailSuppression_Mode"
        {
            $v = "AFTER_LIVE_EDGE","BEHIND_LIVE_EDGE","OFF"
            break
        }

        # Amazon.MediaTailor.PlaybackMode
        "New-EMTChannel/PlaybackMode"
        {
            $v = "LINEAR","LOOP"
            break
        }

        # Amazon.MediaTailor.RelativePosition
        "New-EMTProgram/Transition_RelativePosition"
        {
            $v = "AFTER_PROGRAM","BEFORE_PROGRAM"
            break
        }

        # Amazon.MediaTailor.Tier
        "New-EMTChannel/Tier"
        {
            $v = "BASIC","STANDARD"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMT_map = @{
    "AccessConfiguration_AccessType"=@("New-EMTSourceLocation","Update-EMTSourceLocation")
    "AvailSuppression_FillPolicy"=@("Set-EMTPlaybackConfiguration")
    "AvailSuppression_Mode"=@("Set-EMTPlaybackConfiguration")
    "InsertionMode"=@("Set-EMTPlaybackConfiguration")
    "PlaybackMode"=@("New-EMTChannel")
    "Tier"=@("New-EMTChannel")
    "Transition_RelativePosition"=@("New-EMTProgram")
}

_awsArgumentCompleterRegistration $EMT_Completers $EMT_map

$EMT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.EMT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$EMT_SelectMap = @{
    "Select"=@("Add-EMTLogsForChannel",
               "Add-EMTLogsForPlaybackConfiguration",
               "New-EMTChannel",
               "New-EMTLiveSource",
               "New-EMTPrefetchSchedule",
               "New-EMTProgram",
               "New-EMTSourceLocation",
               "New-EMTVodSource",
               "Remove-EMTChannel",
               "Remove-EMTChannelPolicy",
               "Remove-EMTLiveSource",
               "Remove-EMTPlaybackConfiguration",
               "Remove-EMTPrefetchSchedule",
               "Remove-EMTProgram",
               "Remove-EMTSourceLocation",
               "Remove-EMTVodSource",
               "Get-EMTChannel",
               "Get-EMTLiveSource",
               "Get-EMTProgram",
               "Get-EMTSourceLocation",
               "Get-EMTVodSource",
               "Get-EMTChannelPolicy",
               "Get-EMTChannelSchedule",
               "Get-EMTPlaybackConfiguration",
               "Get-EMTPrefetchSchedule",
               "Get-EMTAlertList",
               "Get-EMTChannelList",
               "Get-EMTLiveSourceList",
               "Get-EMTPlaybackConfigurationList",
               "Get-EMTPrefetchScheduleList",
               "Get-EMTSourceLocationList",
               "Get-EMTResourceTag",
               "Get-EMTVodSourceList",
               "Write-EMTChannelPolicy",
               "Set-EMTPlaybackConfiguration",
               "Start-EMTChannel",
               "Stop-EMTChannel",
               "Add-EMTResourceTag",
               "Remove-EMTResourceTag",
               "Update-EMTChannel",
               "Update-EMTLiveSource",
               "Update-EMTProgram",
               "Update-EMTSourceLocation",
               "Update-EMTVodSource")
}

_awsArgumentCompleterRegistration $EMT_SelectCompleters $EMT_SelectMap
# Argument completions for service Amazon Medical Imaging Service


$MIS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MedicalImaging.DatastoreStatus
        "Get-MISDatastoreList/DatastoreStatus"
        {
            $v = "ACTIVE","CREATE_FAILED","CREATING","DELETED","DELETING"
            break
        }

        # Amazon.MedicalImaging.JobStatus
        "Get-MISDICOMImportJobList/JobStatus"
        {
            $v = "COMPLETED","FAILED","IN_PROGRESS","SUBMITTED"
            break
        }

        # Amazon.MedicalImaging.SortField
        "Search-MISImageSet/Sort_SortField"
        {
            $v = "createdAt","DICOMStudyDateAndTime","updatedAt"
            break
        }

        # Amazon.MedicalImaging.SortOrder
        "Search-MISImageSet/Sort_SortOrder"
        {
            $v = "ASC","DESC"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MIS_map = @{
    "DatastoreStatus"=@("Get-MISDatastoreList")
    "JobStatus"=@("Get-MISDICOMImportJobList")
    "Sort_SortField"=@("Search-MISImageSet")
    "Sort_SortOrder"=@("Search-MISImageSet")
}

_awsArgumentCompleterRegistration $MIS_Completers $MIS_map

$MIS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MIS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MIS_SelectMap = @{
    "Select"=@("Copy-MISImageSet",
               "New-MISDatastore",
               "Remove-MISDatastore",
               "Remove-MISImageSet",
               "Get-MISDatastore",
               "Get-MISDICOMImportJob",
               "Get-MISImageFrame",
               "Get-MISImageSet",
               "Get-MISImageSetMetadata",
               "Get-MISDatastoreList",
               "Get-MISDICOMImportJobList",
               "Get-MISImageSetVersionList",
               "Get-MISResourceTag",
               "Search-MISImageSet",
               "Start-MISDICOMImportJob",
               "Add-MISResourceTag",
               "Remove-MISResourceTag",
               "Update-MISImageSetMetadata")
}

_awsArgumentCompleterRegistration $MIS_SelectCompleters $MIS_SelectMap
# Argument completions for service Amazon MemoryDB


$MDB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MemoryDB.InputAuthenticationType
        {
            ($_ -eq "New-MDBUser/AuthenticationMode_Type") -Or
            ($_ -eq "Update-MDBUser/AuthenticationMode_Type")
        }
        {
            $v = "iam","password"
            break
        }

        # Amazon.MemoryDB.SourceType
        "Get-MDBEvent/SourceType"
        {
            $v = "acl","cluster","node","parameter-group","subnet-group","user"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MDB_map = @{
    "AuthenticationMode_Type"=@("New-MDBUser","Update-MDBUser")
    "SourceType"=@("Get-MDBEvent")
}

_awsArgumentCompleterRegistration $MDB_Completers $MDB_map

$MDB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MDB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MDB_SelectMap = @{
    "Select"=@("Update-MDBUpdateClusterBatch",
               "Copy-MDBSnapshot",
               "New-MDBACL",
               "New-MDBCluster",
               "New-MDBParameterGroup",
               "New-MDBSnapshot",
               "New-MDBSubnetGroup",
               "New-MDBUser",
               "Remove-MDBACL",
               "Remove-MDBCluster",
               "Remove-MDBParameterGroup",
               "Remove-MDBSnapshot",
               "Remove-MDBSubnetGroup",
               "Remove-MDBUser",
               "Get-MDBACLs",
               "Get-MDBCluster",
               "Get-MDBEngineVersion",
               "Get-MDBEvent",
               "Get-MDBParameterGroup",
               "Get-MDBParameter",
               "Get-MDBReservedNode",
               "Get-MDBReservedNodesOffering",
               "Get-MDBServiceUpdate",
               "Get-MDBSnapshot",
               "Get-MDBSubnetGroup",
               "Get-MDBUser",
               "Start-MDBFailoverShard",
               "Get-MDBAllowedNodeTypeUpdateList",
               "Get-MDBTag",
               "Request-MDBReservedNodesOffering",
               "Reset-MDBParameterGroup",
               "Add-MDBResourceTag",
               "Remove-MDBResourceTag",
               "Update-MDBACL",
               "Update-MDBCluster",
               "Update-MDBParameterGroup",
               "Update-MDBSubnetGroup",
               "Update-MDBUser")
}

_awsArgumentCompleterRegistration $MDB_SelectCompleters $MDB_SelectMap
# Argument completions for service AWS Marketplace Metering


$MM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MM_SelectMap = @{
    "Select"=@("Send-MMMeteringDataBatch",
               "Send-MMMeteringData",
               "Register-MMUsage",
               "Get-MMCustomerMetadata")
}

_awsArgumentCompleterRegistration $MM_SelectCompleters $MM_SelectMap
# Argument completions for service Application Migration Service


$MGN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Mgn.ActionCategory
        {
            ($_ -eq "Write-MGNSourceServerAction/Category") -Or
            ($_ -eq "Write-MGNTemplateAction/Category")
        }
        {
            $v = "BACKUP","CONFIGURATION","DISASTER_RECOVERY","LICENSE_AND_SUBSCRIPTION","NETWORKING","OBSERVABILITY","OPERATING_SYSTEM","OTHER","REFACTORING","SECURITY","VALIDATION"
            break
        }

        # Amazon.Mgn.BootMode
        {
            ($_ -eq "New-MGNLaunchConfigurationTemplate/BootMode") -Or
            ($_ -eq "Update-MGNLaunchConfiguration/BootMode") -Or
            ($_ -eq "Update-MGNLaunchConfigurationTemplate/BootMode")
        }
        {
            $v = "LEGACY_BIOS","UEFI","USE_SOURCE"
            break
        }

        # Amazon.Mgn.ChangeServerLifeCycleStateSourceServerLifecycleState
        "Set-MGNServerLifeCycleState/LifeCycle_State"
        {
            $v = "CUTOVER","READY_FOR_CUTOVER","READY_FOR_TEST"
            break
        }

        # Amazon.Mgn.LaunchDisposition
        {
            ($_ -eq "New-MGNLaunchConfigurationTemplate/LaunchDisposition") -Or
            ($_ -eq "Update-MGNLaunchConfiguration/LaunchDisposition") -Or
            ($_ -eq "Update-MGNLaunchConfigurationTemplate/LaunchDisposition")
        }
        {
            $v = "STARTED","STOPPED"
            break
        }

        # Amazon.Mgn.PostLaunchActionsDeploymentType
        {
            ($_ -eq "New-MGNLaunchConfigurationTemplate/PostLaunchActions_Deployment") -Or
            ($_ -eq "Update-MGNLaunchConfiguration/PostLaunchActions_Deployment") -Or
            ($_ -eq "Update-MGNLaunchConfigurationTemplate/PostLaunchActions_Deployment")
        }
        {
            $v = "CUTOVER_ONLY","TEST_AND_CUTOVER","TEST_ONLY"
            break
        }

        # Amazon.Mgn.ReplicationConfigurationDataPlaneRouting
        {
            ($_ -eq "New-MGNReplicationConfigurationTemplate/DataPlaneRouting") -Or
            ($_ -eq "Update-MGNReplicationConfiguration/DataPlaneRouting") -Or
            ($_ -eq "Update-MGNReplicationConfigurationTemplate/DataPlaneRouting")
        }
        {
            $v = "PRIVATE_IP","PUBLIC_IP"
            break
        }

        # Amazon.Mgn.ReplicationConfigurationDefaultLargeStagingDiskType
        {
            ($_ -eq "New-MGNReplicationConfigurationTemplate/DefaultLargeStagingDiskType") -Or
            ($_ -eq "Update-MGNReplicationConfiguration/DefaultLargeStagingDiskType") -Or
            ($_ -eq "Update-MGNReplicationConfigurationTemplate/DefaultLargeStagingDiskType")
        }
        {
            $v = "GP2","GP3","ST1"
            break
        }

        # Amazon.Mgn.ReplicationConfigurationEbsEncryption
        {
            ($_ -eq "New-MGNReplicationConfigurationTemplate/EbsEncryption") -Or
            ($_ -eq "Update-MGNReplicationConfiguration/EbsEncryption") -Or
            ($_ -eq "Update-MGNReplicationConfigurationTemplate/EbsEncryption")
        }
        {
            $v = "CUSTOM","DEFAULT"
            break
        }

        # Amazon.Mgn.ReplicationType
        "Update-MGNSourceServerReplicationType/ReplicationType"
        {
            $v = "AGENT_BASED","SNAPSHOT_SHIPPING"
            break
        }

        # Amazon.Mgn.TargetInstanceTypeRightSizingMethod
        {
            ($_ -eq "New-MGNLaunchConfigurationTemplate/TargetInstanceTypeRightSizingMethod") -Or
            ($_ -eq "Update-MGNLaunchConfiguration/TargetInstanceTypeRightSizingMethod") -Or
            ($_ -eq "Update-MGNLaunchConfigurationTemplate/TargetInstanceTypeRightSizingMethod")
        }
        {
            $v = "BASIC","NONE"
            break
        }

        # Amazon.Mgn.VolumeType
        {
            ($_ -eq "New-MGNLaunchConfigurationTemplate/LargeVolumeConf_VolumeType") -Or
            ($_ -eq "Update-MGNLaunchConfigurationTemplate/LargeVolumeConf_VolumeType") -Or
            ($_ -eq "New-MGNLaunchConfigurationTemplate/SmallVolumeConf_VolumeType") -Or
            ($_ -eq "Update-MGNLaunchConfigurationTemplate/SmallVolumeConf_VolumeType")
        }
        {
            $v = "gp2","gp3","io1","io2","sc1","st1","standard"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MGN_map = @{
    "BootMode"=@("New-MGNLaunchConfigurationTemplate","Update-MGNLaunchConfiguration","Update-MGNLaunchConfigurationTemplate")
    "Category"=@("Write-MGNSourceServerAction","Write-MGNTemplateAction")
    "DataPlaneRouting"=@("New-MGNReplicationConfigurationTemplate","Update-MGNReplicationConfiguration","Update-MGNReplicationConfigurationTemplate")
    "DefaultLargeStagingDiskType"=@("New-MGNReplicationConfigurationTemplate","Update-MGNReplicationConfiguration","Update-MGNReplicationConfigurationTemplate")
    "EbsEncryption"=@("New-MGNReplicationConfigurationTemplate","Update-MGNReplicationConfiguration","Update-MGNReplicationConfigurationTemplate")
    "LargeVolumeConf_VolumeType"=@("New-MGNLaunchConfigurationTemplate","Update-MGNLaunchConfigurationTemplate")
    "LaunchDisposition"=@("New-MGNLaunchConfigurationTemplate","Update-MGNLaunchConfiguration","Update-MGNLaunchConfigurationTemplate")
    "LifeCycle_State"=@("Set-MGNServerLifeCycleState")
    "PostLaunchActions_Deployment"=@("New-MGNLaunchConfigurationTemplate","Update-MGNLaunchConfiguration","Update-MGNLaunchConfigurationTemplate")
    "ReplicationType"=@("Update-MGNSourceServerReplicationType")
    "SmallVolumeConf_VolumeType"=@("New-MGNLaunchConfigurationTemplate","Update-MGNLaunchConfigurationTemplate")
    "TargetInstanceTypeRightSizingMethod"=@("New-MGNLaunchConfigurationTemplate","Update-MGNLaunchConfiguration","Update-MGNLaunchConfigurationTemplate")
}

_awsArgumentCompleterRegistration $MGN_Completers $MGN_map

$MGN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MGN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MGN_SelectMap = @{
    "Select"=@("Set-MGNApplicationAsArchived",
               "Set-MGNWaveAsArchived",
               "Add-MGNApplicationsToWave",
               "Add-MGNSourceServersToApplication",
               "Set-MGNServerLifeCycleState",
               "New-MGNApplication",
               "New-MGNConnector",
               "New-MGNLaunchConfigurationTemplate",
               "New-MGNReplicationConfigurationTemplate",
               "New-MGNWave",
               "Remove-MGNApplication",
               "Remove-MGNConnector",
               "Remove-MGNJob",
               "Remove-MGNLaunchConfigurationTemplate",
               "Remove-MGNReplicationConfigurationTemplate",
               "Remove-MGNSourceServer",
               "Remove-MGNVcenterClient",
               "Remove-MGNWave",
               "Get-MGNJobLogItem",
               "Get-MGNJob",
               "Get-MGNLaunchConfigurationTemplate",
               "Get-MGNReplicationConfigurationTemplate",
               "Get-MGNSourceServer",
               "Get-MGNVcenterClient",
               "Remove-MGNApplicationsFromWave",
               "Remove-MGNSourceServersFromApplication",
               "Disconnect-MGNFromService",
               "Complete-MGNCutover",
               "Get-MGNLaunchConfiguration",
               "Get-MGNReplicationConfiguration",
               "Initialize-MGNService",
               "Get-MGNApplicationList",
               "Get-MGNConnectorList",
               "Get-MGNExportErrorList",
               "Get-MGNExportList",
               "Get-MGNImportErrorList",
               "Get-MGNImportList",
               "Get-MGNManagedAccountList",
               "Get-MGNSourceServerActionList",
               "Get-MGNResourceTag",
               "Get-MGNTemplateActionList",
               "Get-MGNWaveList",
               "Set-MGNAsArchived",
               "Suspend-MGNReplication",
               "Write-MGNSourceServerAction",
               "Write-MGNTemplateAction",
               "Remove-MGNSourceServerAction",
               "Remove-MGNTemplateAction",
               "Resume-MGNReplication",
               "Resume-MGNDataReplication",
               "Start-MGNCutover",
               "Start-MGNExport",
               "Start-MGNImport",
               "Start-MGNReplication",
               "Start-MGNTest",
               "Stop-MGNReplication",
               "Add-MGNResourceTag",
               "Remove-MGNTargetInstance",
               "Set-MGNApplicationAsUnarchived",
               "Set-MGNWaveAsUnarchived",
               "Remove-MGNResourceTag",
               "Update-MGNApplication",
               "Update-MGNConnector",
               "Update-MGNLaunchConfiguration",
               "Update-MGNLaunchConfigurationTemplate",
               "Update-MGNReplicationConfiguration",
               "Update-MGNReplicationConfigurationTemplate",
               "Update-MGNSourceServer",
               "Update-MGNSourceServerReplicationType",
               "Update-MGNWave")
}

_awsArgumentCompleterRegistration $MGN_SelectCompleters $MGN_SelectMap
# Argument completions for service AWS Migration Hub Config


$MHC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MigrationHubConfig.TargetType
        {
            ($_ -eq "Get-MHCHomeRegionControl/Target_Type") -Or
            ($_ -eq "New-MHCHomeRegionControl/Target_Type")
        }
        {
            $v = "ACCOUNT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MHC_map = @{
    "Target_Type"=@("Get-MHCHomeRegionControl","New-MHCHomeRegionControl")
}

_awsArgumentCompleterRegistration $MHC_Completers $MHC_map

$MHC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MHC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MHC_SelectMap = @{
    "Select"=@("New-MHCHomeRegionControl",
               "Remove-MHCHomeRegionControl",
               "Get-MHCHomeRegionControl",
               "Get-MHCHomeRegion")
}

_awsArgumentCompleterRegistration $MHC_SelectCompleters $MHC_SelectMap
# Argument completions for service AWS Migration Hub Orchestrator


$MHO_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MigrationHubOrchestrator.MigrationWorkflowStatusEnum
        "Get-MHOWorkflowList/Status"
        {
            $v = "COMPLETED","CREATING","CREATION_FAILED","DELETED","DELETING","DELETION_FAILED","IN_PROGRESS","NOT_STARTED","PAUSED","PAUSING","PAUSING_FAILED","STARTING","USER_ATTENTION_REQUIRED","WORKFLOW_FAILED"
            break
        }

        # Amazon.MigrationHubOrchestrator.RunEnvironment
        {
            ($_ -eq "New-MHOWorkflowStep/WorkflowStepAutomationConfiguration_RunEnvironment") -Or
            ($_ -eq "Update-MHOWorkflowStep/WorkflowStepAutomationConfiguration_RunEnvironment")
        }
        {
            $v = "AWS","ONPREMISE"
            break
        }

        # Amazon.MigrationHubOrchestrator.StepActionType
        {
            ($_ -eq "New-MHOWorkflowStep/StepActionType") -Or
            ($_ -eq "Update-MHOWorkflowStep/StepActionType")
        }
        {
            $v = "AUTOMATED","MANUAL"
            break
        }

        # Amazon.MigrationHubOrchestrator.StepStatus
        "Update-MHOWorkflowStep/Status"
        {
            $v = "AWAITING_DEPENDENCIES","COMPLETED","FAILED","IN_PROGRESS","PAUSED","READY","SKIPPED","USER_ATTENTION_REQUIRED"
            break
        }

        # Amazon.MigrationHubOrchestrator.TargetType
        {
            ($_ -eq "New-MHOWorkflowStep/WorkflowStepAutomationConfiguration_TargetType") -Or
            ($_ -eq "Update-MHOWorkflowStep/WorkflowStepAutomationConfiguration_TargetType")
        }
        {
            $v = "ALL","NONE","SINGLE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MHO_map = @{
    "Status"=@("Get-MHOWorkflowList","Update-MHOWorkflowStep")
    "StepActionType"=@("New-MHOWorkflowStep","Update-MHOWorkflowStep")
    "WorkflowStepAutomationConfiguration_RunEnvironment"=@("New-MHOWorkflowStep","Update-MHOWorkflowStep")
    "WorkflowStepAutomationConfiguration_TargetType"=@("New-MHOWorkflowStep","Update-MHOWorkflowStep")
}

_awsArgumentCompleterRegistration $MHO_Completers $MHO_map

$MHO_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MHO.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MHO_SelectMap = @{
    "Select"=@("New-MHOTemplate",
               "New-MHOWorkflow",
               "New-MHOWorkflowStep",
               "New-MHOWorkflowStepGroup",
               "Remove-MHOTemplate",
               "Remove-MHOWorkflow",
               "Remove-MHOWorkflowStep",
               "Remove-MHOWorkflowStepGroup",
               "Get-MHOTemplate",
               "Get-MHOTemplateStep",
               "Get-MHOTemplateStepGroup",
               "Get-MHOWorkflow",
               "Get-MHOWorkflowStep",
               "Get-MHOWorkflowStepGroup",
               "Get-MHOPluginList",
               "Get-MHOResourceTag",
               "Get-MHOTemplateList",
               "Get-MHOTemplateStepGroupList",
               "Get-MHOTemplateStepList",
               "Get-MHOWorkflowList",
               "Get-MHOWorkflowStepGroupList",
               "Get-MHOWorkflowStepList",
               "Start-MHOWorkflowStep",
               "Start-MHOWorkflow",
               "Stop-MHOWorkflow",
               "Add-MHOResourceTag",
               "Remove-MHOResourceTag",
               "Update-MHOTemplate",
               "Update-MHOWorkflow",
               "Update-MHOWorkflowStep",
               "Update-MHOWorkflowStepGroup")
}

_awsArgumentCompleterRegistration $MHO_SelectCompleters $MHO_SelectMap
# Argument completions for service AWS Migration Hub Refactor Spaces


$MHRS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MigrationHubRefactorSpaces.ApiGatewayEndpointType
        "New-MHRSApplication/ApiGatewayProxy_EndpointType"
        {
            $v = "PRIVATE","REGIONAL"
            break
        }

        # Amazon.MigrationHubRefactorSpaces.NetworkFabricType
        "New-MHRSEnvironment/NetworkFabricType"
        {
            $v = "NONE","TRANSIT_GATEWAY"
            break
        }

        # Amazon.MigrationHubRefactorSpaces.ProxyType
        "New-MHRSApplication/ProxyType"
        {
            $v = "API_GATEWAY"
            break
        }

        # Amazon.MigrationHubRefactorSpaces.RouteActivationState
        {
            ($_ -eq "Update-MHRSRoute/ActivationState") -Or
            ($_ -eq "New-MHRSRoute/DefaultRoute_ActivationState") -Or
            ($_ -eq "New-MHRSRoute/UriPathRoute_ActivationState")
        }
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.MigrationHubRefactorSpaces.RouteType
        "New-MHRSRoute/RouteType"
        {
            $v = "DEFAULT","URI_PATH"
            break
        }

        # Amazon.MigrationHubRefactorSpaces.ServiceEndpointType
        "New-MHRSService/EndpointType"
        {
            $v = "LAMBDA","URL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MHRS_map = @{
    "ActivationState"=@("Update-MHRSRoute")
    "ApiGatewayProxy_EndpointType"=@("New-MHRSApplication")
    "DefaultRoute_ActivationState"=@("New-MHRSRoute")
    "EndpointType"=@("New-MHRSService")
    "NetworkFabricType"=@("New-MHRSEnvironment")
    "ProxyType"=@("New-MHRSApplication")
    "RouteType"=@("New-MHRSRoute")
    "UriPathRoute_ActivationState"=@("New-MHRSRoute")
}

_awsArgumentCompleterRegistration $MHRS_Completers $MHRS_map

$MHRS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MHRS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MHRS_SelectMap = @{
    "Select"=@("New-MHRSApplication",
               "New-MHRSEnvironment",
               "New-MHRSRoute",
               "New-MHRSService",
               "Remove-MHRSApplication",
               "Remove-MHRSEnvironment",
               "Remove-MHRSResourcePolicy",
               "Remove-MHRSRoute",
               "Remove-MHRSService",
               "Get-MHRSApplication",
               "Get-MHRSEnvironment",
               "Get-MHRSResourcePolicy",
               "Get-MHRSRoute",
               "Get-MHRSService",
               "Get-MHRSApplicationList",
               "Get-MHRSEnvironmentList",
               "Get-MHRSEnvironmentVpcList",
               "Get-MHRSRouteList",
               "Get-MHRSServiceList",
               "Get-MHRSResourceTag",
               "Write-MHRSResourcePolicy",
               "Add-MHRSResourceTag",
               "Remove-MHRSResourceTag",
               "Update-MHRSRoute")
}

_awsArgumentCompleterRegistration $MHRS_SelectCompleters $MHRS_SelectMap
# Argument completions for service Migration Hub Strategy Recommendations


$MHS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MigrationHubStrategyRecommendations.ApplicationComponentCriteria
        "Get-MHSApplicationComponentList/ApplicationComponentCriterion"
        {
            $v = "ANALYSIS_STATUS","APP_NAME","APP_TYPE","DESTINATION","ERROR_CATEGORY","NOT_DEFINED","SERVER_ID","STRATEGY"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.ApplicationMode
        "Write-MHSPortfolioPreference/ApplicationMode"
        {
            $v = "ALL","KNOWN","UNKNOWN"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.AppType
        "Update-MHSApplicationComponentConfig/AppType"
        {
            $v = "Cassandra","DB2","Dotnet","DotnetCore","DotNetFramework","IBM WebSphere","IIS","Java","JBoss","Maria DB","Mongo DB","MySQL","Oracle","Oracle WebLogic","Other","PostgreSQLServer","Spring","SQLServer","Sybase","Tomcat","Unknown","Visual Basic"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.AssessmentDataSourceType
        "Start-MHSAssessment/AssessmentDataSourceType"
        {
            $v = "ApplicationDiscoveryService","ManualImport","StrategyRecommendationsApplicationDataCollector"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.DatabaseManagementPreference
        "Write-MHSPortfolioPreference/DatabasePreferences_DatabaseManagementPreference"
        {
            $v = "AWS-managed","No preference","Self-manage"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.DataSourceType
        "Start-MHSImportFileTask/DataSourceType"
        {
            $v = "ApplicationDiscoveryService","Import","MPA","StrategyRecommendationsApplicationDataCollector"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.InclusionStatus
        "Update-MHSApplicationComponentConfig/InclusionStatus"
        {
            $v = "excludeFromAssessment","includeInAssessment"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.OutputFormat
        "Start-MHSRecommendationReportGeneration/OutputFormat"
        {
            $v = "Excel","Json"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.ServerCriteria
        "Get-MHSServerList/ServerCriterion"
        {
            $v = "ANALYSIS_STATUS","DESTINATION","ERROR_CATEGORY","NOT_DEFINED","OS_NAME","SERVER_ID","STRATEGY"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.SortOrder
        {
            ($_ -eq "Get-MHSAnalyzableServerList/Sort") -Or
            ($_ -eq "Get-MHSApplicationComponentList/Sort") -Or
            ($_ -eq "Get-MHSServerList/Sort")
        }
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.Strategy
        {
            ($_ -eq "Update-MHSApplicationComponentConfig/StrategyOption_Strategy") -Or
            ($_ -eq "Update-MHSServerConfig/StrategyOption_Strategy")
        }
        {
            $v = "Refactor","Rehost","Relocate","Replatform","Repurchase","Retain","Retirement"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.TargetDestination
        {
            ($_ -eq "Update-MHSApplicationComponentConfig/StrategyOption_TargetDestination") -Or
            ($_ -eq "Update-MHSServerConfig/StrategyOption_TargetDestination")
        }
        {
            $v = "Amazon DocumentDB","Amazon DynamoDB","Amazon Elastic Cloud Compute (EC2)","Amazon Elastic Container Service (ECS)","Amazon Elastic Kubernetes Service (EKS)","Amazon Relational Database Service","Amazon Relational Database Service on MySQL","Amazon Relational Database Service on PostgreSQL","Aurora MySQL","Aurora PostgreSQL","AWS Elastic BeanStalk","AWS Fargate","Babelfish for Aurora PostgreSQL","None specified"
            break
        }

        # Amazon.MigrationHubStrategyRecommendations.TransformationToolName
        {
            ($_ -eq "Update-MHSApplicationComponentConfig/StrategyOption_ToolName") -Or
            ($_ -eq "Update-MHSServerConfig/StrategyOption_ToolName")
        }
        {
            $v = "App2Container","Application Migration Service","Database Migration Service","End of Support Migration","In Place Operating System Upgrade","Native SQL Server Backup/Restore","Porting Assistant For .NET","Schema Conversion Tool","Strategy Recommendation Support","Windows Web Application Migration Assistant"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MHS_map = @{
    "ApplicationComponentCriterion"=@("Get-MHSApplicationComponentList")
    "ApplicationMode"=@("Write-MHSPortfolioPreference")
    "AppType"=@("Update-MHSApplicationComponentConfig")
    "AssessmentDataSourceType"=@("Start-MHSAssessment")
    "DatabasePreferences_DatabaseManagementPreference"=@("Write-MHSPortfolioPreference")
    "DataSourceType"=@("Start-MHSImportFileTask")
    "InclusionStatus"=@("Update-MHSApplicationComponentConfig")
    "OutputFormat"=@("Start-MHSRecommendationReportGeneration")
    "ServerCriterion"=@("Get-MHSServerList")
    "Sort"=@("Get-MHSAnalyzableServerList","Get-MHSApplicationComponentList","Get-MHSServerList")
    "StrategyOption_Strategy"=@("Update-MHSApplicationComponentConfig","Update-MHSServerConfig")
    "StrategyOption_TargetDestination"=@("Update-MHSApplicationComponentConfig","Update-MHSServerConfig")
    "StrategyOption_ToolName"=@("Update-MHSApplicationComponentConfig","Update-MHSServerConfig")
}

_awsArgumentCompleterRegistration $MHS_Completers $MHS_map

$MHS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MHS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MHS_SelectMap = @{
    "Select"=@("Get-MHSApplicationComponentDetail",
               "Get-MHSApplicationComponentStrategy",
               "Get-MHSAssessment",
               "Get-MHSImportFileTask",
               "Get-MHSLatestAssessmentId",
               "Get-MHSPortfolioPreference",
               "Get-MHSPortfolioSummary",
               "Get-MHSRecommendationReportDetail",
               "Get-MHSServerDetail",
               "Get-MHSServerStrategy",
               "Get-MHSAnalyzableServerList",
               "Get-MHSApplicationComponentList",
               "Get-MHSCollectorList",
               "Get-MHSImportFileTaskList",
               "Get-MHSServerList",
               "Write-MHSPortfolioPreference",
               "Start-MHSAssessment",
               "Start-MHSImportFileTask",
               "Start-MHSRecommendationReportGeneration",
               "Stop-MHSAssessment",
               "Update-MHSApplicationComponentConfig",
               "Update-MHSServerConfig")
}

_awsArgumentCompleterRegistration $MHS_SelectCompleters $MHS_SelectMap
# Argument completions for service Amazon Lex Model Building V2


$LMBV2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.LexModelsV2.AggregatedUtterancesSortAttribute
        "Get-LMBV2AggregatedUtteranceList/SortBy_Attribute"
        {
            $v = "HitCount","MissedCount"
            break
        }

        # Amazon.LexModelsV2.AnalyticsSessionSortByName
        "Get-LMBV2SessionAnalyticsDataList/SortBy_Name"
        {
            $v = "ConversationStartTime","Duration","NumberOfTurns"
            break
        }

        # Amazon.LexModelsV2.AnalyticsSortOrder
        {
            ($_ -eq "Get-LMBV2SessionAnalyticsDataList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2UtteranceAnalyticsDataList/SortBy_Order")
        }
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.LexModelsV2.AnalyticsUtteranceSortByName
        "Get-LMBV2UtteranceAnalyticsDataList/SortBy_Name"
        {
            $v = "UtteranceTimestamp"
            break
        }

        # Amazon.LexModelsV2.AudioRecognitionStrategy
        {
            ($_ -eq "New-LMBV2SlotType/AdvancedRecognitionSetting_AudioRecognitionStrategy") -Or
            ($_ -eq "Update-LMBV2SlotType/AdvancedRecognitionSetting_AudioRecognitionStrategy")
        }
        {
            $v = "UseSlotValuesAsCustomVocabulary"
            break
        }

        # Amazon.LexModelsV2.BedrockTraceStatus
        {
            ($_ -eq "New-LMBV2Intent/BedrockModelConfiguration_TraceStatus") -Or
            ($_ -eq "Update-LMBV2Intent/BedrockModelConfiguration_TraceStatus") -Or
            ($_ -eq "New-LMBV2BotLocale/GenerativeAISettings_BuildtimeSettings_DescriptiveBotBuilder_BedrockModelSpecification_TraceStatus") -Or
            ($_ -eq "Update-LMBV2BotLocale/GenerativeAISettings_BuildtimeSettings_DescriptiveBotBuilder_BedrockModelSpecification_TraceStatus") -Or
            ($_ -eq "New-LMBV2BotLocale/GenerativeAISettings_BuildtimeSettings_SampleUtteranceGeneration_BedrockModelSpecification_TraceStatus") -Or
            ($_ -eq "Update-LMBV2BotLocale/GenerativeAISettings_BuildtimeSettings_SampleUtteranceGeneration_BedrockModelSpecification_TraceStatus") -Or
            ($_ -eq "New-LMBV2BotLocale/GenerativeAISettings_RuntimeSettings_SlotResolutionImprovement_BedrockModelSpecification_TraceStatus") -Or
            ($_ -eq "Update-LMBV2BotLocale/GenerativeAISettings_RuntimeSettings_SlotResolutionImprovement_BedrockModelSpecification_TraceStatus")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.LexModelsV2.BotLocaleSortAttribute
        "Get-LMBV2BotLocaleList/SortBy_Attribute"
        {
            $v = "BotLocaleName"
            break
        }

        # Amazon.LexModelsV2.BotSortAttribute
        "Get-LMBV2BotList/SortBy_Attribute"
        {
            $v = "BotName"
            break
        }

        # Amazon.LexModelsV2.BotType
        {
            ($_ -eq "New-LMBV2Bot/BotType") -Or
            ($_ -eq "Update-LMBV2Bot/BotType")
        }
        {
            $v = "Bot","BotNetwork"
            break
        }

        # Amazon.LexModelsV2.BotVersionReplicaSortAttribute
        "Get-LMBV2BotVersionReplicaList/SortBy_Attribute"
        {
            $v = "BotVersion"
            break
        }

        # Amazon.LexModelsV2.BotVersionSortAttribute
        "Get-LMBV2BotVersionList/SortBy_Attribute"
        {
            $v = "BotVersion"
            break
        }

        # Amazon.LexModelsV2.BuiltInIntentSortAttribute
        "Get-LMBV2BuiltInIntentList/SortBy_Attribute"
        {
            $v = "IntentSignature"
            break
        }

        # Amazon.LexModelsV2.BuiltInSlotTypeSortAttribute
        "Get-LMBV2BuiltInSlotTypeList/SortBy_Attribute"
        {
            $v = "SlotTypeSignature"
            break
        }

        # Amazon.LexModelsV2.ConversationLogsInputModeFilter
        "Start-LMBV2TestSetGeneration/Filter_InputMode"
        {
            $v = "Speech","Text"
            break
        }

        # Amazon.LexModelsV2.DialogActionType
        {
            ($_ -eq "New-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_SuccessNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_SuccessNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_TimeoutNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/FulfillmentCodeHook_PostFulfillmentStatusSpecification_TimeoutNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_SuccessNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_SuccessNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_TimeoutNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/InitialResponseSetting_CodeHook_PostCodeHookSpecification_TimeoutNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/InitialResponseSetting_Conditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/InitialResponseSetting_Conditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/InitialResponseSetting_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/InitialResponseSetting_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentClosingSetting_Conditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentClosingSetting_Conditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentClosingSetting_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentClosingSetting_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_SuccessNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_SuccessNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_TimeoutNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_TimeoutNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_ConfirmationConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_ConfirmationConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_ConfirmationNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_ConfirmationNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_DeclinationConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_DeclinationConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_DeclinationNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_DeclinationNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Intent/IntentConfirmationSetting_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Intent/IntentConfirmationSetting_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CaptureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CaptureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CaptureNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CaptureNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_SuccessNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_SuccessNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_TimeoutNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_TimeoutNextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_FailureConditional_DefaultBranch_NextStep_DialogAction_Type") -Or
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_FailureNextStep_DialogAction_Type") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotCaptureSetting_FailureNextStep_DialogAction_Type")
        }
        {
            $v = "CloseIntent","ConfirmIntent","ElicitIntent","ElicitSlot","EndConversation","EvaluateConditional","FulfillIntent","InvokeDialogCodeHook","StartIntent"
            break
        }

        # Amazon.LexModelsV2.Effect
        "New-LMBV2ResourcePolicyStatement/Effect"
        {
            $v = "Allow","Deny"
            break
        }

        # Amazon.LexModelsV2.ExportSortAttribute
        "Get-LMBV2ExportList/SortBy_Attribute"
        {
            $v = "LastUpdatedDateTime"
            break
        }

        # Amazon.LexModelsV2.GenerationSortByAttribute
        "Get-LMBV2BotResourceGenerationList/SortBy_Attribute"
        {
            $v = "creationStartTime","lastUpdatedTime"
            break
        }

        # Amazon.LexModelsV2.ImportExportFileFormat
        "New-LMBV2Export/FileFormat"
        {
            $v = "CSV","LexJson","TSV"
            break
        }

        # Amazon.LexModelsV2.ImportSortAttribute
        "Get-LMBV2ImportList/SortBy_Attribute"
        {
            $v = "LastUpdatedDateTime"
            break
        }

        # Amazon.LexModelsV2.IntentSortAttribute
        "Get-LMBV2IntentList/SortBy_Attribute"
        {
            $v = "IntentName","LastUpdatedDateTime"
            break
        }

        # Amazon.LexModelsV2.MergeStrategy
        "Start-LMBV2Import/MergeStrategy"
        {
            $v = "Append","FailOnConflict","Overwrite"
            break
        }

        # Amazon.LexModelsV2.MessageSelectionStrategy
        {
            ($_ -eq "New-LMBV2Intent/PromptSpecification_MessageSelectionStrategy") -Or
            ($_ -eq "New-LMBV2Slot/PromptSpecification_MessageSelectionStrategy") -Or
            ($_ -eq "Update-LMBV2Intent/PromptSpecification_MessageSelectionStrategy") -Or
            ($_ -eq "Update-LMBV2Slot/PromptSpecification_MessageSelectionStrategy")
        }
        {
            $v = "Ordered","Random"
            break
        }

        # Amazon.LexModelsV2.ObfuscationSettingType
        {
            ($_ -eq "New-LMBV2Slot/ObfuscationSetting_ObfuscationSettingType") -Or
            ($_ -eq "Update-LMBV2Slot/ObfuscationSetting_ObfuscationSettingType")
        }
        {
            $v = "DefaultObfuscation","None"
            break
        }

        # Amazon.LexModelsV2.SearchOrder
        "Search-LMBV2AssociatedTranscript/SearchOrder"
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.LexModelsV2.SlotConstraint
        {
            ($_ -eq "New-LMBV2Slot/ValueElicitationSetting_SlotConstraint") -Or
            ($_ -eq "Update-LMBV2Slot/ValueElicitationSetting_SlotConstraint")
        }
        {
            $v = "Optional","Required"
            break
        }

        # Amazon.LexModelsV2.SlotResolutionStrategy
        {
            ($_ -eq "New-LMBV2Slot/SlotResolutionSetting_SlotResolutionStrategy") -Or
            ($_ -eq "Update-LMBV2Slot/SlotResolutionSetting_SlotResolutionStrategy")
        }
        {
            $v = "Default","EnhancedFallback"
            break
        }

        # Amazon.LexModelsV2.SlotSortAttribute
        "Get-LMBV2SlotList/SortBy_Attribute"
        {
            $v = "LastUpdatedDateTime","SlotName"
            break
        }

        # Amazon.LexModelsV2.SlotTypeSortAttribute
        "Get-LMBV2SlotTypeList/SortBy_Attribute"
        {
            $v = "LastUpdatedDateTime","SlotTypeName"
            break
        }

        # Amazon.LexModelsV2.SlotValueResolutionStrategy
        {
            ($_ -eq "New-LMBV2SlotType/ValueSelectionSetting_ResolutionStrategy") -Or
            ($_ -eq "Update-LMBV2SlotType/ValueSelectionSetting_ResolutionStrategy")
        }
        {
            $v = "Concatenation","OriginalValue","TopResolution"
            break
        }

        # Amazon.LexModelsV2.SortOrder
        {
            ($_ -eq "Get-LMBV2AggregatedUtteranceList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2BotList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2BotLocaleList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2BotResourceGenerationList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2BotVersionList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2BotVersionReplicaList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2BuiltInIntentList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2BuiltInSlotTypeList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2ExportList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2ImportList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2IntentList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2SlotList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2SlotTypeList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2TestExecutionList/SortBy_Order") -Or
            ($_ -eq "Get-LMBV2TestSetList/SortBy_Order")
        }
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.LexModelsV2.TestExecutionApiMode
        "Start-LMBV2TestExecution/ApiMode"
        {
            $v = "NonStreaming","Streaming"
            break
        }

        # Amazon.LexModelsV2.TestExecutionModality
        "Start-LMBV2TestExecution/TestExecutionModality"
        {
            $v = "Audio","Text"
            break
        }

        # Amazon.LexModelsV2.TestExecutionSortAttribute
        "Get-LMBV2TestExecutionList/SortBy_Attribute"
        {
            $v = "CreationDateTime","TestSetName"
            break
        }

        # Amazon.LexModelsV2.TestResultMatchStatus
        "Get-LMBV2TestExecutionResultItemList/ConversationLevelTestResultsFilterBy_EndToEndResult"
        {
            $v = "ExecutionError","Matched","Mismatched"
            break
        }

        # Amazon.LexModelsV2.TestResultTypeFilter
        "Get-LMBV2TestExecutionResultItemList/ResultFilterBy_ResultTypeFilter"
        {
            $v = "ConversationLevelTestResults","IntentClassificationTestResults","OverallTestResults","SlotResolutionTestResults","UtteranceLevelResults"
            break
        }

        # Amazon.LexModelsV2.TestSetModality
        "Start-LMBV2Import/TestSetImportResourceSpecification_Modality"
        {
            $v = "Audio","Text"
            break
        }

        # Amazon.LexModelsV2.TestSetSortAttribute
        "Get-LMBV2TestSetList/SortBy_Attribute"
        {
            $v = "LastUpdatedDateTime","TestSetName"
            break
        }

        # Amazon.LexModelsV2.TimeDimension
        "Get-LMBV2AggregatedUtteranceList/RelativeAggregationDuration_TimeDimension"
        {
            $v = "Days","Hours","Weeks"
            break
        }

        # Amazon.LexModelsV2.TranscriptFormat
        "Start-LMBV2BotRecommendation/S3BucketTranscriptSource_TranscriptFormat"
        {
            $v = "Lex"
            break
        }

        # Amazon.LexModelsV2.VoiceEngine
        {
            ($_ -eq "New-LMBV2BotLocale/VoiceSettings_Engine") -Or
            ($_ -eq "Start-LMBV2Import/VoiceSettings_Engine") -Or
            ($_ -eq "Update-LMBV2BotLocale/VoiceSettings_Engine")
        }
        {
            $v = "generative","long-form","neural","standard"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LMBV2_map = @{
    "AdvancedRecognitionSetting_AudioRecognitionStrategy"=@("New-LMBV2SlotType","Update-LMBV2SlotType")
    "ApiMode"=@("Start-LMBV2TestExecution")
    "BedrockModelConfiguration_TraceStatus"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "BotType"=@("New-LMBV2Bot","Update-LMBV2Bot")
    "ConversationLevelTestResultsFilterBy_EndToEndResult"=@("Get-LMBV2TestExecutionResultItemList")
    "Effect"=@("New-LMBV2ResourcePolicyStatement")
    "FileFormat"=@("New-LMBV2Export")
    "Filter_InputMode"=@("Start-LMBV2TestSetGeneration")
    "FulfillmentCodeHook_PostFulfillmentStatusSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "FulfillmentCodeHook_PostFulfillmentStatusSpecification_FailureNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "FulfillmentCodeHook_PostFulfillmentStatusSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "FulfillmentCodeHook_PostFulfillmentStatusSpecification_SuccessNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "FulfillmentCodeHook_PostFulfillmentStatusSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "FulfillmentCodeHook_PostFulfillmentStatusSpecification_TimeoutNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "GenerativeAISettings_BuildtimeSettings_DescriptiveBotBuilder_BedrockModelSpecification_TraceStatus"=@("New-LMBV2BotLocale","Update-LMBV2BotLocale")
    "GenerativeAISettings_BuildtimeSettings_SampleUtteranceGeneration_BedrockModelSpecification_TraceStatus"=@("New-LMBV2BotLocale","Update-LMBV2BotLocale")
    "GenerativeAISettings_RuntimeSettings_SlotResolutionImprovement_BedrockModelSpecification_TraceStatus"=@("New-LMBV2BotLocale","Update-LMBV2BotLocale")
    "InitialResponseSetting_CodeHook_PostCodeHookSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "InitialResponseSetting_CodeHook_PostCodeHookSpecification_FailureNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "InitialResponseSetting_CodeHook_PostCodeHookSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "InitialResponseSetting_CodeHook_PostCodeHookSpecification_SuccessNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "InitialResponseSetting_CodeHook_PostCodeHookSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "InitialResponseSetting_CodeHook_PostCodeHookSpecification_TimeoutNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "InitialResponseSetting_Conditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "InitialResponseSetting_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentClosingSetting_Conditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentClosingSetting_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_FailureNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_SuccessNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_CodeHook_PostCodeHookSpecification_TimeoutNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_ConfirmationConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_ConfirmationNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_DeclinationConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_DeclinationNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_FailureConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "IntentConfirmationSetting_FailureNextStep_DialogAction_Type"=@("New-LMBV2Intent","Update-LMBV2Intent")
    "MergeStrategy"=@("Start-LMBV2Import")
    "ObfuscationSetting_ObfuscationSettingType"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "PromptSpecification_MessageSelectionStrategy"=@("New-LMBV2Intent","New-LMBV2Slot","Update-LMBV2Intent","Update-LMBV2Slot")
    "RelativeAggregationDuration_TimeDimension"=@("Get-LMBV2AggregatedUtteranceList")
    "ResultFilterBy_ResultTypeFilter"=@("Get-LMBV2TestExecutionResultItemList")
    "S3BucketTranscriptSource_TranscriptFormat"=@("Start-LMBV2BotRecommendation")
    "SearchOrder"=@("Search-LMBV2AssociatedTranscript")
    "SlotResolutionSetting_SlotResolutionStrategy"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "SortBy_Attribute"=@("Get-LMBV2AggregatedUtteranceList","Get-LMBV2BotList","Get-LMBV2BotLocaleList","Get-LMBV2BotResourceGenerationList","Get-LMBV2BotVersionList","Get-LMBV2BotVersionReplicaList","Get-LMBV2BuiltInIntentList","Get-LMBV2BuiltInSlotTypeList","Get-LMBV2ExportList","Get-LMBV2ImportList","Get-LMBV2IntentList","Get-LMBV2SlotList","Get-LMBV2SlotTypeList","Get-LMBV2TestExecutionList","Get-LMBV2TestSetList")
    "SortBy_Name"=@("Get-LMBV2SessionAnalyticsDataList","Get-LMBV2UtteranceAnalyticsDataList")
    "SortBy_Order"=@("Get-LMBV2AggregatedUtteranceList","Get-LMBV2BotList","Get-LMBV2BotLocaleList","Get-LMBV2BotResourceGenerationList","Get-LMBV2BotVersionList","Get-LMBV2BotVersionReplicaList","Get-LMBV2BuiltInIntentList","Get-LMBV2BuiltInSlotTypeList","Get-LMBV2ExportList","Get-LMBV2ImportList","Get-LMBV2IntentList","Get-LMBV2SessionAnalyticsDataList","Get-LMBV2SlotList","Get-LMBV2SlotTypeList","Get-LMBV2TestExecutionList","Get-LMBV2TestSetList","Get-LMBV2UtteranceAnalyticsDataList")
    "TestExecutionModality"=@("Start-LMBV2TestExecution")
    "TestSetImportResourceSpecification_Modality"=@("Start-LMBV2Import")
    "ValueElicitationSetting_SlotCaptureSetting_CaptureConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueElicitationSetting_SlotCaptureSetting_CaptureNextStep_DialogAction_Type"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_FailureConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_FailureNextStep_DialogAction_Type"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_SuccessConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_SuccessNextStep_DialogAction_Type"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_TimeoutConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueElicitationSetting_SlotCaptureSetting_CodeHook_PostCodeHookSpecification_TimeoutNextStep_DialogAction_Type"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueElicitationSetting_SlotCaptureSetting_FailureConditional_DefaultBranch_NextStep_DialogAction_Type"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueElicitationSetting_SlotCaptureSetting_FailureNextStep_DialogAction_Type"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueElicitationSetting_SlotConstraint"=@("New-LMBV2Slot","Update-LMBV2Slot")
    "ValueSelectionSetting_ResolutionStrategy"=@("New-LMBV2SlotType","Update-LMBV2SlotType")
    "VoiceSettings_Engine"=@("New-LMBV2BotLocale","Start-LMBV2Import","Update-LMBV2BotLocale")
}

_awsArgumentCompleterRegistration $LMBV2_Completers $LMBV2_map

$LMBV2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LMBV2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LMBV2_SelectMap = @{
    "Select"=@("New-LMBV2CustomVocabularyItem",
               "Remove-LMBV2CustomVocabularyItem",
               "Edit-LMBV2CustomVocabularyItem",
               "Invoke-LMBV2BuildBotLocale",
               "New-LMBV2Bot",
               "New-LMBV2BotAlias",
               "New-LMBV2BotLocale",
               "New-LMBV2BotReplica",
               "New-LMBV2BotVersion",
               "New-LMBV2Export",
               "New-LMBV2Intent",
               "New-LMBV2ResourcePolicy",
               "New-LMBV2ResourcePolicyStatement",
               "New-LMBV2Slot",
               "New-LMBV2SlotType",
               "New-LMBV2TestSetDiscrepancyReport",
               "New-LMBV2UploadUrl",
               "Remove-LMBV2Bot",
               "Remove-LMBV2BotAlias",
               "Remove-LMBV2BotLocale",
               "Remove-LMBV2BotReplica",
               "Remove-LMBV2BotVersion",
               "Remove-LMBV2CustomVocabulary",
               "Remove-LMBV2Export",
               "Remove-LMBV2Import",
               "Remove-LMBV2Intent",
               "Remove-LMBV2ResourcePolicy",
               "Remove-LMBV2ResourcePolicyStatement",
               "Remove-LMBV2Slot",
               "Remove-LMBV2SlotType",
               "Remove-LMBV2TestSet",
               "Remove-LMBV2Utterance",
               "Get-LMBV2Bot",
               "Get-LMBV2BotAlias",
               "Get-LMBV2BotLocale",
               "Get-LMBV2BotRecommendation",
               "Get-LMBV2BotReplica",
               "Get-LMBV2BotResourceGeneration",
               "Get-LMBV2BotVersion",
               "Get-LMBV2CustomVocabularyMetadata",
               "Get-LMBV2Export",
               "Get-LMBV2Import",
               "Get-LMBV2Intent",
               "Get-LMBV2ResourcePolicy",
               "Get-LMBV2Slot",
               "Get-LMBV2SlotType",
               "Get-LMBV2TestExecution",
               "Get-LMBV2TestSet",
               "Get-LMBV2TestSetDiscrepancyReport",
               "Get-LMBV2TestSetGeneration",
               "Get-LMBV2BotElement",
               "Get-LMBV2TestExecutionArtifactsUrl",
               "Get-LMBV2AggregatedUtteranceList",
               "Get-LMBV2BotAliasList",
               "Get-LMBV2BotAliasReplicaList",
               "Get-LMBV2BotLocaleList",
               "Get-LMBV2BotRecommendationList",
               "Get-LMBV2BotReplicaList",
               "Get-LMBV2BotResourceGenerationList",
               "Get-LMBV2BotList",
               "Get-LMBV2BotVersionReplicaList",
               "Get-LMBV2BotVersionList",
               "Get-LMBV2BuiltInIntentList",
               "Get-LMBV2BuiltInSlotTypeList",
               "Get-LMBV2CustomVocabularyItemList",
               "Get-LMBV2ExportList",
               "Get-LMBV2ImportList",
               "Get-LMBV2IntentMetricList",
               "Get-LMBV2IntentPathList",
               "Get-LMBV2IntentList",
               "Get-LMBV2IntentStageMetricList",
               "Get-LMBV2RecommendedIntentList",
               "Get-LMBV2SessionAnalyticsDataList",
               "Get-LMBV2SessionMetricList",
               "Get-LMBV2SlotList",
               "Get-LMBV2SlotTypeList",
               "Get-LMBV2ResourceTag",
               "Get-LMBV2TestExecutionResultItemList",
               "Get-LMBV2TestExecutionList",
               "Get-LMBV2TestSetRecordList",
               "Get-LMBV2TestSetList",
               "Get-LMBV2UtteranceAnalyticsDataList",
               "Get-LMBV2UtteranceMetricList",
               "Search-LMBV2AssociatedTranscript",
               "Start-LMBV2BotRecommendation",
               "Start-LMBV2BotResourceGeneration",
               "Start-LMBV2Import",
               "Start-LMBV2TestExecution",
               "Start-LMBV2TestSetGeneration",
               "Stop-LMBV2BotRecommendation",
               "Add-LMBV2ResourceTag",
               "Remove-LMBV2ResourceTag",
               "Update-LMBV2Bot",
               "Update-LMBV2BotAlias",
               "Update-LMBV2BotLocale",
               "Update-LMBV2BotRecommendation",
               "Update-LMBV2Export",
               "Update-LMBV2Intent",
               "Update-LMBV2ResourcePolicy",
               "Update-LMBV2Slot",
               "Update-LMBV2SlotType",
               "Update-LMBV2TestSet")
}

_awsArgumentCompleterRegistration $LMBV2_SelectCompleters $LMBV2_SelectMap
# Argument completions for service Amazon CloudWatch


$CW_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudWatch.ComparisonOperator
        "Write-CWMetricAlarm/ComparisonOperator"
        {
            $v = "GreaterThanOrEqualToThreshold","GreaterThanThreshold","GreaterThanUpperThreshold","LessThanLowerOrGreaterThanUpperThreshold","LessThanLowerThreshold","LessThanOrEqualToThreshold","LessThanThreshold"
            break
        }

        # Amazon.CloudWatch.HistoryItemType
        "Get-CWAlarmHistory/HistoryItemType"
        {
            $v = "Action","ConfigurationUpdate","StateUpdate"
            break
        }

        # Amazon.CloudWatch.MetricStreamOutputFormat
        "Write-CWMetricStream/OutputFormat"
        {
            $v = "json","opentelemetry0.7","opentelemetry1.0"
            break
        }

        # Amazon.CloudWatch.RecentlyActive
        "Get-CWMetricList/RecentlyActive"
        {
            $v = "PT3H"
            break
        }

        # Amazon.CloudWatch.ScanBy
        {
            ($_ -eq "Get-CWAlarmHistory/ScanBy") -Or
            ($_ -eq "Get-CWMetricData/ScanBy")
        }
        {
            $v = "TimestampAscending","TimestampDescending"
            break
        }

        # Amazon.CloudWatch.StandardUnit
        {
            ($_ -eq "Get-CWAlarmForMetric/Unit") -Or
            ($_ -eq "Get-CWMetricStatistic/Unit") -Or
            ($_ -eq "Write-CWMetricAlarm/Unit")
        }
        {
            $v = "Bits","Bits/Second","Bytes","Bytes/Second","Count","Count/Second","Gigabits","Gigabits/Second","Gigabytes","Gigabytes/Second","Kilobits","Kilobits/Second","Kilobytes","Kilobytes/Second","Megabits","Megabits/Second","Megabytes","Megabytes/Second","Microseconds","Milliseconds","None","Percent","Seconds","Terabits","Terabits/Second","Terabytes","Terabytes/Second"
            break
        }

        # Amazon.CloudWatch.StateValue
        {
            ($_ -eq "Get-CWAlarm/StateValue") -Or
            ($_ -eq "Set-CWAlarmState/StateValue")
        }
        {
            $v = "ALARM","INSUFFICIENT_DATA","OK"
            break
        }

        # Amazon.CloudWatch.Statistic
        {
            ($_ -eq "Get-CWAlarmForMetric/Statistic") -Or
            ($_ -eq "Write-CWMetricAlarm/Statistic")
        }
        {
            $v = "Average","Maximum","Minimum","SampleCount","Sum"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CW_map = @{
    "ComparisonOperator"=@("Write-CWMetricAlarm")
    "HistoryItemType"=@("Get-CWAlarmHistory")
    "OutputFormat"=@("Write-CWMetricStream")
    "RecentlyActive"=@("Get-CWMetricList")
    "ScanBy"=@("Get-CWAlarmHistory","Get-CWMetricData")
    "StateValue"=@("Get-CWAlarm","Set-CWAlarmState")
    "Statistic"=@("Get-CWAlarmForMetric","Write-CWMetricAlarm")
    "Unit"=@("Get-CWAlarmForMetric","Get-CWMetricStatistic","Write-CWMetricAlarm")
}

_awsArgumentCompleterRegistration $CW_Completers $CW_map

$CW_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CW.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CW_SelectMap = @{
    "Select"=@("Remove-CWAlarm",
               "Remove-CWAnomalyDetector",
               "Remove-CWDashboard",
               "Remove-CWInsightRule",
               "Remove-CWMetricStream",
               "Get-CWAlarmHistory",
               "Get-CWAlarm",
               "Get-CWAlarmForMetric",
               "Get-CWAnomalyDetector",
               "Get-CWInsightRule",
               "Disable-CWAlarmAction",
               "Disable-CWInsightRule",
               "Enable-CWAlarmAction",
               "Enable-CWInsightRule",
               "Get-CWDashboard",
               "Get-CWInsightRuleReport",
               "Get-CWMetricData",
               "Get-CWMetricStatistic",
               "Get-CWMetricStream",
               "Get-CWMetricWidgetImage",
               "Get-CWDashboardList",
               "Get-CWManagedInsightRule",
               "Get-CWMetricList",
               "Get-CWMetricStreamList",
               "Get-CWResourceTag",
               "Write-CWAnomalyDetector",
               "Write-CWCompositeAlarm",
               "Write-CWDashboard",
               "Write-CWInsightRule",
               "Write-CWManagedInsightRule",
               "Write-CWMetricAlarm",
               "Write-CWMetricData",
               "Write-CWMetricStream",
               "Set-CWAlarmState",
               "Start-CWMetricStream",
               "Stop-CWMetricStream",
               "Add-CWResourceTag",
               "Remove-CWResourceTag")
}

_awsArgumentCompleterRegistration $CW_SelectCompleters $CW_SelectMap
# Argument completions for service Amazon MQ


$MQ_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MQ.AuthenticationStrategy
        {
            ($_ -eq "New-MQBroker/AuthenticationStrategy") -Or
            ($_ -eq "New-MQConfiguration/AuthenticationStrategy") -Or
            ($_ -eq "Update-MQBroker/AuthenticationStrategy")
        }
        {
            $v = "LDAP","SIMPLE"
            break
        }

        # Amazon.MQ.BrokerStorageType
        "New-MQBroker/StorageType"
        {
            $v = "EBS","EFS"
            break
        }

        # Amazon.MQ.DataReplicationMode
        {
            ($_ -eq "New-MQBroker/DataReplicationMode") -Or
            ($_ -eq "Update-MQBroker/DataReplicationMode")
        }
        {
            $v = "CRDR","NONE"
            break
        }

        # Amazon.MQ.DeploymentMode
        "New-MQBroker/DeploymentMode"
        {
            $v = "ACTIVE_STANDBY_MULTI_AZ","CLUSTER_MULTI_AZ","SINGLE_INSTANCE"
            break
        }

        # Amazon.MQ.EngineType
        {
            ($_ -eq "New-MQBroker/EngineType") -Or
            ($_ -eq "New-MQConfiguration/EngineType")
        }
        {
            $v = "ACTIVEMQ","RABBITMQ"
            break
        }

        # Amazon.MQ.PromoteMode
        "Invoke-MQPromote/Mode"
        {
            $v = "FAILOVER","SWITCHOVER"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MQ_map = @{
    "AuthenticationStrategy"=@("New-MQBroker","New-MQConfiguration","Update-MQBroker")
    "DataReplicationMode"=@("New-MQBroker","Update-MQBroker")
    "DeploymentMode"=@("New-MQBroker")
    "EngineType"=@("New-MQBroker","New-MQConfiguration")
    "Mode"=@("Invoke-MQPromote")
    "StorageType"=@("New-MQBroker")
}

_awsArgumentCompleterRegistration $MQ_Completers $MQ_map

$MQ_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MQ.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MQ_SelectMap = @{
    "Select"=@("New-MQBroker",
               "New-MQConfiguration",
               "New-MQTag",
               "New-MQUser",
               "Remove-MQBroker",
               "Remove-MQTag",
               "Remove-MQUser",
               "Get-MQBroker",
               "Get-MQBrokerEngineType",
               "Get-MQBrokerInstanceOption",
               "Get-MQConfiguration",
               "Get-MQConfigurationRevision",
               "Get-MQUser",
               "Get-MQBrokerList",
               "Get-MQConfigurationRevisionList",
               "Get-MQConfigurationList",
               "Get-MQTagList",
               "Get-MQUserList",
               "Invoke-MQPromote",
               "Restart-MQBroker",
               "Update-MQBroker",
               "Update-MQConfiguration",
               "Update-MQUser")
}

_awsArgumentCompleterRegistration $MQ_SelectCompleters $MQ_SelectMap
# Argument completions for service Amazon MTurk Service


$MTR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MTurk.EventType
        "Send-MTRTestEventNotification/TestEventType"
        {
            $v = "AssignmentAbandoned","AssignmentAccepted","AssignmentApproved","AssignmentRejected","AssignmentReturned","AssignmentSubmitted","HITCreated","HITDisposed","HITExpired","HITExtended","HITReviewable","Ping"
            break
        }

        # Amazon.MTurk.NotificationTransport
        {
            ($_ -eq "Send-MTRTestEventNotification/Notification_Transport") -Or
            ($_ -eq "Update-MTRNotificationSetting/Notification_Transport")
        }
        {
            $v = "Email","SNS","SQS"
            break
        }

        # Amazon.MTurk.QualificationStatus
        "Get-MTRWorkersWithQualificationType/Status"
        {
            $v = "Granted","Revoked"
            break
        }

        # Amazon.MTurk.QualificationTypeStatus
        {
            ($_ -eq "New-MTRQualificationType/QualificationTypeStatus") -Or
            ($_ -eq "Update-MTRQualificationType/QualificationTypeStatus")
        }
        {
            $v = "Active","Inactive"
            break
        }

        # Amazon.MTurk.ReviewableHITStatus
        "Get-MTRReviewableHITList/Status"
        {
            $v = "Reviewable","Reviewing"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MTR_map = @{
    "Notification_Transport"=@("Send-MTRTestEventNotification","Update-MTRNotificationSetting")
    "QualificationTypeStatus"=@("New-MTRQualificationType","Update-MTRQualificationType")
    "Status"=@("Get-MTRReviewableHITList","Get-MTRWorkersWithQualificationType")
    "TestEventType"=@("Send-MTRTestEventNotification")
}

_awsArgumentCompleterRegistration $MTR_Completers $MTR_map

$MTR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MTR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MTR_SelectMap = @{
    "Select"=@("Grant-MTRQualificationRequest",
               "Approve-MTRAssignment",
               "Add-MTRQualificationToWorker",
               "New-MTRAdditionalAssignmentsForHIT",
               "New-MTRHIT",
               "New-MTRHITType",
               "New-MTRHITWithHITType",
               "New-MTRQualificationType",
               "New-MTRWorkerBlock",
               "Remove-MTRHIT",
               "Remove-MTRQualificationType",
               "Remove-MTRWorkerBlock",
               "Remove-MTRQualificationFromWorker",
               "Get-MTRAccountBalance",
               "Get-MTRAssignment",
               "Get-MTRFileUploadURL",
               "Get-MTRHIT",
               "Get-MTRQualificationScore",
               "Get-MTRQualificationType",
               "Get-MTRHITAssignmentList",
               "Get-MTRBonusPaymentList",
               "Get-MTRHITList",
               "Get-MTRHITListForQualificationType",
               "Get-MTRQualificationRequestList",
               "Get-MTRQualificationTypeList",
               "Get-MTRReviewableHITList",
               "Get-MTRReviewPolicyResultList",
               "Get-MTRWorkerBlockList",
               "Get-MTRWorkersWithQualificationType",
               "Send-MTRWorkerNotification",
               "Deny-MTRAssignment",
               "Deny-MTRQualificationRequest",
               "Send-MTRBonus",
               "Send-MTRTestEventNotification",
               "Update-MTRExpirationForHIT",
               "Update-MTRHITReviewStatus",
               "Update-MTRHITTypeOfHIT",
               "Update-MTRNotificationSetting",
               "Update-MTRQualificationType")
}

_awsArgumentCompleterRegistration $MTR_SelectCompleters $MTR_SelectMap
# Argument completions for service AmazonMWAA


$MWAA_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.MWAA.EndpointManagement
        "New-MWAAEnvironment/EndpointManagement"
        {
            $v = "CUSTOMER","SERVICE"
            break
        }

        # Amazon.MWAA.LoggingLevel
        {
            ($_ -eq "New-MWAAEnvironment/DagProcessingLogs_LogLevel") -Or
            ($_ -eq "Update-MWAAEnvironment/DagProcessingLogs_LogLevel") -Or
            ($_ -eq "New-MWAAEnvironment/SchedulerLogs_LogLevel") -Or
            ($_ -eq "Update-MWAAEnvironment/SchedulerLogs_LogLevel") -Or
            ($_ -eq "New-MWAAEnvironment/TaskLogs_LogLevel") -Or
            ($_ -eq "Update-MWAAEnvironment/TaskLogs_LogLevel") -Or
            ($_ -eq "New-MWAAEnvironment/WebserverLogs_LogLevel") -Or
            ($_ -eq "Update-MWAAEnvironment/WebserverLogs_LogLevel") -Or
            ($_ -eq "New-MWAAEnvironment/WorkerLogs_LogLevel") -Or
            ($_ -eq "Update-MWAAEnvironment/WorkerLogs_LogLevel")
        }
        {
            $v = "CRITICAL","DEBUG","ERROR","INFO","WARNING"
            break
        }

        # Amazon.MWAA.RestApiMethod
        "Invoke-MWAARestApi/Method"
        {
            $v = "DELETE","GET","PATCH","POST","PUT"
            break
        }

        # Amazon.MWAA.WebserverAccessMode
        {
            ($_ -eq "New-MWAAEnvironment/WebserverAccessMode") -Or
            ($_ -eq "Update-MWAAEnvironment/WebserverAccessMode")
        }
        {
            $v = "PRIVATE_ONLY","PUBLIC_ONLY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MWAA_map = @{
    "DagProcessingLogs_LogLevel"=@("New-MWAAEnvironment","Update-MWAAEnvironment")
    "EndpointManagement"=@("New-MWAAEnvironment")
    "Method"=@("Invoke-MWAARestApi")
    "SchedulerLogs_LogLevel"=@("New-MWAAEnvironment","Update-MWAAEnvironment")
    "TaskLogs_LogLevel"=@("New-MWAAEnvironment","Update-MWAAEnvironment")
    "WebserverAccessMode"=@("New-MWAAEnvironment","Update-MWAAEnvironment")
    "WebserverLogs_LogLevel"=@("New-MWAAEnvironment","Update-MWAAEnvironment")
    "WorkerLogs_LogLevel"=@("New-MWAAEnvironment","Update-MWAAEnvironment")
}

_awsArgumentCompleterRegistration $MWAA_Completers $MWAA_map

$MWAA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.MWAA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$MWAA_SelectMap = @{
    "Select"=@("New-MWAACliToken",
               "New-MWAAEnvironment",
               "New-MWAAWebLoginToken",
               "Remove-MWAAEnvironment",
               "Get-MWAAEnvironment",
               "Invoke-MWAARestApi",
               "Get-MWAAEnvironmentList",
               "Get-MWAAResourceTag",
               "Publish-MWAAMetric",
               "Add-MWAAResourceTag",
               "Remove-MWAAResourceTag",
               "Update-MWAAEnvironment")
}

_awsArgumentCompleterRegistration $MWAA_SelectCompleters $MWAA_SelectMap
# Argument completions for service Amazon Neptune


$NPT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Neptune.SourceType
        "Get-NPTEvent/SourceType"
        {
            $v = "db-cluster","db-cluster-snapshot","db-instance","db-parameter-group","db-security-group","db-snapshot"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$NPT_map = @{
    "SourceType"=@("Get-NPTEvent")
}

_awsArgumentCompleterRegistration $NPT_Completers $NPT_map

$NPT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.NPT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$NPT_SelectMap = @{
    "Select"=@("Add-NPTRoleToDBCluster",
               "Add-NPTSourceIdentifierToSubscription",
               "Add-NPTResourceTag",
               "Submit-NPTPendingMaintenanceAction",
               "Copy-NPTDBClusterParameterGroup",
               "Copy-NPTDBClusterSnapshot",
               "Copy-NPTDBParameterGroup",
               "New-NPTDBCluster",
               "New-NPTDBClusterEndpoint",
               "New-NPTDBClusterParameterGroup",
               "New-NPTDBClusterSnapshot",
               "New-NPTDBInstance",
               "New-NPTDBParameterGroup",
               "New-NPTDBSubnetGroup",
               "New-NPTEventSubscription",
               "New-NPTGlobalCluster",
               "Remove-NPTDBCluster",
               "Remove-NPTDBClusterEndpoint",
               "Remove-NPTDBClusterParameterGroup",
               "Remove-NPTDBClusterSnapshot",
               "Remove-NPTDBInstance",
               "Remove-NPTDBParameterGroup",
               "Remove-NPTDBSubnetGroup",
               "Remove-NPTEventSubscription",
               "Remove-NPTGlobalCluster",
               "Get-NPTDBClusterEndpoint",
               "Get-NPTDBClusterParameterGroup",
               "Get-NPTDBClusterParameter",
               "Get-NPTDBCluster",
               "Get-NPTDBClusterSnapshotAttribute",
               "Get-NPTDBClusterSnapshot",
               "Get-NPTDBEngineVersion",
               "Get-NPTDBInstance",
               "Get-NPTDBParameterGroup",
               "Get-NPTDBParameter",
               "Get-NPTDBSubnetGroup",
               "Get-NPTEngineDefaultClusterParameter",
               "Get-NPTEngineDefaultParameter",
               "Get-NPTEventCategory",
               "Get-NPTEvent",
               "Get-NPTEventSubscription",
               "Get-NPTGlobalCluster",
               "Get-NPTOrderableDBInstanceOption",
               "Get-NPTPendingMaintenanceAction",
               "Get-NPTValidDBInstanceModification",
               "Start-NPTDBClusterFailover",
               "Edit-NPTGlobalClusterPrimary",
               "Get-NPTResourceTagList",
               "Edit-NPTDBCluster",
               "Edit-NPTDBClusterEndpoint",
               "Edit-NPTDBClusterParameterGroup",
               "Edit-NPTDBClusterSnapshotAttribute",
               "Edit-NPTDBInstance",
               "Edit-NPTDBParameterGroup",
               "Edit-NPTDBSubnetGroup",
               "Edit-NPTEventSubscription",
               "Edit-NPTGlobalCluster",
               "Convert-NPTReadReplicaDBCluster",
               "Restart-NPTDBInstance",
               "Remove-NPTFromGlobalCluster",
               "Remove-NPTRoleFromDBCluster",
               "Remove-NPTSourceIdentifierFromSubscription",
               "Remove-NPTResourceTag",
               "Reset-NPTDBClusterParameterGroup",
               "Reset-NPTDBParameterGroup",
               "Restore-NPTDBClusterFromSnapshot",
               "Restore-NPTDBClusterToPointInTime",
               "Start-NPTDBCluster",
               "Stop-NPTDBCluster")
}

_awsArgumentCompleterRegistration $NPT_SelectCompleters $NPT_SelectMap
# Argument completions for service Amazon NeptuneData


$NEPT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Neptunedata.Action
        "Invoke-NEPTFastReset/Action"
        {
            $v = "initiateDatabaseReset","performDatabaseReset"
            break
        }

        # Amazon.Neptunedata.Encoding
        {
            ($_ -eq "Get-NEPTPropertygraphStream/Encoding") -Or
            ($_ -eq "Get-NEPTSparqlStream/Encoding")
        }
        {
            $v = "gzip"
            break
        }

        # Amazon.Neptunedata.Format
        "Start-NEPTLoaderJob/Format"
        {
            $v = "csv","nquads","ntriples","opencypher","rdfxml","turtle"
            break
        }

        # Amazon.Neptunedata.GraphSummaryType
        {
            ($_ -eq "Get-NEPTPropertygraphSummary/Mode") -Or
            ($_ -eq "Get-NEPTRDFGraphSummary/Mode")
        }
        {
            $v = "basic","detailed"
            break
        }

        # Amazon.Neptunedata.IteratorType
        {
            ($_ -eq "Get-NEPTPropertygraphStream/IteratorType") -Or
            ($_ -eq "Get-NEPTSparqlStream/IteratorType")
        }
        {
            $v = "AFTER_SEQUENCE_NUMBER","AT_SEQUENCE_NUMBER","LATEST","TRIM_HORIZON"
            break
        }

        # Amazon.Neptunedata.Mode
        "Start-NEPTLoaderJob/Mode"
        {
            $v = "AUTO","NEW","RESUME"
            break
        }

        # Amazon.Neptunedata.OpenCypherExplainMode
        "Invoke-NEPTOpenCypherExplainQuery/ExplainMode"
        {
            $v = "details","dynamic","static"
            break
        }

        # Amazon.Neptunedata.Parallelism
        "Start-NEPTLoaderJob/Parallelism"
        {
            $v = "HIGH","LOW","MEDIUM","OVERSUBSCRIBE"
            break
        }

        # Amazon.Neptunedata.S3BucketRegion
        "Start-NEPTLoaderJob/S3BucketRegion"
        {
            $v = "af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","cn-north-1","cn-northwest-1","eu-central-1","eu-north-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-gov-east-1","us-gov-west-1","us-west-1","us-west-2"
            break
        }

        # Amazon.Neptunedata.StatisticsAutoGenerationMode
        {
            ($_ -eq "Update-NEPTPropertygraphStatistic/Mode") -Or
            ($_ -eq "Update-NEPTSparqlStatistic/Mode")
        }
        {
            $v = "disableAutoCompute","enableAutoCompute","refresh"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$NEPT_map = @{
    "Action"=@("Invoke-NEPTFastReset")
    "Encoding"=@("Get-NEPTPropertygraphStream","Get-NEPTSparqlStream")
    "ExplainMode"=@("Invoke-NEPTOpenCypherExplainQuery")
    "Format"=@("Start-NEPTLoaderJob")
    "IteratorType"=@("Get-NEPTPropertygraphStream","Get-NEPTSparqlStream")
    "Mode"=@("Get-NEPTPropertygraphSummary","Get-NEPTRDFGraphSummary","Start-NEPTLoaderJob","Update-NEPTPropertygraphStatistic","Update-NEPTSparqlStatistic")
    "Parallelism"=@("Start-NEPTLoaderJob")
    "S3BucketRegion"=@("Start-NEPTLoaderJob")
}

_awsArgumentCompleterRegistration $NEPT_Completers $NEPT_map

$NEPT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.NEPT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$NEPT_SelectMap = @{
    "Select"=@("Stop-NEPTGremlinQuery",
               "Stop-NEPTLoaderJob",
               "Stop-NEPTMLDataProcessingJob",
               "Stop-NEPTMLModelTrainingJob",
               "Stop-NEPTMLModelTransformJob",
               "Stop-NEPTOpenCypherQuery",
               "New-NEPTMLEndpoint",
               "Remove-NEPTMLEndpoint",
               "Remove-NEPTPropertygraphStatistic",
               "Remove-NEPTSparqlStatistic",
               "Invoke-NEPTFastReset",
               "Invoke-NEPTGremlinExplainQuery",
               "Invoke-NEPTGremlinProfileQuery",
               "Invoke-NEPTGremlinQuery",
               "Invoke-NEPTOpenCypherExplainQuery",
               "Invoke-NEPTOpenCypherQuery",
               "Get-NEPTEngineStatus",
               "Get-NEPTGremlinQueryStatus",
               "Get-NEPTLoaderJobStatus",
               "Get-NEPTMLDataProcessingJob",
               "Get-NEPTMLEndpoint",
               "Get-NEPTMLModelTrainingJob",
               "Get-NEPTMLModelTransformJob",
               "Get-NEPTOpenCypherQueryStatus",
               "Get-NEPTPropertygraphStatistic",
               "Get-NEPTPropertygraphStream",
               "Get-NEPTPropertygraphSummary",
               "Get-NEPTRDFGraphSummary",
               "Get-NEPTSparqlStatistic",
               "Get-NEPTSparqlStream",
               "Get-NEPTGremlinQueryList",
               "Get-NEPTLoaderJobList",
               "Get-NEPTMLDataProcessingJobList",
               "Get-NEPTMLEndpointList",
               "Get-NEPTMLModelTrainingJobList",
               "Get-NEPTMLModelTransformJobList",
               "Get-NEPTOpenCypherQueryList",
               "Update-NEPTPropertygraphStatistic",
               "Update-NEPTSparqlStatistic",
               "Start-NEPTLoaderJob",
               "Start-NEPTMLDataProcessingJob",
               "Start-NEPTMLModelTrainingJob",
               "Start-NEPTMLModelTransformJob")
}

_awsArgumentCompleterRegistration $NEPT_SelectCompleters $NEPT_SelectMap
# Argument completions for service Amazon Neptune Graph


$NEPTG_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.NeptuneGraph.BlankNodeHandling
        {
            ($_ -eq "New-NEPTGGraphUsingImportTask/BlankNodeHandling") -Or
            ($_ -eq "Start-NEPTGImportTask/BlankNodeHandling")
        }
        {
            $v = "convertToIri"
            break
        }

        # Amazon.NeptuneGraph.ExplainMode
        "Invoke-NEPTGQuery/ExplainMode"
        {
            $v = "DETAILS","STATIC"
            break
        }

        # Amazon.NeptuneGraph.Format
        {
            ($_ -eq "New-NEPTGGraphUsingImportTask/Format") -Or
            ($_ -eq "Start-NEPTGImportTask/Format")
        }
        {
            $v = "CSV","NTRIPLES","OPEN_CYPHER"
            break
        }

        # Amazon.NeptuneGraph.GraphSummaryMode
        "Get-NEPTGGraphSummary/Mode"
        {
            $v = "BASIC","DETAILED"
            break
        }

        # Amazon.NeptuneGraph.PlanCacheType
        "Invoke-NEPTGQuery/PlanCache"
        {
            $v = "AUTO","DISABLED","ENABLED"
            break
        }

        # Amazon.NeptuneGraph.QueryLanguage
        "Invoke-NEPTGQuery/Language"
        {
            $v = "OPEN_CYPHER"
            break
        }

        # Amazon.NeptuneGraph.QueryStateInput
        "Get-NEPTGQueryList/State"
        {
            $v = "ALL","CANCELLING","RUNNING","WAITING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$NEPTG_map = @{
    "BlankNodeHandling"=@("New-NEPTGGraphUsingImportTask","Start-NEPTGImportTask")
    "ExplainMode"=@("Invoke-NEPTGQuery")
    "Format"=@("New-NEPTGGraphUsingImportTask","Start-NEPTGImportTask")
    "Language"=@("Invoke-NEPTGQuery")
    "Mode"=@("Get-NEPTGGraphSummary")
    "PlanCache"=@("Invoke-NEPTGQuery")
    "State"=@("Get-NEPTGQueryList")
}

_awsArgumentCompleterRegistration $NEPTG_Completers $NEPTG_map

$NEPTG_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.NEPTG.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$NEPTG_SelectMap = @{
    "Select"=@("Stop-NEPTGImportTask",
               "Stop-NEPTGQuery",
               "New-NEPTGGraph",
               "New-NEPTGGraphSnapshot",
               "New-NEPTGGraphUsingImportTask",
               "New-NEPTGPrivateGraphEndpoint",
               "Remove-NEPTGGraph",
               "Remove-NEPTGGraphSnapshot",
               "Remove-NEPTGPrivateGraphEndpoint",
               "Invoke-NEPTGQuery",
               "Get-NEPTGGraph",
               "Get-NEPTGGraphSnapshot",
               "Get-NEPTGGraphSummary",
               "Get-NEPTGImportTask",
               "Get-NEPTGPrivateGraphEndpoint",
               "Get-NEPTGQuery",
               "Get-NEPTGGraphList",
               "Get-NEPTGGraphSnapshotList",
               "Get-NEPTGImportTaskList",
               "Get-NEPTGPrivateGraphEndpointList",
               "Get-NEPTGQueryList",
               "Get-NEPTGResourceTag",
               "Reset-NEPTGGraph",
               "Restore-NEPTGGraphFromSnapshot",
               "Start-NEPTGImportTask",
               "Add-NEPTGResourceTag",
               "Remove-NEPTGResourceTag",
               "Update-NEPTGGraph")
}

_awsArgumentCompleterRegistration $NEPTG_SelectCompleters $NEPTG_SelectMap
# Argument completions for service AWS Network Firewall


$NWFW_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.NetworkFirewall.EncryptionType
        {
            ($_ -eq "New-NWFWFirewall/EncryptionConfiguration_Type") -Or
            ($_ -eq "New-NWFWFirewallPolicy/EncryptionConfiguration_Type") -Or
            ($_ -eq "New-NWFWRuleGroup/EncryptionConfiguration_Type") -Or
            ($_ -eq "New-NWFWTLSInspectionConfiguration/EncryptionConfiguration_Type") -Or
            ($_ -eq "Update-NWFWFirewallEncryptionConfiguration/EncryptionConfiguration_Type") -Or
            ($_ -eq "Update-NWFWFirewallPolicy/EncryptionConfiguration_Type") -Or
            ($_ -eq "Update-NWFWRuleGroup/EncryptionConfiguration_Type") -Or
            ($_ -eq "Update-NWFWTLSInspectionConfiguration/EncryptionConfiguration_Type")
        }
        {
            $v = "AWS_OWNED_KMS_KEY","CUSTOMER_KMS"
            break
        }

        # Amazon.NetworkFirewall.GeneratedRulesType
        {
            ($_ -eq "New-NWFWRuleGroup/RulesSourceList_GeneratedRulesType") -Or
            ($_ -eq "Update-NWFWRuleGroup/RulesSourceList_GeneratedRulesType")
        }
        {
            $v = "ALLOWLIST","DENYLIST"
            break
        }

        # Amazon.NetworkFirewall.ResourceManagedStatus
        "Get-NWFWRuleGroupList/Scope"
        {
            $v = "ACCOUNT","MANAGED"
            break
        }

        # Amazon.NetworkFirewall.ResourceManagedType
        "Get-NWFWRuleGroupList/ManagedType"
        {
            $v = "AWS_MANAGED_DOMAIN_LISTS","AWS_MANAGED_THREAT_SIGNATURES"
            break
        }

        # Amazon.NetworkFirewall.RuleGroupType
        {
            ($_ -eq "Get-NWFWRuleGroup/Type") -Or
            ($_ -eq "Get-NWFWRuleGroupList/Type") -Or
            ($_ -eq "Get-NWFWRuleGroupMetadata/Type") -Or
            ($_ -eq "New-NWFWRuleGroup/Type") -Or
            ($_ -eq "Remove-NWFWRuleGroup/Type") -Or
            ($_ -eq "Update-NWFWRuleGroup/Type")
        }
        {
            $v = "STATEFUL","STATELESS"
            break
        }

        # Amazon.NetworkFirewall.RuleOrder
        {
            ($_ -eq "New-NWFWFirewallPolicy/StatefulEngineOptions_RuleOrder") -Or
            ($_ -eq "Update-NWFWFirewallPolicy/StatefulEngineOptions_RuleOrder") -Or
            ($_ -eq "New-NWFWRuleGroup/StatefulRuleOptions_RuleOrder") -Or
            ($_ -eq "Update-NWFWRuleGroup/StatefulRuleOptions_RuleOrder")
        }
        {
            $v = "DEFAULT_ACTION_ORDER","STRICT_ORDER"
            break
        }

        # Amazon.NetworkFirewall.StreamExceptionPolicy
        {
            ($_ -eq "New-NWFWFirewallPolicy/StatefulEngineOptions_StreamExceptionPolicy") -Or
            ($_ -eq "Update-NWFWFirewallPolicy/StatefulEngineOptions_StreamExceptionPolicy")
        }
        {
            $v = "CONTINUE","DROP","REJECT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$NWFW_map = @{
    "EncryptionConfiguration_Type"=@("New-NWFWFirewall","New-NWFWFirewallPolicy","New-NWFWRuleGroup","New-NWFWTLSInspectionConfiguration","Update-NWFWFirewallEncryptionConfiguration","Update-NWFWFirewallPolicy","Update-NWFWRuleGroup","Update-NWFWTLSInspectionConfiguration")
    "ManagedType"=@("Get-NWFWRuleGroupList")
    "RulesSourceList_GeneratedRulesType"=@("New-NWFWRuleGroup","Update-NWFWRuleGroup")
    "Scope"=@("Get-NWFWRuleGroupList")
    "StatefulEngineOptions_RuleOrder"=@("New-NWFWFirewallPolicy","Update-NWFWFirewallPolicy")
    "StatefulEngineOptions_StreamExceptionPolicy"=@("New-NWFWFirewallPolicy","Update-NWFWFirewallPolicy")
    "StatefulRuleOptions_RuleOrder"=@("New-NWFWRuleGroup","Update-NWFWRuleGroup")
    "Type"=@("Get-NWFWRuleGroup","Get-NWFWRuleGroupList","Get-NWFWRuleGroupMetadata","New-NWFWRuleGroup","Remove-NWFWRuleGroup","Update-NWFWRuleGroup")
}

_awsArgumentCompleterRegistration $NWFW_Completers $NWFW_map

$NWFW_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.NWFW.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$NWFW_SelectMap = @{
    "Select"=@("Register-NWFWFirewallPolicy",
               "Register-NWFWSubnet",
               "New-NWFWFirewall",
               "New-NWFWFirewallPolicy",
               "New-NWFWRuleGroup",
               "New-NWFWTLSInspectionConfiguration",
               "Remove-NWFWFirewall",
               "Remove-NWFWFirewallPolicy",
               "Remove-NWFWResourcePolicy",
               "Remove-NWFWRuleGroup",
               "Remove-NWFWTLSInspectionConfiguration",
               "Get-NWFWFirewall",
               "Get-NWFWFirewallPolicy",
               "Get-NWFWLoggingConfiguration",
               "Get-NWFWResourcePolicy",
               "Get-NWFWRuleGroup",
               "Get-NWFWRuleGroupMetadata",
               "Get-NWFWTLSInspectionConfiguration",
               "Unregister-NWFWSubnet",
               "Get-NWFWFirewallPolicyList",
               "Get-NWFWFirewallList",
               "Get-NWFWRuleGroupList",
               "Get-NWFWResourceTag",
               "Get-NWFWTLSInspectionConfigurationList",
               "Write-NWFWResourcePolicy",
               "Add-NWFWResourceTag",
               "Remove-NWFWResourceTag",
               "Update-NWFWFirewallDeleteProtection",
               "Update-NWFWFirewallDescription",
               "Update-NWFWFirewallEncryptionConfiguration",
               "Update-NWFWFirewallPolicy",
               "Update-NWFWFirewallPolicyChangeProtection",
               "Update-NWFWLoggingConfiguration",
               "Update-NWFWRuleGroup",
               "Update-NWFWSubnetChangeProtection",
               "Update-NWFWTLSInspectionConfiguration")
}

_awsArgumentCompleterRegistration $NWFW_SelectCompleters $NWFW_SelectMap
# Argument completions for service AWS Network Manager


$NMGR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.NetworkManager.AttachmentState
        "Get-NMGRAttachmentList/State"
        {
            $v = "AVAILABLE","CREATING","DELETING","FAILED","PENDING_ATTACHMENT_ACCEPTANCE","PENDING_NETWORK_UPDATE","PENDING_TAG_ACCEPTANCE","REJECTED","UPDATING"
            break
        }

        # Amazon.NetworkManager.AttachmentType
        "Get-NMGRAttachmentList/AttachmentType"
        {
            $v = "CONNECT","SITE_TO_SITE_VPN","TRANSIT_GATEWAY_ROUTE_TABLE","VPC"
            break
        }

        # Amazon.NetworkManager.CoreNetworkPolicyAlias
        "Get-NMGRCoreNetworkPolicy/Alias"
        {
            $v = "LATEST","LIVE"
            break
        }

        # Amazon.NetworkManager.PeeringState
        "Get-NMGRPeeringList/State"
        {
            $v = "AVAILABLE","CREATING","DELETING","FAILED"
            break
        }

        # Amazon.NetworkManager.PeeringType
        "Get-NMGRPeeringList/PeeringType"
        {
            $v = "TRANSIT_GATEWAY"
            break
        }

        # Amazon.NetworkManager.TunnelProtocol
        "New-NMGRConnectAttachment/Options_Protocol"
        {
            $v = "GRE","NO_ENCAP"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$NMGR_map = @{
    "Alias"=@("Get-NMGRCoreNetworkPolicy")
    "AttachmentType"=@("Get-NMGRAttachmentList")
    "Options_Protocol"=@("New-NMGRConnectAttachment")
    "PeeringType"=@("Get-NMGRPeeringList")
    "State"=@("Get-NMGRAttachmentList","Get-NMGRPeeringList")
}

_awsArgumentCompleterRegistration $NMGR_Completers $NMGR_map

$NMGR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.NMGR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$NMGR_SelectMap = @{
    "Select"=@("Confirm-NMGRAttachment",
               "Add-NMGRConnectPeerAssociation",
               "Register-NMGRCustomerGateway",
               "Register-NMGRLink",
               "Register-NMGRTransitGatewayConnectPeer",
               "New-NMGRConnectAttachment",
               "New-NMGRConnection",
               "New-NMGRConnectPeer",
               "New-NMGRCoreNetwork",
               "New-NMGRDevice",
               "New-NMGRGlobalNetwork",
               "New-NMGRLink",
               "New-NMGRSite",
               "New-NMGRSiteToSiteVpnAttachment",
               "New-NMGRTransitGatewayPeering",
               "New-NMGRTransitGatewayRouteTableAttachment",
               "New-NMGRVpcAttachment",
               "Remove-NMGRAttachment",
               "Remove-NMGRConnection",
               "Remove-NMGRConnectPeer",
               "Remove-NMGRCoreNetwork",
               "Remove-NMGRCoreNetworkPolicyVersion",
               "Remove-NMGRDevice",
               "Remove-NMGRGlobalNetwork",
               "Remove-NMGRLink",
               "Remove-NMGRPeering",
               "Remove-NMGRResourcePolicy",
               "Remove-NMGRSite",
               "Unregister-NMGRTransitGateway",
               "Get-NMGRGlobalNetwork",
               "Remove-NMGRConnectPeerAssociation",
               "Unregister-NMGRCustomerGateway",
               "Unregister-NMGRLink",
               "Unregister-NMGRTransitGatewayConnectPeer",
               "Enable-NMGRCoreNetworkChangeSet",
               "Get-NMGRConnectAttachment",
               "Get-NMGRConnection",
               "Get-NMGRConnectPeer",
               "Get-NMGRConnectPeerAssociation",
               "Get-NMGRCoreNetwork",
               "Get-NMGRCoreNetworkChangeEvent",
               "Get-NMGRCoreNetworkChangeSet",
               "Get-NMGRCoreNetworkPolicy",
               "Get-NMGRCustomerGatewayAssociation",
               "Get-NMGRDevice",
               "Get-NMGRLinkAssociation",
               "Get-NMGRLink",
               "Get-NMGRNetworkResourceCount",
               "Get-NMGRNetworkResourceRelationship",
               "Get-NMGRNetworkResource",
               "Get-NMGRNetworkRoute",
               "Get-NMGRNetworkTelemetry",
               "Get-NMGRResourcePolicy",
               "Get-NMGRRouteAnalysis",
               "Get-NMGRSite",
               "Get-NMGRSiteToSiteVpnAttachment",
               "Get-NMGRTransitGatewayConnectPeerAssociation",
               "Get-NMGRTransitGatewayPeering",
               "Get-NMGRTransitGatewayRegistration",
               "Get-NMGRTransitGatewayRouteTableAttachment",
               "Get-NMGRVpcAttachment",
               "Get-NMGRAttachmentList",
               "Get-NMGRConnectPeerList",
               "Get-NMGRCoreNetworkPolicyVersionList",
               "Get-NMGRCoreNetworkList",
               "Get-NMGROrganizationServiceAccessStatusList",
               "Get-NMGRPeeringList",
               "Get-NMGRResourceTag",
               "Write-NMGRCoreNetworkPolicy",
               "Write-NMGRResourcePolicy",
               "Register-NMGRTransitGateway",
               "Deny-NMGRAttachment",
               "Restore-NMGRCoreNetworkPolicyVersion",
               "Start-NMGROrganizationServiceAccessUpdate",
               "Start-NMGRRouteAnalysis",
               "Add-NMGRResourceTag",
               "Remove-NMGRResourceTag",
               "Update-NMGRConnection",
               "Update-NMGRCoreNetwork",
               "Update-NMGRDevice",
               "Update-NMGRGlobalNetwork",
               "Update-NMGRLink",
               "Update-NMGRNetworkResourceMetadata",
               "Update-NMGRSite",
               "Update-NMGRVpcAttachment")
}

_awsArgumentCompleterRegistration $NMGR_SelectCompleters $NMGR_SelectMap
# Argument completions for service Amazon CloudWatch Network Monitor


$CWNM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.NetworkMonitor.ProbeState
        "Update-CWNMProbe/State"
        {
            $v = "ACTIVE","DELETED","DELETING","ERROR","INACTIVE","PENDING"
            break
        }

        # Amazon.NetworkMonitor.Protocol
        {
            ($_ -eq "New-CWNMProbe/Probe_Protocol") -Or
            ($_ -eq "Update-CWNMProbe/Protocol")
        }
        {
            $v = "ICMP","TCP"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWNM_map = @{
    "Probe_Protocol"=@("New-CWNMProbe")
    "Protocol"=@("Update-CWNMProbe")
    "State"=@("Update-CWNMProbe")
}

_awsArgumentCompleterRegistration $CWNM_Completers $CWNM_map

$CWNM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CWNM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWNM_SelectMap = @{
    "Select"=@("New-CWNMMonitor",
               "New-CWNMProbe",
               "Remove-CWNMMonitor",
               "Remove-CWNMProbe",
               "Get-CWNMMonitor",
               "Get-CWNMProbe",
               "Get-CWNMMonitorList",
               "Get-CWNMResourceTag",
               "Add-CWNMResourceTag",
               "Remove-CWNMResourceTag",
               "Update-CWNMMonitor",
               "Update-CWNMProbe")
}

_awsArgumentCompleterRegistration $CWNM_SelectCompleters $CWNM_SelectMap
# Argument completions for service CloudWatch Observability Access Manager


$CWOAM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CWOAM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWOAM_SelectMap = @{
    "Select"=@("New-CWOAMLink",
               "New-CWOAMSink",
               "Remove-CWOAMLink",
               "Remove-CWOAMSink",
               "Get-CWOAMLink",
               "Get-CWOAMSink",
               "Get-CWOAMSinkPolicy",
               "Get-CWOAMAttachedLinkList",
               "Get-CWOAMLinkList",
               "Get-CWOAMSinkList",
               "Get-CWOAMResourceTag",
               "Write-CWOAMSinkPolicy",
               "Add-CWOAMResourceTag",
               "Remove-CWOAMResourceTag",
               "Update-CWOAMLink")
}

_awsArgumentCompleterRegistration $CWOAM_SelectCompleters $CWOAM_SelectMap
# Argument completions for service Amazon Omics


$OMICS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Omics.Accelerators
        "New-OMICSWorkflow/Accelerator"
        {
            $v = "GPU"
            break
        }

        # Amazon.Omics.AnnotationType
        {
            ($_ -eq "New-OMICSAnnotationStore/TsvStoreOptions_AnnotationType") -Or
            ($_ -eq "New-OMICSAnnotationStoreVersion/TsvVersionOptions_AnnotationType")
        }
        {
            $v = "CHR_POS","CHR_POS_REF_ALT","CHR_START_END_ONE_BASE","CHR_START_END_REF_ALT_ONE_BASE","CHR_START_END_REF_ALT_ZERO_BASE","CHR_START_END_ZERO_BASE","GENERIC"
            break
        }

        # Amazon.Omics.CreationType
        "Get-OMICSReadSetList/Filter_CreationType"
        {
            $v = "IMPORT","UPLOAD"
            break
        }

        # Amazon.Omics.EncryptionType
        {
            ($_ -eq "New-OMICSAnnotationStore/SseConfig_Type") -Or
            ($_ -eq "New-OMICSReferenceStore/SseConfig_Type") -Or
            ($_ -eq "New-OMICSSequenceStore/SseConfig_Type") -Or
            ($_ -eq "New-OMICSVariantStore/SseConfig_Type")
        }
        {
            $v = "KMS"
            break
        }

        # Amazon.Omics.ETagAlgorithmFamily
        "New-OMICSSequenceStore/ETagAlgorithmFamily"
        {
            $v = "MD5up","SHA256up","SHA512up"
            break
        }

        # Amazon.Omics.FileType
        "New-OMICSMultipartReadSetUpload/SourceFileType"
        {
            $v = "BAM","CRAM","FASTQ","UBAM"
            break
        }

        # Amazon.Omics.JobStatus
        {
            ($_ -eq "Get-OMICSAnnotationImportJobList/Filter_Status") -Or
            ($_ -eq "Get-OMICSVariantImportJobList/Filter_Status")
        }
        {
            $v = "CANCELLED","COMPLETED","COMPLETED_WITH_FAILURES","FAILED","IN_PROGRESS","SUBMITTED"
            break
        }

        # Amazon.Omics.ReadSetActivationJobStatus
        "Get-OMICSReadSetActivationJobList/Filter_Status"
        {
            $v = "CANCELLED","CANCELLING","COMPLETED","COMPLETED_WITH_FAILURES","FAILED","IN_PROGRESS","SUBMITTED"
            break
        }

        # Amazon.Omics.ReadSetExportJobStatus
        "Get-OMICSReadSetExportJobList/Filter_Status"
        {
            $v = "CANCELLED","CANCELLING","COMPLETED","COMPLETED_WITH_FAILURES","FAILED","IN_PROGRESS","SUBMITTED"
            break
        }

        # Amazon.Omics.ReadSetFile
        "Get-OMICSReadSet/File"
        {
            $v = "INDEX","SOURCE1","SOURCE2"
            break
        }

        # Amazon.Omics.ReadSetImportJobStatus
        "Get-OMICSReadSetImportJobList/Filter_Status"
        {
            $v = "CANCELLED","CANCELLING","COMPLETED","COMPLETED_WITH_FAILURES","FAILED","IN_PROGRESS","SUBMITTED"
            break
        }

        # Amazon.Omics.ReadSetPartSource
        {
            ($_ -eq "Get-OMICSReadSetUploadPartList/PartSource") -Or
            ($_ -eq "Set-OMICSReadSetPart/PartSource")
        }
        {
            $v = "SOURCE1","SOURCE2"
            break
        }

        # Amazon.Omics.ReadSetStatus
        "Get-OMICSReadSetList/Filter_Status"
        {
            $v = "ACTIVATING","ACTIVE","ARCHIVED","DELETED","DELETING","PROCESSING_UPLOAD","UPLOAD_FAILED"
            break
        }

        # Amazon.Omics.ReferenceFile
        "Get-OMICSReference/File"
        {
            $v = "INDEX","SOURCE"
            break
        }

        # Amazon.Omics.ReferenceImportJobStatus
        "Get-OMICSReferenceImportJobList/Filter_Status"
        {
            $v = "CANCELLED","CANCELLING","COMPLETED","COMPLETED_WITH_FAILURES","FAILED","IN_PROGRESS","SUBMITTED"
            break
        }

        # Amazon.Omics.ResourceOwner
        "Get-OMICSShareList/ResourceOwner"
        {
            $v = "OTHER","SELF"
            break
        }

        # Amazon.Omics.RunLogLevel
        "Start-OMICSRun/LogLevel"
        {
            $v = "ALL","ERROR","FATAL","OFF"
            break
        }

        # Amazon.Omics.RunRetentionMode
        "Start-OMICSRun/RetentionMode"
        {
            $v = "REMOVE","RETAIN"
            break
        }

        # Amazon.Omics.RunStatus
        "Get-OMICSRunList/Status"
        {
            $v = "CANCELLED","COMPLETED","DELETED","FAILED","PENDING","RUNNING","STARTING","STOPPING"
            break
        }

        # Amazon.Omics.StorageType
        "Start-OMICSRun/StorageType"
        {
            $v = "DYNAMIC","STATIC"
            break
        }

        # Amazon.Omics.StoreFormat
        "New-OMICSAnnotationStore/StoreFormat"
        {
            $v = "GFF","TSV","VCF"
            break
        }

        # Amazon.Omics.StoreStatus
        {
            ($_ -eq "Get-OMICSAnnotationStoreList/Filter_Status") -Or
            ($_ -eq "Get-OMICSVariantStoreList/Filter_Status")
        }
        {
            $v = "ACTIVE","CREATING","DELETING","FAILED","UPDATING"
            break
        }

        # Amazon.Omics.TaskStatus
        "Get-OMICSRunTaskList/Status"
        {
            $v = "CANCELLED","COMPLETED","FAILED","PENDING","RUNNING","STARTING","STOPPING"
            break
        }

        # Amazon.Omics.VersionStatus
        "Get-OMICSAnnotationStoreVersionList/Filter_Status"
        {
            $v = "ACTIVE","CREATING","DELETING","FAILED","UPDATING"
            break
        }

        # Amazon.Omics.WorkflowEngine
        "New-OMICSWorkflow/Engine"
        {
            $v = "CWL","NEXTFLOW","WDL"
            break
        }

        # Amazon.Omics.WorkflowType
        {
            ($_ -eq "Get-OMICSWorkflow/Type") -Or
            ($_ -eq "Get-OMICSWorkflowList/Type") -Or
            ($_ -eq "Start-OMICSRun/WorkflowType")
        }
        {
            $v = "PRIVATE","READY2RUN"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OMICS_map = @{
    "Accelerator"=@("New-OMICSWorkflow")
    "Engine"=@("New-OMICSWorkflow")
    "ETagAlgorithmFamily"=@("New-OMICSSequenceStore")
    "File"=@("Get-OMICSReadSet","Get-OMICSReference")
    "Filter_CreationType"=@("Get-OMICSReadSetList")
    "Filter_Status"=@("Get-OMICSAnnotationImportJobList","Get-OMICSAnnotationStoreList","Get-OMICSAnnotationStoreVersionList","Get-OMICSReadSetActivationJobList","Get-OMICSReadSetExportJobList","Get-OMICSReadSetImportJobList","Get-OMICSReadSetList","Get-OMICSReferenceImportJobList","Get-OMICSVariantImportJobList","Get-OMICSVariantStoreList")
    "LogLevel"=@("Start-OMICSRun")
    "PartSource"=@("Get-OMICSReadSetUploadPartList","Set-OMICSReadSetPart")
    "ResourceOwner"=@("Get-OMICSShareList")
    "RetentionMode"=@("Start-OMICSRun")
    "SourceFileType"=@("New-OMICSMultipartReadSetUpload")
    "SseConfig_Type"=@("New-OMICSAnnotationStore","New-OMICSReferenceStore","New-OMICSSequenceStore","New-OMICSVariantStore")
    "Status"=@("Get-OMICSRunList","Get-OMICSRunTaskList")
    "StorageType"=@("Start-OMICSRun")
    "StoreFormat"=@("New-OMICSAnnotationStore")
    "TsvStoreOptions_AnnotationType"=@("New-OMICSAnnotationStore")
    "TsvVersionOptions_AnnotationType"=@("New-OMICSAnnotationStoreVersion")
    "Type"=@("Get-OMICSWorkflow","Get-OMICSWorkflowList")
    "WorkflowType"=@("Start-OMICSRun")
}

_awsArgumentCompleterRegistration $OMICS_Completers $OMICS_map

$OMICS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.OMICS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OMICS_SelectMap = @{
    "Select"=@("Remove-OMICSMultipartReadSetUpload",
               "Receive-OMICSShare",
               "Remove-OMICSReadSet",
               "Stop-OMICSAnnotationImportJob",
               "Stop-OMICSRun",
               "Stop-OMICSVariantImportJob",
               "Complete-OMICSMultipartReadSetUpload",
               "New-OMICSAnnotationStore",
               "New-OMICSAnnotationStoreVersion",
               "New-OMICSMultipartReadSetUpload",
               "New-OMICSReferenceStore",
               "New-OMICSRunGroup",
               "New-OMICSSequenceStore",
               "New-OMICSShare",
               "New-OMICSVariantStore",
               "New-OMICSWorkflow",
               "Remove-OMICSAnnotationStore",
               "Remove-OMICSAnnotationStoreVersion",
               "Remove-OMICSReference",
               "Remove-OMICSReferenceStore",
               "Remove-OMICSRun",
               "Remove-OMICSRunGroup",
               "Remove-OMICSSequenceStore",
               "Remove-OMICSShare",
               "Remove-OMICSVariantStore",
               "Remove-OMICSWorkflow",
               "Get-OMICSAnnotationImportJob",
               "Get-OMICSAnnotationStore",
               "Get-OMICSAnnotationStoreVersion",
               "Get-OMICSReadSet",
               "Get-OMICSReadSetActivationJob",
               "Get-OMICSReadSetExportJob",
               "Get-OMICSReadSetImportJob",
               "Get-OMICSReadSetMetadata",
               "Get-OMICSReference",
               "Get-OMICSReferenceImportJob",
               "Get-OMICSReferenceMetadata",
               "Get-OMICSReferenceStore",
               "Get-OMICSRun",
               "Get-OMICSRunGroup",
               "Get-OMICSRunTask",
               "Get-OMICSSequenceStore",
               "Get-OMICSShare",
               "Get-OMICSVariantImportJob",
               "Get-OMICSVariantStore",
               "Get-OMICSWorkflow",
               "Get-OMICSAnnotationImportJobList",
               "Get-OMICSAnnotationStoreList",
               "Get-OMICSAnnotationStoreVersionList",
               "Get-OMICSMultipartReadSetUploadList",
               "Get-OMICSReadSetActivationJobList",
               "Get-OMICSReadSetExportJobList",
               "Get-OMICSReadSetImportJobList",
               "Get-OMICSReadSetList",
               "Get-OMICSReadSetUploadPartList",
               "Get-OMICSReferenceImportJobList",
               "Get-OMICSReferenceList",
               "Get-OMICSReferenceStoreList",
               "Get-OMICSRunGroupList",
               "Get-OMICSRunList",
               "Get-OMICSRunTaskList",
               "Get-OMICSSequenceStoreList",
               "Get-OMICSShareList",
               "Get-OMICSResourceTag",
               "Get-OMICSVariantImportJobList",
               "Get-OMICSVariantStoreList",
               "Get-OMICSWorkflowList",
               "Start-OMICSAnnotationImportJob",
               "Start-OMICSReadSetActivationJob",
               "Start-OMICSReadSetExportJob",
               "Start-OMICSReadSetImportJob",
               "Start-OMICSReferenceImportJob",
               "Start-OMICSRun",
               "Start-OMICSVariantImportJob",
               "Add-OMICSResourceTag",
               "Remove-OMICSResourceTag",
               "Update-OMICSAnnotationStore",
               "Update-OMICSAnnotationStoreVersion",
               "Update-OMICSRunGroup",
               "Update-OMICSVariantStore",
               "Update-OMICSWorkflow",
               "Set-OMICSReadSetPart")
}

_awsArgumentCompleterRegistration $OMICS_SelectCompleters $OMICS_SelectMap
# Argument completions for service Amazon OpenSearch Service


$OS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.OpenSearchService.ActionType
        "Update-OSScheduledAction/ActionType"
        {
            $v = "JVM_HEAP_SIZE_TUNING","JVM_YOUNG_GEN_TUNING","SERVICE_SOFTWARE_UPDATE"
            break
        }

        # Amazon.OpenSearchService.AutoTuneDesiredState
        {
            ($_ -eq "New-OSDomain/AutoTuneOptions_DesiredState") -Or
            ($_ -eq "Update-OSDomainConfig/AutoTuneOptions_DesiredState")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.OpenSearchService.AWSServicePrincipal
        {
            ($_ -eq "Approve-OSVpcEndpointAccess/Service") -Or
            ($_ -eq "Revoke-OSVpcEndpointAccess/Service")
        }
        {
            $v = "application.opensearchservice.amazonaws.com"
            break
        }

        # Amazon.OpenSearchService.ConnectionMode
        "New-OSOutboundConnection/ConnectionMode"
        {
            $v = "DIRECT","VPC_ENDPOINT"
            break
        }

        # Amazon.OpenSearchService.DataSourceStatus
        "Update-OSDataSource/Status"
        {
            $v = "ACTIVE","DISABLED"
            break
        }

        # Amazon.OpenSearchService.DryRunMode
        "Update-OSDomainConfig/DryRunMode"
        {
            $v = "Basic","Verbose"
            break
        }

        # Amazon.OpenSearchService.EngineType
        "Get-OSDomainNameList/EngineType"
        {
            $v = "Elasticsearch","OpenSearch"
            break
        }

        # Amazon.OpenSearchService.IPAddressType
        {
            ($_ -eq "New-OSDomain/IPAddressType") -Or
            ($_ -eq "Update-OSDomainConfig/IPAddressType")
        }
        {
            $v = "dualstack","ipv4"
            break
        }

        # Amazon.OpenSearchService.MaintenanceStatus
        "Get-OSDomainMaintenanceList/Status"
        {
            $v = "COMPLETED","FAILED","IN_PROGRESS","PENDING","TIMED_OUT"
            break
        }

        # Amazon.OpenSearchService.MaintenanceType
        {
            ($_ -eq "Get-OSDomainMaintenanceList/Action") -Or
            ($_ -eq "Start-OSDomainMaintenance/Action")
        }
        {
            $v = "REBOOT_NODE","RESTART_DASHBOARD","RESTART_SEARCH_PROCESS"
            break
        }

        # Amazon.OpenSearchService.NaturalLanguageQueryGenerationDesiredState
        {
            ($_ -eq "New-OSDomain/NaturalLanguageQueryGenerationOptions_DesiredState") -Or
            ($_ -eq "Update-OSDomainConfig/NaturalLanguageQueryGenerationOptions_DesiredState")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.OpenSearchService.OpenSearchPartitionInstanceType
        {
            ($_ -eq "New-OSDomain/ClusterConfig_DedicatedMasterType") -Or
            ($_ -eq "Update-OSDomainConfig/ClusterConfig_DedicatedMasterType") -Or
            ($_ -eq "New-OSDomain/ClusterConfig_InstanceType") -Or
            ($_ -eq "Update-OSDomainConfig/ClusterConfig_InstanceType") -Or
            ($_ -eq "Get-OSInstanceTypeLimit/InstanceType")
        }
        {
            $v = "c4.2xlarge.search","c4.4xlarge.search","c4.8xlarge.search","c4.large.search","c4.xlarge.search","c5.18xlarge.search","c5.2xlarge.search","c5.4xlarge.search","c5.9xlarge.search","c5.large.search","c5.xlarge.search","c6g.12xlarge.search","c6g.2xlarge.search","c6g.4xlarge.search","c6g.8xlarge.search","c6g.large.search","c6g.xlarge.search","d2.2xlarge.search","d2.4xlarge.search","d2.8xlarge.search","d2.xlarge.search","i2.2xlarge.search","i2.xlarge.search","i3.16xlarge.search","i3.2xlarge.search","i3.4xlarge.search","i3.8xlarge.search","i3.large.search","i3.xlarge.search","m3.2xlarge.search","m3.large.search","m3.medium.search","m3.xlarge.search","m4.10xlarge.search","m4.2xlarge.search","m4.4xlarge.search","m4.large.search","m4.xlarge.search","m5.12xlarge.search","m5.24xlarge.search","m5.2xlarge.search","m5.4xlarge.search","m5.large.search","m5.xlarge.search","m6g.12xlarge.search","m6g.2xlarge.search","m6g.4xlarge.search","m6g.8xlarge.search","m6g.large.search","m6g.xlarge.search","or1.12xlarge.search","or1.16xlarge.search","or1.2xlarge.search","or1.4xlarge.search","or1.8xlarge.search","or1.large.search","or1.medium.search","or1.xlarge.search","r3.2xlarge.search","r3.4xlarge.search","r3.8xlarge.search","r3.large.search","r3.xlarge.search","r4.16xlarge.search","r4.2xlarge.search","r4.4xlarge.search","r4.8xlarge.search","r4.large.search","r4.xlarge.search","r5.12xlarge.search","r5.24xlarge.search","r5.2xlarge.search","r5.4xlarge.search","r5.large.search","r5.xlarge.search","r6g.12xlarge.search","r6g.2xlarge.search","r6g.4xlarge.search","r6g.8xlarge.search","r6g.large.search","r6g.xlarge.search","r6gd.12xlarge.search","r6gd.16xlarge.search","r6gd.2xlarge.search","r6gd.4xlarge.search","r6gd.8xlarge.search","r6gd.large.search","r6gd.xlarge.search","t2.medium.search","t2.micro.search","t2.small.search","t3.2xlarge.search","t3.large.search","t3.medium.search","t3.micro.search","t3.nano.search","t3.small.search","t3.xlarge.search","t4g.medium.search","t4g.small.search","ultrawarm1.large.search","ultrawarm1.medium.search","ultrawarm1.xlarge.search"
            break
        }

        # Amazon.OpenSearchService.OpenSearchWarmPartitionInstanceType
        {
            ($_ -eq "New-OSDomain/ClusterConfig_WarmType") -Or
            ($_ -eq "Update-OSDomainConfig/ClusterConfig_WarmType")
        }
        {
            $v = "ultrawarm1.large.search","ultrawarm1.medium.search","ultrawarm1.xlarge.search"
            break
        }

        # Amazon.OpenSearchService.PackageType
        "New-OSPackage/PackageType"
        {
            $v = "TXT-DICTIONARY","ZIP-PLUGIN"
            break
        }

        # Amazon.OpenSearchService.RolesKeyIdCOption
        {
            ($_ -eq "New-OSDomain/IdentityCenterOptions_RolesKey") -Or
            ($_ -eq "Update-OSDomainConfig/IdentityCenterOptions_RolesKey")
        }
        {
            $v = "GroupId","GroupName"
            break
        }

        # Amazon.OpenSearchService.RollbackOnDisable
        "Update-OSDomainConfig/AutoTuneOptions_RollbackOnDisable"
        {
            $v = "DEFAULT_ROLLBACK","NO_ROLLBACK"
            break
        }

        # Amazon.OpenSearchService.ScheduleAt
        {
            ($_ -eq "Start-OSServiceSoftwareUpdate/ScheduleAt") -Or
            ($_ -eq "Update-OSScheduledAction/ScheduleAt")
        }
        {
            $v = "NOW","OFF_PEAK_WINDOW","TIMESTAMP"
            break
        }

        # Amazon.OpenSearchService.SkipUnavailableStatus
        "New-OSOutboundConnection/CrossClusterSearch_SkipUnavailable"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.OpenSearchService.SubjectKeyIdCOption
        {
            ($_ -eq "New-OSDomain/IdentityCenterOptions_SubjectKey") -Or
            ($_ -eq "Update-OSDomainConfig/IdentityCenterOptions_SubjectKey")
        }
        {
            $v = "Email","UserId","UserName"
            break
        }

        # Amazon.OpenSearchService.TLSSecurityPolicy
        {
            ($_ -eq "New-OSDomain/DomainEndpointOptions_TLSSecurityPolicy") -Or
            ($_ -eq "Update-OSDomainConfig/DomainEndpointOptions_TLSSecurityPolicy")
        }
        {
            $v = "Policy-Min-TLS-1-0-2019-07","Policy-Min-TLS-1-2-2019-07","Policy-Min-TLS-1-2-PFS-2023-10"
            break
        }

        # Amazon.OpenSearchService.VolumeType
        {
            ($_ -eq "New-OSDomain/EBSOptions_VolumeType") -Or
            ($_ -eq "Update-OSDomainConfig/EBSOptions_VolumeType")
        }
        {
            $v = "gp2","gp3","io1","standard"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OS_map = @{
    "Action"=@("Get-OSDomainMaintenanceList","Start-OSDomainMaintenance")
    "ActionType"=@("Update-OSScheduledAction")
    "AutoTuneOptions_DesiredState"=@("New-OSDomain","Update-OSDomainConfig")
    "AutoTuneOptions_RollbackOnDisable"=@("Update-OSDomainConfig")
    "ClusterConfig_DedicatedMasterType"=@("New-OSDomain","Update-OSDomainConfig")
    "ClusterConfig_InstanceType"=@("New-OSDomain","Update-OSDomainConfig")
    "ClusterConfig_WarmType"=@("New-OSDomain","Update-OSDomainConfig")
    "ConnectionMode"=@("New-OSOutboundConnection")
    "CrossClusterSearch_SkipUnavailable"=@("New-OSOutboundConnection")
    "DomainEndpointOptions_TLSSecurityPolicy"=@("New-OSDomain","Update-OSDomainConfig")
    "DryRunMode"=@("Update-OSDomainConfig")
    "EBSOptions_VolumeType"=@("New-OSDomain","Update-OSDomainConfig")
    "EngineType"=@("Get-OSDomainNameList")
    "IdentityCenterOptions_RolesKey"=@("New-OSDomain","Update-OSDomainConfig")
    "IdentityCenterOptions_SubjectKey"=@("New-OSDomain","Update-OSDomainConfig")
    "InstanceType"=@("Get-OSInstanceTypeLimit")
    "IPAddressType"=@("New-OSDomain","Update-OSDomainConfig")
    "NaturalLanguageQueryGenerationOptions_DesiredState"=@("New-OSDomain","Update-OSDomainConfig")
    "PackageType"=@("New-OSPackage")
    "ScheduleAt"=@("Start-OSServiceSoftwareUpdate","Update-OSScheduledAction")
    "Service"=@("Approve-OSVpcEndpointAccess","Revoke-OSVpcEndpointAccess")
    "Status"=@("Get-OSDomainMaintenanceList","Update-OSDataSource")
}

_awsArgumentCompleterRegistration $OS_Completers $OS_map

$OS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.OS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OS_SelectMap = @{
    "Select"=@("Approve-OSInboundConnection",
               "Add-OSDataSource",
               "Add-OSResourceTag",
               "Start-OSAssociatePackage",
               "Approve-OSVpcEndpointAccess",
               "Stop-OSDomainConfigChange",
               "Stop-OSServiceSoftwareUpdate",
               "New-OSApplication",
               "New-OSDomain",
               "New-OSOutboundConnection",
               "New-OSPackage",
               "New-OSVpcEndpoint",
               "Remove-OSApplication",
               "Remove-OSDataSource",
               "Remove-OSDomain",
               "Remove-OSInboundConnection",
               "Remove-OSOutboundConnection",
               "Remove-OSPackage",
               "Remove-OSVpcEndpoint",
               "Get-OSDomain",
               "Get-OSDomainAutoTune",
               "Get-OSDomainChangeProgress",
               "Get-OSDomainConfig",
               "Get-OSDomainHealth",
               "Get-OSDomainNode",
               "Get-OSDomainList",
               "Get-OSDryRunProgress",
               "Get-OSInboundConnection",
               "Get-OSInstanceTypeLimit",
               "Get-OSOutboundConnection",
               "Get-OSPackage",
               "Get-OSReservedInstanceOfferingList",
               "Get-OSReservedInstanceList",
               "Get-OSVpcEndpoint",
               "Start-OSDissociatePackage",
               "Get-OSApplication",
               "Get-OSCompatibleVersion",
               "Get-OSDataSource",
               "Get-OSDomainMaintenanceStatus",
               "Get-OSPackageVersionHistory",
               "Get-OSUpgradeHistory",
               "Get-OSUpgradeStatus",
               "Get-OSApplicationList",
               "Get-OSDataSourceList",
               "Get-OSDomainMaintenanceList",
               "Get-OSDomainNameList",
               "Get-OSDomainsForPackageList",
               "Get-OSInstanceTypeDetailList",
               "Get-OSPackagesForDomainList",
               "Get-OSScheduledActionList",
               "Get-OSResourceTag",
               "Get-OSVersionList",
               "Get-OSVpcEndpointAccessList",
               "Get-OSVpcEndpointList",
               "Get-OSVpcEndpointsForDomainList",
               "New-OSReservedInstanceOffering",
               "Deny-OSInboundConnection",
               "Remove-OSResourceTag",
               "Revoke-OSVpcEndpointAccess",
               "Start-OSDomainMaintenance",
               "Start-OSServiceSoftwareUpdate",
               "Update-OSApplication",
               "Update-OSDataSource",
               "Update-OSDomainConfig",
               "Update-OSPackage",
               "Update-OSScheduledAction",
               "Update-OSVpcEndpoint",
               "Update-OSDomain")
}

_awsArgumentCompleterRegistration $OS_SelectCompleters $OS_SelectMap
# Argument completions for service OpenSearch Serverless


$OSS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.OpenSearchServerless.AccessPolicyType
        {
            ($_ -eq "Get-OSSAccessPolicy/Type") -Or
            ($_ -eq "Get-OSSAccessPolicyList/Type") -Or
            ($_ -eq "New-OSSAccessPolicy/Type") -Or
            ($_ -eq "Remove-OSSAccessPolicy/Type") -Or
            ($_ -eq "Update-OSSAccessPolicy/Type")
        }
        {
            $v = "data"
            break
        }

        # Amazon.OpenSearchServerless.CollectionStatus
        "Get-OSSCollectionList/CollectionFilters_Status"
        {
            $v = "ACTIVE","CREATING","DELETING","FAILED"
            break
        }

        # Amazon.OpenSearchServerless.CollectionType
        "New-OSSCollection/Type"
        {
            $v = "SEARCH","TIMESERIES","VECTORSEARCH"
            break
        }

        # Amazon.OpenSearchServerless.IamIdentityCenterGroupAttribute
        {
            ($_ -eq "New-OSSSecurityConfig/IamIdentityCenterOptions_GroupAttribute") -Or
            ($_ -eq "Update-OSSSecurityConfig/IamIdentityCenterOptionsUpdates_GroupAttribute")
        }
        {
            $v = "GroupId","GroupName"
            break
        }

        # Amazon.OpenSearchServerless.IamIdentityCenterUserAttribute
        {
            ($_ -eq "New-OSSSecurityConfig/IamIdentityCenterOptions_UserAttribute") -Or
            ($_ -eq "Update-OSSSecurityConfig/IamIdentityCenterOptionsUpdates_UserAttribute")
        }
        {
            $v = "Email","UserId","UserName"
            break
        }

        # Amazon.OpenSearchServerless.LifecyclePolicyType
        {
            ($_ -eq "Get-OSSLifecyclePolicyList/Type") -Or
            ($_ -eq "New-OSSLifecyclePolicy/Type") -Or
            ($_ -eq "Remove-OSSLifecyclePolicy/Type") -Or
            ($_ -eq "Update-OSSLifecyclePolicy/Type")
        }
        {
            $v = "retention"
            break
        }

        # Amazon.OpenSearchServerless.SecurityConfigType
        {
            ($_ -eq "Get-OSSSecurityConfigList/Type") -Or
            ($_ -eq "New-OSSSecurityConfig/Type")
        }
        {
            $v = "iamidentitycenter","saml"
            break
        }

        # Amazon.OpenSearchServerless.SecurityPolicyType
        {
            ($_ -eq "Get-OSSSecurityPolicy/Type") -Or
            ($_ -eq "Get-OSSSecurityPolicyList/Type") -Or
            ($_ -eq "New-OSSSecurityPolicy/Type") -Or
            ($_ -eq "Remove-OSSSecurityPolicy/Type") -Or
            ($_ -eq "Update-OSSSecurityPolicy/Type")
        }
        {
            $v = "encryption","network"
            break
        }

        # Amazon.OpenSearchServerless.StandbyReplicas
        "New-OSSCollection/StandbyReplica"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.OpenSearchServerless.VpcEndpointStatus
        "Get-OSSVpcEndpointList/VpcEndpointFilters_Status"
        {
            $v = "ACTIVE","DELETING","FAILED","PENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OSS_map = @{
    "CollectionFilters_Status"=@("Get-OSSCollectionList")
    "IamIdentityCenterOptions_GroupAttribute"=@("New-OSSSecurityConfig")
    "IamIdentityCenterOptions_UserAttribute"=@("New-OSSSecurityConfig")
    "IamIdentityCenterOptionsUpdates_GroupAttribute"=@("Update-OSSSecurityConfig")
    "IamIdentityCenterOptionsUpdates_UserAttribute"=@("Update-OSSSecurityConfig")
    "StandbyReplica"=@("New-OSSCollection")
    "Type"=@("Get-OSSAccessPolicy","Get-OSSAccessPolicyList","Get-OSSLifecyclePolicyList","Get-OSSSecurityConfigList","Get-OSSSecurityPolicy","Get-OSSSecurityPolicyList","New-OSSAccessPolicy","New-OSSCollection","New-OSSLifecyclePolicy","New-OSSSecurityConfig","New-OSSSecurityPolicy","Remove-OSSAccessPolicy","Remove-OSSLifecyclePolicy","Remove-OSSSecurityPolicy","Update-OSSAccessPolicy","Update-OSSLifecyclePolicy","Update-OSSSecurityPolicy")
    "VpcEndpointFilters_Status"=@("Get-OSSVpcEndpointList")
}

_awsArgumentCompleterRegistration $OSS_Completers $OSS_map

$OSS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.OSS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OSS_SelectMap = @{
    "Select"=@("Get-OSSGetCollection",
               "Get-OSSGetEffectiveLifecyclePolicy",
               "Get-OSSGetLifecyclePolicy",
               "Get-OSSGetVpcEndpoint",
               "New-OSSAccessPolicy",
               "New-OSSCollection",
               "New-OSSLifecyclePolicy",
               "New-OSSSecurityConfig",
               "New-OSSSecurityPolicy",
               "New-OSSVpcEndpoint",
               "Remove-OSSAccessPolicy",
               "Remove-OSSCollection",
               "Remove-OSSLifecyclePolicy",
               "Remove-OSSSecurityConfig",
               "Remove-OSSSecurityPolicy",
               "Remove-OSSVpcEndpoint",
               "Get-OSSAccessPolicy",
               "Get-OSSAccountSetting",
               "Get-OSSPoliciesStat",
               "Get-OSSSecurityConfig",
               "Get-OSSSecurityPolicy",
               "Get-OSSAccessPolicyList",
               "Get-OSSCollectionList",
               "Get-OSSLifecyclePolicyList",
               "Get-OSSSecurityConfigList",
               "Get-OSSSecurityPolicyList",
               "Get-OSSResourceTag",
               "Get-OSSVpcEndpointList",
               "Add-OSSResourceTag",
               "Remove-OSSResourceTag",
               "Update-OSSAccessPolicy",
               "Update-OSSAccountSetting",
               "Update-OSSCollection",
               "Update-OSSLifecyclePolicy",
               "Update-OSSSecurityConfig",
               "Update-OSSSecurityPolicy",
               "Update-OSSVpcEndpoint")
}

_awsArgumentCompleterRegistration $OSS_SelectCompleters $OSS_SelectMap
# Argument completions for service AWS OpsWorks


$OPS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.OpsWorks.AppType
        {
            ($_ -eq "New-OPSApp/Type") -Or
            ($_ -eq "Update-OPSApp/Type")
        }
        {
            $v = "aws-flow-ruby","java","nodejs","other","php","rails","static"
            break
        }

        # Amazon.OpsWorks.Architecture
        {
            ($_ -eq "New-OPSInstance/Architecture") -Or
            ($_ -eq "Update-OPSInstance/Architecture")
        }
        {
            $v = "i386","x86_64"
            break
        }

        # Amazon.OpsWorks.AutoScalingType
        {
            ($_ -eq "New-OPSInstance/AutoScalingType") -Or
            ($_ -eq "Update-OPSInstance/AutoScalingType")
        }
        {
            $v = "load","timer"
            break
        }

        # Amazon.OpsWorks.DeploymentCommandName
        "New-OPSDeployment/Command_Name"
        {
            $v = "configure","deploy","execute_recipes","install_dependencies","restart","rollback","setup","start","stop","undeploy","update_custom_cookbooks","update_dependencies"
            break
        }

        # Amazon.OpsWorks.LayerType
        "New-OPSLayer/Type"
        {
            $v = "aws-flow-ruby","custom","db-master","ecs-cluster","java-app","lb","memcached","monitoring-master","nodejs-app","php-app","rails-app","web"
            break
        }

        # Amazon.OpsWorks.RootDeviceType
        {
            ($_ -eq "Copy-OPSStack/DefaultRootDeviceType") -Or
            ($_ -eq "New-OPSStack/DefaultRootDeviceType") -Or
            ($_ -eq "Update-OPSStack/DefaultRootDeviceType") -Or
            ($_ -eq "New-OPSInstance/RootDeviceType")
        }
        {
            $v = "ebs","instance-store"
            break
        }

        # Amazon.OpsWorks.SourceType
        {
            ($_ -eq "New-OPSApp/AppSource_Type") -Or
            ($_ -eq "Update-OPSApp/AppSource_Type") -Or
            ($_ -eq "Copy-OPSStack/CustomCookbooksSource_Type") -Or
            ($_ -eq "New-OPSStack/CustomCookbooksSource_Type") -Or
            ($_ -eq "Update-OPSStack/CustomCookbooksSource_Type")
        }
        {
            $v = "archive","git","s3","svn"
            break
        }

        # Amazon.OpsWorks.VirtualizationType
        "New-OPSInstance/VirtualizationType"
        {
            $v = "hvm","paravirtual"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OPS_map = @{
    "AppSource_Type"=@("New-OPSApp","Update-OPSApp")
    "Architecture"=@("New-OPSInstance","Update-OPSInstance")
    "AutoScalingType"=@("New-OPSInstance","Update-OPSInstance")
    "Command_Name"=@("New-OPSDeployment")
    "CustomCookbooksSource_Type"=@("Copy-OPSStack","New-OPSStack","Update-OPSStack")
    "DefaultRootDeviceType"=@("Copy-OPSStack","New-OPSStack","Update-OPSStack")
    "RootDeviceType"=@("New-OPSInstance")
    "Type"=@("New-OPSApp","New-OPSLayer","Update-OPSApp")
    "VirtualizationType"=@("New-OPSInstance")
}

_awsArgumentCompleterRegistration $OPS_Completers $OPS_map

$OPS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.OPS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OPS_SelectMap = @{
    "Select"=@("Register-OPSInstanceAssignment",
               "Add-OPSVolume",
               "Add-OPSElasticIp",
               "Add-OPSElasticLoadBalancer",
               "Copy-OPSStack",
               "New-OPSApp",
               "New-OPSDeployment",
               "New-OPSInstance",
               "New-OPSLayer",
               "New-OPSStack",
               "New-OPSUserProfile",
               "Remove-OPSApp",
               "Remove-OPSInstance",
               "Remove-OPSLayer",
               "Remove-OPSStack",
               "Remove-OPSUserProfile",
               "Unregister-OPSEcsCluster",
               "Unregister-OPSElasticIp",
               "Unregister-OPSInstance",
               "Unregister-OPSRdsDbInstance",
               "Unregister-OPSVolume",
               "Get-OPSAgentVersion",
               "Get-OPSApp",
               "Get-OPSCommand",
               "Get-OPSDeployment",
               "Get-OPSEcsCluster",
               "Get-OPSElasticIp",
               "Get-OPSElasticLoadBalancer",
               "Get-OPSInstance",
               "Get-OPSLayer",
               "Get-OPSLoadBasedAutoScaling",
               "Get-OPSMyUserProfile",
               "Get-OPSOperatingSystem",
               "Get-OPSPermission",
               "Get-OPSRaidArray",
               "Get-OPSRdsDbInstance",
               "Get-OPSServiceError",
               "Get-OPSStackProvisioningParameter",
               "Get-OPSStack",
               "Get-OPSStackSummary",
               "Get-OPSTimeBasedAutoScaling",
               "Get-OPSUserProfile",
               "Get-OPSVolume",
               "Dismount-OPSElasticLoadBalancer",
               "Remove-OPSElasticIp",
               "Get-OPSHostnameSuggestion",
               "Grant-OPSAccess",
               "Get-OPSResourceTag",
               "Restart-OPSInstance",
               "Register-OPSEcsCluster",
               "Register-OPSElasticIp",
               "Register-OPSInstance",
               "Register-OPSRdsDbInstance",
               "Register-OPSVolume",
               "Set-OPSLoadBasedAutoScaling",
               "Set-OPSPermission",
               "Set-OPSTimeBasedAutoScaling",
               "Start-OPSInstance",
               "Start-OPSStack",
               "Stop-OPSInstance",
               "Stop-OPSStack",
               "Add-OPSResourceTag",
               "Unregister-OPSInstanceAssignment",
               "Remove-OPSVolume",
               "Remove-OPSResourceTag",
               "Update-OPSApp",
               "Update-OPSElasticIp",
               "Update-OPSInstance",
               "Update-OPSLayer",
               "Update-OPSMyUserProfile",
               "Update-OPSRdsDbInstance",
               "Update-OPSStack",
               "Update-OPSUserProfile",
               "Update-OPSVolume")
}

_awsArgumentCompleterRegistration $OPS_SelectCompleters $OPS_SelectMap
# Argument completions for service AWS OpsWorksCM


$OWCM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.OWCM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OWCM_SelectMap = @{
    "Select"=@("Add-OWCMNode",
               "New-OWCMBackup",
               "New-OWCMServer",
               "Remove-OWCMBackup",
               "Remove-OWCMServer",
               "Get-OWCMAccountAttribute",
               "Get-OWCMBackupList",
               "Get-OWCMEventList",
               "Get-OWCMNodeAssociationStatus",
               "Get-OWCMServerList",
               "Remove-OWCMNode",
               "Export-OWCMServerEngineAttribute",
               "Get-OWCMResourceTag",
               "Restore-OWCMServer",
               "Start-OWCMMaintenance",
               "Add-OWCMResourceTag",
               "Remove-OWCMResourceTag",
               "Update-OWCMServer",
               "Update-OWCMServerEngineAttribute")
}

_awsArgumentCompleterRegistration $OWCM_SelectCompleters $OWCM_SelectMap
# Argument completions for service AWS Organizations


$ORG_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Organizations.ActionType
        {
            ($_ -eq "Get-ORGAccountHandshakeList/Filter_ActionType") -Or
            ($_ -eq "Get-ORGOrganizationHandshakeList/Filter_ActionType")
        }
        {
            $v = "ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE","APPROVE_ALL_FEATURES","ENABLE_ALL_FEATURES","INVITE"
            break
        }

        # Amazon.Organizations.ChildType
        "Get-ORGChild/ChildType"
        {
            $v = "ACCOUNT","ORGANIZATIONAL_UNIT"
            break
        }

        # Amazon.Organizations.EffectivePolicyType
        "Get-ORGEffectivePolicy/PolicyType"
        {
            $v = "AISERVICES_OPT_OUT_POLICY","BACKUP_POLICY","CHATBOT_POLICY","TAG_POLICY"
            break
        }

        # Amazon.Organizations.HandshakePartyType
        "New-ORGAccountInvitation/Target_Type"
        {
            $v = "ACCOUNT","EMAIL","ORGANIZATION"
            break
        }

        # Amazon.Organizations.IAMUserAccessToBilling
        {
            ($_ -eq "New-ORGAccount/IamUserAccessToBilling") -Or
            ($_ -eq "New-ORGGovCloudAccount/IamUserAccessToBilling")
        }
        {
            $v = "ALLOW","DENY"
            break
        }

        # Amazon.Organizations.OrganizationFeatureSet
        "New-ORGOrganization/FeatureSet"
        {
            $v = "ALL","CONSOLIDATED_BILLING"
            break
        }

        # Amazon.Organizations.PolicyType
        {
            ($_ -eq "Get-ORGPolicyForTarget/Filter") -Or
            ($_ -eq "Get-ORGPolicyList/Filter") -Or
            ($_ -eq "Disable-ORGPolicyType/PolicyType") -Or
            ($_ -eq "Enable-ORGPolicyType/PolicyType") -Or
            ($_ -eq "New-ORGPolicy/Type")
        }
        {
            $v = "AISERVICES_OPT_OUT_POLICY","BACKUP_POLICY","CHATBOT_POLICY","SERVICE_CONTROL_POLICY","TAG_POLICY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ORG_map = @{
    "ChildType"=@("Get-ORGChild")
    "FeatureSet"=@("New-ORGOrganization")
    "Filter"=@("Get-ORGPolicyForTarget","Get-ORGPolicyList")
    "Filter_ActionType"=@("Get-ORGAccountHandshakeList","Get-ORGOrganizationHandshakeList")
    "IamUserAccessToBilling"=@("New-ORGAccount","New-ORGGovCloudAccount")
    "PolicyType"=@("Disable-ORGPolicyType","Enable-ORGPolicyType","Get-ORGEffectivePolicy")
    "Target_Type"=@("New-ORGAccountInvitation")
    "Type"=@("New-ORGPolicy")
}

_awsArgumentCompleterRegistration $ORG_Completers $ORG_map

$ORG_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ORG.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ORG_SelectMap = @{
    "Select"=@("Confirm-ORGHandshake",
               "Add-ORGPolicy",
               "Stop-ORGHandshake",
               "Close-ORGAccount",
               "New-ORGAccount",
               "New-ORGGovCloudAccount",
               "New-ORGOrganization",
               "New-ORGOrganizationalUnit",
               "New-ORGPolicy",
               "Deny-ORGHandshake",
               "Remove-ORGOrganization",
               "Remove-ORGOrganizationalUnit",
               "Remove-ORGPolicy",
               "Remove-ORGResourcePolicy",
               "Unregister-ORGDelegatedAdministrator",
               "Get-ORGAccount",
               "Get-ORGAccountCreationStatus",
               "Get-ORGEffectivePolicy",
               "Get-ORGHandshake",
               "Get-ORGOrganization",
               "Get-ORGOrganizationalUnit",
               "Get-ORGPolicy",
               "Get-ORGResourcePolicy",
               "Dismount-ORGPolicy",
               "Disable-ORGAWSServiceAccess",
               "Disable-ORGPolicyType",
               "Enable-ORGAllFeature",
               "Enable-ORGAWSServiceAccess",
               "Enable-ORGPolicyType",
               "New-ORGAccountInvitation",
               "Remove-ORGOrganizationAssociation",
               "Get-ORGAccountList",
               "Get-ORGAccountForParent",
               "Get-ORGAWSServiceAccessForOrganization",
               "Get-ORGChild",
               "Get-ORGAccountCreationStatusList",
               "Get-ORGDelegatedAdministratorList",
               "Get-ORGDelegatedServicesForAccountList",
               "Get-ORGAccountHandshakeList",
               "Get-ORGOrganizationHandshakeList",
               "Get-ORGOrganizationalUnitList",
               "Get-ORGParent",
               "Get-ORGPolicyList",
               "Get-ORGPolicyForTarget",
               "Get-ORGRoot",
               "Get-ORGResourceTag",
               "Get-ORGTargetForPolicy",
               "Move-ORGAccount",
               "Write-ORGResourcePolicy",
               "Register-ORGDelegatedAdministrator",
               "Remove-ORGAccountFromOrganization",
               "Add-ORGResourceTag",
               "Remove-ORGResourceTag",
               "Update-ORGOrganizationalUnit",
               "Update-ORGPolicy")
}

_awsArgumentCompleterRegistration $ORG_SelectCompleters $ORG_SelectMap
# Argument completions for service Amazon OpenSearch Ingestion


$OSIS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.OSIS.VpcEndpointManagement
        "New-OSISPipeline/VpcOptions_VpcEndpointManagement"
        {
            $v = "CUSTOMER","SERVICE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OSIS_map = @{
    "VpcOptions_VpcEndpointManagement"=@("New-OSISPipeline")
}

_awsArgumentCompleterRegistration $OSIS_Completers $OSIS_map

$OSIS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.OSIS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OSIS_SelectMap = @{
    "Select"=@("New-OSISPipeline",
               "Remove-OSISPipeline",
               "Get-OSISPipeline",
               "Get-OSISPipelineBlueprint",
               "Get-OSISPipelineChangeProgress",
               "Get-OSISPipelineBlueprintList",
               "Get-OSISPipelineList",
               "Get-OSISResourceTag",
               "Start-OSISPipeline",
               "Stop-OSISPipeline",
               "Add-OSISResourceTag",
               "Remove-OSISResourceTag",
               "Update-OSISPipeline",
               "Use-OSISPipeline")
}

_awsArgumentCompleterRegistration $OSIS_SelectCompleters $OSIS_SelectMap
# Argument completions for service AWS Outposts


$OUTP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Outposts.AddressType
        {
            ($_ -eq "Get-OUTPSiteAddress/AddressType") -Or
            ($_ -eq "Update-OUTPSiteAddress/AddressType")
        }
        {
            $v = "OPERATING_ADDRESS","SHIPPING_ADDRESS"
            break
        }

        # Amazon.Outposts.FiberOpticCableType
        {
            ($_ -eq "Update-OUTPSiteRackPhysicalProperty/FiberOpticCableType") -Or
            ($_ -eq "New-OUTPSite/RackPhysicalProperties_FiberOpticCableType")
        }
        {
            $v = "MULTI_MODE","SINGLE_MODE"
            break
        }

        # Amazon.Outposts.MaximumSupportedWeightLbs
        {
            ($_ -eq "Update-OUTPSiteRackPhysicalProperty/MaximumSupportedWeightLb") -Or
            ($_ -eq "New-OUTPSite/RackPhysicalProperties_MaximumSupportedWeightLb")
        }
        {
            $v = "MAX_1400_LBS","MAX_1600_LBS","MAX_1800_LBS","MAX_2000_LBS","NO_LIMIT"
            break
        }

        # Amazon.Outposts.OpticalStandard
        {
            ($_ -eq "Update-OUTPSiteRackPhysicalProperty/OpticalStandard") -Or
            ($_ -eq "New-OUTPSite/RackPhysicalProperties_OpticalStandard")
        }
        {
            $v = "OPTIC_1000BASE_LX","OPTIC_1000BASE_SX","OPTIC_100GBASE_CWDM4","OPTIC_100GBASE_LR4","OPTIC_100GBASE_SR4","OPTIC_100G_PSM4_MSA","OPTIC_10GBASE_IR","OPTIC_10GBASE_LR","OPTIC_10GBASE_SR","OPTIC_40GBASE_ESR","OPTIC_40GBASE_IR4_LR4L","OPTIC_40GBASE_LR4","OPTIC_40GBASE_SR"
            break
        }

        # Amazon.Outposts.PaymentOption
        "New-OUTPOrder/PaymentOption"
        {
            $v = "ALL_UPFRONT","NO_UPFRONT","PARTIAL_UPFRONT"
            break
        }

        # Amazon.Outposts.PaymentTerm
        "New-OUTPOrder/PaymentTerm"
        {
            $v = "ONE_YEAR","THREE_YEARS"
            break
        }

        # Amazon.Outposts.PowerConnector
        {
            ($_ -eq "Update-OUTPSiteRackPhysicalProperty/PowerConnector") -Or
            ($_ -eq "New-OUTPSite/RackPhysicalProperties_PowerConnector")
        }
        {
            $v = "AH530P7W","AH532P6W","IEC309","L6_30P"
            break
        }

        # Amazon.Outposts.PowerDrawKva
        {
            ($_ -eq "Update-OUTPSiteRackPhysicalProperty/PowerDrawKva") -Or
            ($_ -eq "New-OUTPSite/RackPhysicalProperties_PowerDrawKva")
        }
        {
            $v = "POWER_10_KVA","POWER_15_KVA","POWER_30_KVA","POWER_5_KVA"
            break
        }

        # Amazon.Outposts.PowerFeedDrop
        {
            ($_ -eq "Update-OUTPSiteRackPhysicalProperty/PowerFeedDrop") -Or
            ($_ -eq "New-OUTPSite/RackPhysicalProperties_PowerFeedDrop")
        }
        {
            $v = "ABOVE_RACK","BELOW_RACK"
            break
        }

        # Amazon.Outposts.PowerPhase
        {
            ($_ -eq "Update-OUTPSiteRackPhysicalProperty/PowerPhase") -Or
            ($_ -eq "New-OUTPSite/RackPhysicalProperties_PowerPhase")
        }
        {
            $v = "SINGLE_PHASE","THREE_PHASE"
            break
        }

        # Amazon.Outposts.SupportedHardwareType
        {
            ($_ -eq "New-OUTPOutpost/SupportedHardwareType") -Or
            ($_ -eq "Update-OUTPOutpost/SupportedHardwareType")
        }
        {
            $v = "RACK","SERVER"
            break
        }

        # Amazon.Outposts.UplinkCount
        {
            ($_ -eq "New-OUTPSite/RackPhysicalProperties_UplinkCount") -Or
            ($_ -eq "Update-OUTPSiteRackPhysicalProperty/UplinkCount")
        }
        {
            $v = "UPLINK_COUNT_1","UPLINK_COUNT_12","UPLINK_COUNT_16","UPLINK_COUNT_2","UPLINK_COUNT_3","UPLINK_COUNT_4","UPLINK_COUNT_5","UPLINK_COUNT_6","UPLINK_COUNT_7","UPLINK_COUNT_8"
            break
        }

        # Amazon.Outposts.UplinkGbps
        {
            ($_ -eq "New-OUTPSite/RackPhysicalProperties_UplinkGbp") -Or
            ($_ -eq "Update-OUTPSiteRackPhysicalProperty/UplinkGbp")
        }
        {
            $v = "UPLINK_100G","UPLINK_10G","UPLINK_1G","UPLINK_40G"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OUTP_map = @{
    "AddressType"=@("Get-OUTPSiteAddress","Update-OUTPSiteAddress")
    "FiberOpticCableType"=@("Update-OUTPSiteRackPhysicalProperty")
    "MaximumSupportedWeightLb"=@("Update-OUTPSiteRackPhysicalProperty")
    "OpticalStandard"=@("Update-OUTPSiteRackPhysicalProperty")
    "PaymentOption"=@("New-OUTPOrder")
    "PaymentTerm"=@("New-OUTPOrder")
    "PowerConnector"=@("Update-OUTPSiteRackPhysicalProperty")
    "PowerDrawKva"=@("Update-OUTPSiteRackPhysicalProperty")
    "PowerFeedDrop"=@("Update-OUTPSiteRackPhysicalProperty")
    "PowerPhase"=@("Update-OUTPSiteRackPhysicalProperty")
    "RackPhysicalProperties_FiberOpticCableType"=@("New-OUTPSite")
    "RackPhysicalProperties_MaximumSupportedWeightLb"=@("New-OUTPSite")
    "RackPhysicalProperties_OpticalStandard"=@("New-OUTPSite")
    "RackPhysicalProperties_PowerConnector"=@("New-OUTPSite")
    "RackPhysicalProperties_PowerDrawKva"=@("New-OUTPSite")
    "RackPhysicalProperties_PowerFeedDrop"=@("New-OUTPSite")
    "RackPhysicalProperties_PowerPhase"=@("New-OUTPSite")
    "RackPhysicalProperties_UplinkCount"=@("New-OUTPSite")
    "RackPhysicalProperties_UplinkGbp"=@("New-OUTPSite")
    "SupportedHardwareType"=@("New-OUTPOutpost","Update-OUTPOutpost")
    "UplinkCount"=@("Update-OUTPSiteRackPhysicalProperty")
    "UplinkGbp"=@("Update-OUTPSiteRackPhysicalProperty")
}

_awsArgumentCompleterRegistration $OUTP_Completers $OUTP_map

$OUTP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.OUTP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$OUTP_SelectMap = @{
    "Select"=@("Stop-OUTPCapacityTask",
               "Stop-OUTPOrder",
               "New-OUTPOrder",
               "New-OUTPOutpost",
               "New-OUTPSite",
               "Remove-OUTPOutpost",
               "Remove-OUTPSite",
               "Get-OUTPCapacityTask",
               "Get-OUTPCatalogItem",
               "Get-OUTPConnection",
               "Get-OUTPOrder",
               "Get-OUTPOutpost",
               "Get-OUTPOutpostInstanceType",
               "Get-OUTPOutpostSupportedInstanceType",
               "Get-OUTPSite",
               "Get-OUTPSiteAddress",
               "Get-OUTPAssetList",
               "Get-OUTPCapacityTaskList",
               "Get-OUTPCatalogItemList",
               "Get-OUTPOrderList",
               "Get-OUTPOutpostList",
               "Get-OUTPSiteList",
               "Get-OUTPResourceTag",
               "Start-OUTPCapacityTask",
               "Start-OUTPConnection",
               "Add-OUTPResourceTag",
               "Remove-OUTPResourceTag",
               "Update-OUTPOutpost",
               "Update-OUTPSite",
               "Update-OUTPSiteAddress",
               "Update-OUTPSiteRackPhysicalProperty")
}

_awsArgumentCompleterRegistration $OUTP_SelectCompleters $OUTP_SelectMap
# Argument completions for service AWS Panorama


$PAN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Panorama.ConnectionType
        {
            ($_ -eq "Register-PANDevice/Ethernet0_ConnectionType") -Or
            ($_ -eq "Register-PANDevice/Ethernet1_ConnectionType")
        }
        {
            $v = "DHCP","STATIC_IP"
            break
        }

        # Amazon.Panorama.DeviceAggregatedStatus
        "Get-PANDeviceList/DeviceAggregatedStatusFilter"
        {
            $v = "AWAITING_PROVISIONING","DELETING","ERROR","FAILED","LEASE_EXPIRED","OFFLINE","ONLINE","PENDING","REBOOTING","UPDATE_NEEDED"
            break
        }

        # Amazon.Panorama.JobType
        "New-PANJobForDevice/JobType"
        {
            $v = "OTA","REBOOT"
            break
        }

        # Amazon.Panorama.ListDevicesSortBy
        "Get-PANDeviceList/SortBy"
        {
            $v = "CREATED_TIME","DEVICE_AGGREGATED_STATUS","DEVICE_ID","NAME"
            break
        }

        # Amazon.Panorama.NodeCategory
        "Get-PANNodeList/Category"
        {
            $v = "BUSINESS_LOGIC","MEDIA_SINK","MEDIA_SOURCE","ML_MODEL"
            break
        }

        # Amazon.Panorama.PackageImportJobType
        "New-PANPackageImportJob/JobType"
        {
            $v = "MARKETPLACE_NODE_PACKAGE_VERSION","NODE_PACKAGE_VERSION"
            break
        }

        # Amazon.Panorama.SortOrder
        "Get-PANDeviceList/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.Panorama.StatusFilter
        "Get-PANApplicationInstanceList/StatusFilter"
        {
            $v = "DEPLOYMENT_ERROR","DEPLOYMENT_FAILED","DEPLOYMENT_SUCCEEDED","PROCESSING_DEPLOYMENT","PROCESSING_REMOVAL","REMOVAL_FAILED","REMOVAL_SUCCEEDED"
            break
        }

        # Amazon.Panorama.TemplateType
        "New-PANNodeFromTemplateJob/TemplateType"
        {
            $v = "RTSP_CAMERA_STREAM"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PAN_map = @{
    "Category"=@("Get-PANNodeList")
    "DeviceAggregatedStatusFilter"=@("Get-PANDeviceList")
    "Ethernet0_ConnectionType"=@("Register-PANDevice")
    "Ethernet1_ConnectionType"=@("Register-PANDevice")
    "JobType"=@("New-PANJobForDevice","New-PANPackageImportJob")
    "SortBy"=@("Get-PANDeviceList")
    "SortOrder"=@("Get-PANDeviceList")
    "StatusFilter"=@("Get-PANApplicationInstanceList")
    "TemplateType"=@("New-PANNodeFromTemplateJob")
}

_awsArgumentCompleterRegistration $PAN_Completers $PAN_map

$PAN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PAN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PAN_SelectMap = @{
    "Select"=@("New-PANApplicationInstance",
               "New-PANJobForDevice",
               "New-PANNodeFromTemplateJob",
               "New-PANPackage",
               "New-PANPackageImportJob",
               "Remove-PANDevice",
               "Remove-PANPackage",
               "Unregister-PANPackageVersion",
               "Get-PANApplicationInstance",
               "Get-PANApplicationInstanceDetail",
               "Get-PANDevice",
               "Get-PANDeviceJob",
               "Get-PANNode",
               "Get-PANNodeFromTemplateJob",
               "Get-PANPackage",
               "Get-PANPackageImportJob",
               "Get-PANPackageVersion",
               "Get-PANApplicationInstanceDependencyList",
               "Get-PANApplicationInstanceNodeInstanceList",
               "Get-PANApplicationInstanceList",
               "Get-PANDeviceList",
               "Get-PANDevicesJobList",
               "Get-PANNodeFromTemplateJobList",
               "Get-PANNodeList",
               "Get-PANPackageImportJobList",
               "Get-PANPackageList",
               "Get-PANResourceTag",
               "Register-PANDevice",
               "Register-PANPackageVersion",
               "Remove-PANApplicationInstance",
               "Send-PANApplicationInstanceNodeInstance",
               "Add-PANResourceTag",
               "Remove-PANResourceTag",
               "Update-PANDeviceMetadata")
}

_awsArgumentCompleterRegistration $PAN_SelectCompleters $PAN_SelectMap
# Argument completions for service Payment Cryptography Control Plane


$PAYCC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.PaymentCryptography.KeyAlgorithm
        {
            ($_ -eq "Import-PAYCCKey/KeyAttributes_KeyAlgorithm") -Or
            ($_ -eq "New-PAYCCKey/KeyAttributes_KeyAlgorithm") -Or
            ($_ -eq "Import-PAYCCKey/KeyMaterial_KeyCryptogram_KeyAttributes_KeyAlgorithm") -Or
            ($_ -eq "Import-PAYCCKey/KeyMaterial_RootCertificatePublicKey_KeyAttributes_KeyAlgorithm") -Or
            ($_ -eq "Get-PAYCCParametersForExport/SigningKeyAlgorithm") -Or
            ($_ -eq "Get-PAYCCParametersForImport/WrappingKeyAlgorithm")
        }
        {
            $v = "AES_128","AES_192","AES_256","ECC_NIST_P256","ECC_NIST_P384","RSA_2048","RSA_3072","RSA_4096","TDES_2KEY","TDES_3KEY"
            break
        }

        # Amazon.PaymentCryptography.KeyCheckValueAlgorithm
        {
            ($_ -eq "Export-PAYCCKey/ExportAttributes_KeyCheckValueAlgorithm") -Or
            ($_ -eq "Import-PAYCCKey/KeyCheckValueAlgorithm") -Or
            ($_ -eq "New-PAYCCKey/KeyCheckValueAlgorithm")
        }
        {
            $v = "ANSI_X9_24","CMAC"
            break
        }

        # Amazon.PaymentCryptography.KeyClass
        {
            ($_ -eq "Import-PAYCCKey/KeyAttributes_KeyClass") -Or
            ($_ -eq "New-PAYCCKey/KeyAttributes_KeyClass") -Or
            ($_ -eq "Import-PAYCCKey/KeyMaterial_KeyCryptogram_KeyAttributes_KeyClass") -Or
            ($_ -eq "Import-PAYCCKey/KeyMaterial_RootCertificatePublicKey_KeyAttributes_KeyClass")
        }
        {
            $v = "ASYMMETRIC_KEY_PAIR","PRIVATE_KEY","PUBLIC_KEY","SYMMETRIC_KEY"
            break
        }

        # Amazon.PaymentCryptography.KeyExportability
        {
            ($_ -eq "Export-PAYCCKey/KeyBlockHeaders_KeyExportability") -Or
            ($_ -eq "Export-PAYCCKey/KeyMaterial_Tr34KeyBlock_KeyBlockHeaders_KeyExportability")
        }
        {
            $v = "EXPORTABLE","NON_EXPORTABLE","SENSITIVE"
            break
        }

        # Amazon.PaymentCryptography.KeyMaterialType
        {
            ($_ -eq "Get-PAYCCParametersForExport/KeyMaterialType") -Or
            ($_ -eq "Get-PAYCCParametersForImport/KeyMaterialType")
        }
        {
            $v = "KEY_CRYPTOGRAM","ROOT_PUBLIC_KEY_CERTIFICATE","TR31_KEY_BLOCK","TR34_KEY_BLOCK","TRUSTED_PUBLIC_KEY_CERTIFICATE"
            break
        }

        # Amazon.PaymentCryptography.KeyState
        "Get-PAYCCKeyList/KeyState"
        {
            $v = "CREATE_COMPLETE","CREATE_IN_PROGRESS","DELETE_COMPLETE","DELETE_PENDING"
            break
        }

        # Amazon.PaymentCryptography.KeyUsage
        {
            ($_ -eq "Import-PAYCCKey/KeyAttributes_KeyUsage") -Or
            ($_ -eq "New-PAYCCKey/KeyAttributes_KeyUsage") -Or
            ($_ -eq "Import-PAYCCKey/KeyMaterial_KeyCryptogram_KeyAttributes_KeyUsage") -Or
            ($_ -eq "Import-PAYCCKey/KeyMaterial_RootCertificatePublicKey_KeyAttributes_KeyUsage")
        }
        {
            $v = "TR31_B0_BASE_DERIVATION_KEY","TR31_C0_CARD_VERIFICATION_KEY","TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY","TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION","TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS","TR31_E1_EMV_MKEY_CONFIDENTIALITY","TR31_E2_EMV_MKEY_INTEGRITY","TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS","TR31_E5_EMV_MKEY_CARD_PERSONALIZATION","TR31_E6_EMV_MKEY_OTHER","TR31_K0_KEY_ENCRYPTION_KEY","TR31_K1_KEY_BLOCK_PROTECTION_KEY","TR31_K2_TR34_ASYMMETRIC_KEY","TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT","TR31_M1_ISO_9797_1_MAC_KEY","TR31_M3_ISO_9797_3_MAC_KEY","TR31_M6_ISO_9797_5_CMAC_KEY","TR31_M7_HMAC_KEY","TR31_P0_PIN_ENCRYPTION_KEY","TR31_P1_PIN_GENERATION_KEY","TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE","TR31_V1_IBM3624_PIN_VERIFICATION_KEY","TR31_V2_VISA_PIN_VERIFICATION_KEY"
            break
        }

        # Amazon.PaymentCryptography.Tr34KeyBlockFormat
        {
            ($_ -eq "Export-PAYCCKey/Tr34KeyBlock_KeyBlockFormat") -Or
            ($_ -eq "Import-PAYCCKey/Tr34KeyBlock_KeyBlockFormat")
        }
        {
            $v = "X9_TR34_2012"
            break
        }

        # Amazon.PaymentCryptography.WrappingKeySpec
        {
            ($_ -eq "Export-PAYCCKey/KeyCryptogram_WrappingSpec") -Or
            ($_ -eq "Import-PAYCCKey/KeyCryptogram_WrappingSpec")
        }
        {
            $v = "RSA_OAEP_SHA_256","RSA_OAEP_SHA_512"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PAYCC_map = @{
    "ExportAttributes_KeyCheckValueAlgorithm"=@("Export-PAYCCKey")
    "KeyAttributes_KeyAlgorithm"=@("Import-PAYCCKey","New-PAYCCKey")
    "KeyAttributes_KeyClass"=@("Import-PAYCCKey","New-PAYCCKey")
    "KeyAttributes_KeyUsage"=@("Import-PAYCCKey","New-PAYCCKey")
    "KeyBlockHeaders_KeyExportability"=@("Export-PAYCCKey")
    "KeyCheckValueAlgorithm"=@("Import-PAYCCKey","New-PAYCCKey")
    "KeyCryptogram_WrappingSpec"=@("Export-PAYCCKey","Import-PAYCCKey")
    "KeyMaterial_KeyCryptogram_KeyAttributes_KeyAlgorithm"=@("Import-PAYCCKey")
    "KeyMaterial_KeyCryptogram_KeyAttributes_KeyClass"=@("Import-PAYCCKey")
    "KeyMaterial_KeyCryptogram_KeyAttributes_KeyUsage"=@("Import-PAYCCKey")
    "KeyMaterial_RootCertificatePublicKey_KeyAttributes_KeyAlgorithm"=@("Import-PAYCCKey")
    "KeyMaterial_RootCertificatePublicKey_KeyAttributes_KeyClass"=@("Import-PAYCCKey")
    "KeyMaterial_RootCertificatePublicKey_KeyAttributes_KeyUsage"=@("Import-PAYCCKey")
    "KeyMaterial_Tr34KeyBlock_KeyBlockHeaders_KeyExportability"=@("Export-PAYCCKey")
    "KeyMaterialType"=@("Get-PAYCCParametersForExport","Get-PAYCCParametersForImport")
    "KeyState"=@("Get-PAYCCKeyList")
    "SigningKeyAlgorithm"=@("Get-PAYCCParametersForExport")
    "Tr34KeyBlock_KeyBlockFormat"=@("Export-PAYCCKey","Import-PAYCCKey")
    "WrappingKeyAlgorithm"=@("Get-PAYCCParametersForImport")
}

_awsArgumentCompleterRegistration $PAYCC_Completers $PAYCC_map

$PAYCC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PAYCC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PAYCC_SelectMap = @{
    "Select"=@("New-PAYCCAlias",
               "New-PAYCCKey",
               "Remove-PAYCCAlias",
               "Remove-PAYCCKey",
               "Export-PAYCCKey",
               "Get-PAYCCAlias",
               "Get-PAYCCKey",
               "Get-PAYCCParametersForExport",
               "Get-PAYCCParametersForImport",
               "Get-PAYCCPublicKeyCertificate",
               "Import-PAYCCKey",
               "Get-PAYCCAliasList",
               "Get-PAYCCKeyList",
               "Get-PAYCCResourceTag",
               "Restore-PAYCCKey",
               "Start-PAYCCKeyUsage",
               "Stop-PAYCCKeyUsage",
               "Add-PAYCCResourceTag",
               "Remove-PAYCCResourceTag",
               "Update-PAYCCAlias")
}

_awsArgumentCompleterRegistration $PAYCC_SelectCompleters $PAYCC_SelectMap
# Argument completions for service Payment Cryptography Data


$PAYCD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.PaymentCryptographyData.DukptDerivationType
        {
            ($_ -eq "Protect-PAYCDData/Dukpt_DukptKeyDerivationType") -Or
            ($_ -eq "Unprotect-PAYCDData/Dukpt_DukptKeyDerivationType") -Or
            ($_ -eq "Test-PAYCDPinData/DukptAttributes_DukptDerivationType") -Or
            ($_ -eq "New-PAYCDMac/DukptCmac_DukptDerivationType") -Or
            ($_ -eq "Test-PAYCDMac/DukptCmac_DukptDerivationType") -Or
            ($_ -eq "New-PAYCDMac/DukptIso9797Algorithm1_DukptDerivationType") -Or
            ($_ -eq "Test-PAYCDMac/DukptIso9797Algorithm1_DukptDerivationType") -Or
            ($_ -eq "New-PAYCDMac/DukptIso9797Algorithm3_DukptDerivationType") -Or
            ($_ -eq "Test-PAYCDMac/DukptIso9797Algorithm3_DukptDerivationType") -Or
            ($_ -eq "Convert-PAYCDPinData/IncomingDukptAttributes_DukptKeyDerivationType") -Or
            ($_ -eq "Update-PAYCDEncryptData/IncomingEncryptionAttributes_Dukpt_DukptKeyDerivationType") -Or
            ($_ -eq "Convert-PAYCDPinData/OutgoingDukptAttributes_DukptKeyDerivationType") -Or
            ($_ -eq "Update-PAYCDEncryptData/OutgoingEncryptionAttributes_Dukpt_DukptKeyDerivationType")
        }
        {
            $v = "AES_128","AES_192","AES_256","TDES_2KEY","TDES_3KEY"
            break
        }

        # Amazon.PaymentCryptographyData.DukptEncryptionMode
        {
            ($_ -eq "Protect-PAYCDData/Dukpt_Mode") -Or
            ($_ -eq "Unprotect-PAYCDData/Dukpt_Mode") -Or
            ($_ -eq "Update-PAYCDEncryptData/IncomingEncryptionAttributes_Dukpt_Mode") -Or
            ($_ -eq "Update-PAYCDEncryptData/OutgoingEncryptionAttributes_Dukpt_Mode")
        }
        {
            $v = "CBC","ECB"
            break
        }

        # Amazon.PaymentCryptographyData.DukptKeyVariant
        {
            ($_ -eq "Protect-PAYCDData/Dukpt_DukptKeyVariant") -Or
            ($_ -eq "Unprotect-PAYCDData/Dukpt_DukptKeyVariant") -Or
            ($_ -eq "New-PAYCDMac/DukptCmac_DukptKeyVariant") -Or
            ($_ -eq "Test-PAYCDMac/DukptCmac_DukptKeyVariant") -Or
            ($_ -eq "New-PAYCDMac/DukptIso9797Algorithm1_DukptKeyVariant") -Or
            ($_ -eq "Test-PAYCDMac/DukptIso9797Algorithm1_DukptKeyVariant") -Or
            ($_ -eq "New-PAYCDMac/DukptIso9797Algorithm3_DukptKeyVariant") -Or
            ($_ -eq "Test-PAYCDMac/DukptIso9797Algorithm3_DukptKeyVariant") -Or
            ($_ -eq "Convert-PAYCDPinData/IncomingDukptAttributes_DukptKeyVariant") -Or
            ($_ -eq "Update-PAYCDEncryptData/IncomingEncryptionAttributes_Dukpt_DukptKeyVariant") -Or
            ($_ -eq "Convert-PAYCDPinData/OutgoingDukptAttributes_DukptKeyVariant") -Or
            ($_ -eq "Update-PAYCDEncryptData/OutgoingEncryptionAttributes_Dukpt_DukptKeyVariant")
        }
        {
            $v = "BIDIRECTIONAL","REQUEST","RESPONSE"
            break
        }

        # Amazon.PaymentCryptographyData.EmvEncryptionMode
        {
            ($_ -eq "Protect-PAYCDData/Emv_Mode") -Or
            ($_ -eq "Unprotect-PAYCDData/Emv_Mode") -Or
            ($_ -eq "New-PAYCDMacEmvPinChange/EmvCommon_Mode")
        }
        {
            $v = "CBC","ECB"
            break
        }

        # Amazon.PaymentCryptographyData.EmvMajorKeyDerivationMode
        {
            ($_ -eq "Protect-PAYCDData/Emv_MajorKeyDerivationMode") -Or
            ($_ -eq "Unprotect-PAYCDData/Emv_MajorKeyDerivationMode")
        }
        {
            $v = "EMV_OPTION_A","EMV_OPTION_B"
            break
        }

        # Amazon.PaymentCryptographyData.EncryptionMode
        {
            ($_ -eq "Update-PAYCDEncryptData/IncomingEncryptionAttributes_Symmetric_Mode") -Or
            ($_ -eq "Update-PAYCDEncryptData/OutgoingEncryptionAttributes_Symmetric_Mode") -Or
            ($_ -eq "Protect-PAYCDData/Symmetric_Mode") -Or
            ($_ -eq "Unprotect-PAYCDData/Symmetric_Mode")
        }
        {
            $v = "CBC","CFB","CFB1","CFB128","CFB64","CFB8","ECB","OFB"
            break
        }

        # Amazon.PaymentCryptographyData.KeyCheckValueAlgorithm
        {
            ($_ -eq "New-PAYCDPinData/EncryptionWrappedKey_KeyCheckValueAlgorithm") -Or
            ($_ -eq "Test-PAYCDPinData/EncryptionWrappedKey_KeyCheckValueAlgorithm") -Or
            ($_ -eq "Convert-PAYCDPinData/IncomingWrappedKey_KeyCheckValueAlgorithm") -Or
            ($_ -eq "Update-PAYCDEncryptData/IncomingWrappedKey_KeyCheckValueAlgorithm") -Or
            ($_ -eq "Convert-PAYCDPinData/OutgoingWrappedKey_KeyCheckValueAlgorithm") -Or
            ($_ -eq "Update-PAYCDEncryptData/OutgoingWrappedKey_KeyCheckValueAlgorithm") -Or
            ($_ -eq "Protect-PAYCDData/WrappedKey_KeyCheckValueAlgorithm") -Or
            ($_ -eq "Unprotect-PAYCDData/WrappedKey_KeyCheckValueAlgorithm")
        }
        {
            $v = "ANSI_X9_24","CMAC"
            break
        }

        # Amazon.PaymentCryptographyData.KeyDerivationFunction
        {
            ($_ -eq "New-PAYCDPinData/DiffieHellmanSymmetricKey_KeyDerivationFunction") -Or
            ($_ -eq "Protect-PAYCDData/DiffieHellmanSymmetricKey_KeyDerivationFunction") -Or
            ($_ -eq "Test-PAYCDPinData/DiffieHellmanSymmetricKey_KeyDerivationFunction") -Or
            ($_ -eq "Unprotect-PAYCDData/DiffieHellmanSymmetricKey_KeyDerivationFunction") -Or
            ($_ -eq "Convert-PAYCDPinData/IncomingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationFunction") -Or
            ($_ -eq "Update-PAYCDEncryptData/IncomingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationFunction") -Or
            ($_ -eq "Convert-PAYCDPinData/OutgoingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationFunction") -Or
            ($_ -eq "Update-PAYCDEncryptData/OutgoingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationFunction")
        }
        {
            $v = "ANSI_X963","NIST_SP800"
            break
        }

        # Amazon.PaymentCryptographyData.KeyDerivationHashAlgorithm
        {
            ($_ -eq "New-PAYCDPinData/DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm") -Or
            ($_ -eq "Protect-PAYCDData/DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm") -Or
            ($_ -eq "Test-PAYCDPinData/DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm") -Or
            ($_ -eq "Unprotect-PAYCDData/DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm") -Or
            ($_ -eq "Convert-PAYCDPinData/IncomingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm") -Or
            ($_ -eq "Update-PAYCDEncryptData/IncomingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm") -Or
            ($_ -eq "Convert-PAYCDPinData/OutgoingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm") -Or
            ($_ -eq "Update-PAYCDEncryptData/OutgoingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm")
        }
        {
            $v = "SHA_256","SHA_384","SHA_512"
            break
        }

        # Amazon.PaymentCryptographyData.MacAlgorithm
        {
            ($_ -eq "New-PAYCDMac/GenerationAttributes_Algorithm") -Or
            ($_ -eq "Test-PAYCDMac/VerificationAttributes_Algorithm")
        }
        {
            $v = "CMAC","HMAC_SHA224","HMAC_SHA256","HMAC_SHA384","HMAC_SHA512","ISO9797_ALGORITHM1","ISO9797_ALGORITHM3"
            break
        }

        # Amazon.PaymentCryptographyData.MajorKeyDerivationMode
        {
            ($_ -eq "New-PAYCDMacEmvPinChange/Amex_MajorKeyDerivationMode") -Or
            ($_ -eq "New-PAYCDMacEmvPinChange/Emv2000_MajorKeyDerivationMode") -Or
            ($_ -eq "New-PAYCDMacEmvPinChange/EmvCommon_MajorKeyDerivationMode") -Or
            ($_ -eq "New-PAYCDMac/EmvMac_MajorKeyDerivationMode") -Or
            ($_ -eq "Test-PAYCDMac/EmvMac_MajorKeyDerivationMode") -Or
            ($_ -eq "Test-PAYCDAuthRequestCryptogram/MajorKeyDerivationMode") -Or
            ($_ -eq "New-PAYCDMacEmvPinChange/Mastercard_MajorKeyDerivationMode") -Or
            ($_ -eq "New-PAYCDMacEmvPinChange/Visa_MajorKeyDerivationMode")
        }
        {
            $v = "EMV_OPTION_A","EMV_OPTION_B"
            break
        }

        # Amazon.PaymentCryptographyData.PaddingType
        {
            ($_ -eq "Protect-PAYCDData/Asymmetric_PaddingType") -Or
            ($_ -eq "Unprotect-PAYCDData/Asymmetric_PaddingType") -Or
            ($_ -eq "Update-PAYCDEncryptData/IncomingEncryptionAttributes_Symmetric_PaddingType") -Or
            ($_ -eq "Update-PAYCDEncryptData/OutgoingEncryptionAttributes_Symmetric_PaddingType") -Or
            ($_ -eq "Protect-PAYCDData/Symmetric_PaddingType") -Or
            ($_ -eq "Unprotect-PAYCDData/Symmetric_PaddingType")
        }
        {
            $v = "OAEP_SHA1","OAEP_SHA256","OAEP_SHA512","PKCS1"
            break
        }

        # Amazon.PaymentCryptographyData.PinBlockFormatForEmvPinChange
        "New-PAYCDMacEmvPinChange/PinBlockFormat"
        {
            $v = "ISO_FORMAT_0","ISO_FORMAT_1","ISO_FORMAT_3"
            break
        }

        # Amazon.PaymentCryptographyData.PinBlockFormatForPinData
        {
            ($_ -eq "New-PAYCDPinData/PinBlockFormat") -Or
            ($_ -eq "Test-PAYCDPinData/PinBlockFormat")
        }
        {
            $v = "ISO_FORMAT_0","ISO_FORMAT_3","ISO_FORMAT_4"
            break
        }

        # Amazon.PaymentCryptographyData.PinBlockLengthPosition
        "New-PAYCDMacEmvPinChange/EmvCommon_PinBlockLengthPosition"
        {
            $v = "FRONT_OF_PIN_BLOCK","NONE"
            break
        }

        # Amazon.PaymentCryptographyData.PinBlockPaddingType
        "New-PAYCDMacEmvPinChange/EmvCommon_PinBlockPaddingType"
        {
            $v = "ISO_IEC_7816_4","NO_PADDING"
            break
        }

        # Amazon.PaymentCryptographyData.SessionKeyDerivationMode
        {
            ($_ -eq "New-PAYCDMac/EmvMac_SessionKeyDerivationMode") -Or
            ($_ -eq "Test-PAYCDMac/EmvMac_SessionKeyDerivationMode")
        }
        {
            $v = "AMEX","EMV2000","EMV_COMMON_SESSION_KEY","MASTERCARD_SESSION_KEY","VISA"
            break
        }

        # Amazon.PaymentCryptographyData.SymmetricKeyAlgorithm
        {
            ($_ -eq "New-PAYCDPinData/DiffieHellmanSymmetricKey_KeyAlgorithm") -Or
            ($_ -eq "Protect-PAYCDData/DiffieHellmanSymmetricKey_KeyAlgorithm") -Or
            ($_ -eq "Test-PAYCDPinData/DiffieHellmanSymmetricKey_KeyAlgorithm") -Or
            ($_ -eq "Unprotect-PAYCDData/DiffieHellmanSymmetricKey_KeyAlgorithm") -Or
            ($_ -eq "Convert-PAYCDPinData/IncomingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyAlgorithm") -Or
            ($_ -eq "Update-PAYCDEncryptData/IncomingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyAlgorithm") -Or
            ($_ -eq "Convert-PAYCDPinData/OutgoingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyAlgorithm") -Or
            ($_ -eq "Update-PAYCDEncryptData/OutgoingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyAlgorithm")
        }
        {
            $v = "AES_128","AES_192","AES_256","TDES_2KEY","TDES_3KEY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PAYCD_map = @{
    "Amex_MajorKeyDerivationMode"=@("New-PAYCDMacEmvPinChange")
    "Asymmetric_PaddingType"=@("Protect-PAYCDData","Unprotect-PAYCDData")
    "DiffieHellmanSymmetricKey_KeyAlgorithm"=@("New-PAYCDPinData","Protect-PAYCDData","Test-PAYCDPinData","Unprotect-PAYCDData")
    "DiffieHellmanSymmetricKey_KeyDerivationFunction"=@("New-PAYCDPinData","Protect-PAYCDData","Test-PAYCDPinData","Unprotect-PAYCDData")
    "DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm"=@("New-PAYCDPinData","Protect-PAYCDData","Test-PAYCDPinData","Unprotect-PAYCDData")
    "Dukpt_DukptKeyDerivationType"=@("Protect-PAYCDData","Unprotect-PAYCDData")
    "Dukpt_DukptKeyVariant"=@("Protect-PAYCDData","Unprotect-PAYCDData")
    "Dukpt_Mode"=@("Protect-PAYCDData","Unprotect-PAYCDData")
    "DukptAttributes_DukptDerivationType"=@("Test-PAYCDPinData")
    "DukptCmac_DukptDerivationType"=@("New-PAYCDMac","Test-PAYCDMac")
    "DukptCmac_DukptKeyVariant"=@("New-PAYCDMac","Test-PAYCDMac")
    "DukptIso9797Algorithm1_DukptDerivationType"=@("New-PAYCDMac","Test-PAYCDMac")
    "DukptIso9797Algorithm1_DukptKeyVariant"=@("New-PAYCDMac","Test-PAYCDMac")
    "DukptIso9797Algorithm3_DukptDerivationType"=@("New-PAYCDMac","Test-PAYCDMac")
    "DukptIso9797Algorithm3_DukptKeyVariant"=@("New-PAYCDMac","Test-PAYCDMac")
    "Emv_MajorKeyDerivationMode"=@("Protect-PAYCDData","Unprotect-PAYCDData")
    "Emv_Mode"=@("Protect-PAYCDData","Unprotect-PAYCDData")
    "Emv2000_MajorKeyDerivationMode"=@("New-PAYCDMacEmvPinChange")
    "EmvCommon_MajorKeyDerivationMode"=@("New-PAYCDMacEmvPinChange")
    "EmvCommon_Mode"=@("New-PAYCDMacEmvPinChange")
    "EmvCommon_PinBlockLengthPosition"=@("New-PAYCDMacEmvPinChange")
    "EmvCommon_PinBlockPaddingType"=@("New-PAYCDMacEmvPinChange")
    "EmvMac_MajorKeyDerivationMode"=@("New-PAYCDMac","Test-PAYCDMac")
    "EmvMac_SessionKeyDerivationMode"=@("New-PAYCDMac","Test-PAYCDMac")
    "EncryptionWrappedKey_KeyCheckValueAlgorithm"=@("New-PAYCDPinData","Test-PAYCDPinData")
    "GenerationAttributes_Algorithm"=@("New-PAYCDMac")
    "IncomingDukptAttributes_DukptKeyDerivationType"=@("Convert-PAYCDPinData")
    "IncomingDukptAttributes_DukptKeyVariant"=@("Convert-PAYCDPinData")
    "IncomingEncryptionAttributes_Dukpt_DukptKeyDerivationType"=@("Update-PAYCDEncryptData")
    "IncomingEncryptionAttributes_Dukpt_DukptKeyVariant"=@("Update-PAYCDEncryptData")
    "IncomingEncryptionAttributes_Dukpt_Mode"=@("Update-PAYCDEncryptData")
    "IncomingEncryptionAttributes_Symmetric_Mode"=@("Update-PAYCDEncryptData")
    "IncomingEncryptionAttributes_Symmetric_PaddingType"=@("Update-PAYCDEncryptData")
    "IncomingWrappedKey_KeyCheckValueAlgorithm"=@("Convert-PAYCDPinData","Update-PAYCDEncryptData")
    "IncomingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyAlgorithm"=@("Convert-PAYCDPinData","Update-PAYCDEncryptData")
    "IncomingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationFunction"=@("Convert-PAYCDPinData","Update-PAYCDEncryptData")
    "IncomingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm"=@("Convert-PAYCDPinData","Update-PAYCDEncryptData")
    "MajorKeyDerivationMode"=@("Test-PAYCDAuthRequestCryptogram")
    "Mastercard_MajorKeyDerivationMode"=@("New-PAYCDMacEmvPinChange")
    "OutgoingDukptAttributes_DukptKeyDerivationType"=@("Convert-PAYCDPinData")
    "OutgoingDukptAttributes_DukptKeyVariant"=@("Convert-PAYCDPinData")
    "OutgoingEncryptionAttributes_Dukpt_DukptKeyDerivationType"=@("Update-PAYCDEncryptData")
    "OutgoingEncryptionAttributes_Dukpt_DukptKeyVariant"=@("Update-PAYCDEncryptData")
    "OutgoingEncryptionAttributes_Dukpt_Mode"=@("Update-PAYCDEncryptData")
    "OutgoingEncryptionAttributes_Symmetric_Mode"=@("Update-PAYCDEncryptData")
    "OutgoingEncryptionAttributes_Symmetric_PaddingType"=@("Update-PAYCDEncryptData")
    "OutgoingWrappedKey_KeyCheckValueAlgorithm"=@("Convert-PAYCDPinData","Update-PAYCDEncryptData")
    "OutgoingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyAlgorithm"=@("Convert-PAYCDPinData","Update-PAYCDEncryptData")
    "OutgoingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationFunction"=@("Convert-PAYCDPinData","Update-PAYCDEncryptData")
    "OutgoingWrappedKey_WrappedKeyMaterial_DiffieHellmanSymmetricKey_KeyDerivationHashAlgorithm"=@("Convert-PAYCDPinData","Update-PAYCDEncryptData")
    "PinBlockFormat"=@("New-PAYCDMacEmvPinChange","New-PAYCDPinData","Test-PAYCDPinData")
    "Symmetric_Mode"=@("Protect-PAYCDData","Unprotect-PAYCDData")
    "Symmetric_PaddingType"=@("Protect-PAYCDData","Unprotect-PAYCDData")
    "VerificationAttributes_Algorithm"=@("Test-PAYCDMac")
    "Visa_MajorKeyDerivationMode"=@("New-PAYCDMacEmvPinChange")
    "WrappedKey_KeyCheckValueAlgorithm"=@("Protect-PAYCDData","Unprotect-PAYCDData")
}

_awsArgumentCompleterRegistration $PAYCD_Completers $PAYCD_map

$PAYCD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PAYCD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PAYCD_SelectMap = @{
    "Select"=@("Unprotect-PAYCDData",
               "Protect-PAYCDData",
               "New-PAYCDCardValidationData",
               "New-PAYCDMac",
               "New-PAYCDMacEmvPinChange",
               "New-PAYCDPinData",
               "Update-PAYCDEncryptData",
               "Convert-PAYCDPinData",
               "Test-PAYCDAuthRequestCryptogram",
               "Test-PAYCDCardValidationData",
               "Test-PAYCDMac",
               "Test-PAYCDPinData")
}

_awsArgumentCompleterRegistration $PAYCD_SelectCompleters $PAYCD_SelectMap
# Argument completions for service Pca Connector Ad


$PCAAD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.PcaConnectorAd.AccessRight
        {
            ($_ -eq "New-PCAADTemplateGroupAccessControlEntry/AccessRights_AutoEnroll") -Or
            ($_ -eq "Update-PCAADTemplateGroupAccessControlEntry/AccessRights_AutoEnroll") -Or
            ($_ -eq "New-PCAADTemplateGroupAccessControlEntry/AccessRights_Enroll") -Or
            ($_ -eq "Update-PCAADTemplateGroupAccessControlEntry/AccessRights_Enroll")
        }
        {
            $v = "ALLOW","DENY"
            break
        }

        # Amazon.PcaConnectorAd.ClientCompatibilityV2
        {
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV2_PrivateKeyFlags_ClientVersion") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV2_PrivateKeyFlags_ClientVersion")
        }
        {
            $v = "WINDOWS_SERVER_2003","WINDOWS_SERVER_2008","WINDOWS_SERVER_2008_R2","WINDOWS_SERVER_2012","WINDOWS_SERVER_2012_R2","WINDOWS_SERVER_2016"
            break
        }

        # Amazon.PcaConnectorAd.ClientCompatibilityV3
        {
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV3_PrivateKeyFlags_ClientVersion") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV3_PrivateKeyFlags_ClientVersion")
        }
        {
            $v = "WINDOWS_SERVER_2008","WINDOWS_SERVER_2008_R2","WINDOWS_SERVER_2012","WINDOWS_SERVER_2012_R2","WINDOWS_SERVER_2016"
            break
        }

        # Amazon.PcaConnectorAd.ClientCompatibilityV4
        {
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV4_PrivateKeyFlags_ClientVersion") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV4_PrivateKeyFlags_ClientVersion")
        }
        {
            $v = "WINDOWS_SERVER_2012","WINDOWS_SERVER_2012_R2","WINDOWS_SERVER_2016"
            break
        }

        # Amazon.PcaConnectorAd.HashAlgorithm
        {
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV3_HashAlgorithm") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV3_HashAlgorithm") -Or
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV4_HashAlgorithm") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV4_HashAlgorithm")
        }
        {
            $v = "SHA256","SHA384","SHA512"
            break
        }

        # Amazon.PcaConnectorAd.KeySpec
        {
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV2_PrivateKeyAttributes_KeySpec") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV2_PrivateKeyAttributes_KeySpec") -Or
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV3_PrivateKeyAttributes_KeySpec") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV3_PrivateKeyAttributes_KeySpec") -Or
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV4_PrivateKeyAttributes_KeySpec") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV4_PrivateKeyAttributes_KeySpec")
        }
        {
            $v = "KEY_EXCHANGE","SIGNATURE"
            break
        }

        # Amazon.PcaConnectorAd.KeyUsagePropertyType
        {
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV3_PrivateKeyAttributes_KeyUsageProperty_PropertyType") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV3_PrivateKeyAttributes_KeyUsageProperty_PropertyType") -Or
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV4_PrivateKeyAttributes_KeyUsageProperty_PropertyType") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV4_PrivateKeyAttributes_KeyUsageProperty_PropertyType")
        }
        {
            $v = "ALL"
            break
        }

        # Amazon.PcaConnectorAd.PrivateKeyAlgorithm
        {
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV3_PrivateKeyAttributes_Algorithm") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV3_PrivateKeyAttributes_Algorithm") -Or
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV4_PrivateKeyAttributes_Algorithm") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV4_PrivateKeyAttributes_Algorithm")
        }
        {
            $v = "ECDH_P256","ECDH_P384","ECDH_P521","RSA"
            break
        }

        # Amazon.PcaConnectorAd.ValidityPeriodType
        {
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV2_CertificateValidity_RenewalPeriod_PeriodType") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV2_CertificateValidity_RenewalPeriod_PeriodType") -Or
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV2_CertificateValidity_ValidityPeriod_PeriodType") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV2_CertificateValidity_ValidityPeriod_PeriodType") -Or
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV3_CertificateValidity_RenewalPeriod_PeriodType") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV3_CertificateValidity_RenewalPeriod_PeriodType") -Or
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV3_CertificateValidity_ValidityPeriod_PeriodType") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV3_CertificateValidity_ValidityPeriod_PeriodType") -Or
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV4_CertificateValidity_RenewalPeriod_PeriodType") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV4_CertificateValidity_RenewalPeriod_PeriodType") -Or
            ($_ -eq "New-PCAADTemplate/Definition_TemplateV4_CertificateValidity_ValidityPeriod_PeriodType") -Or
            ($_ -eq "Update-PCAADTemplate/Definition_TemplateV4_CertificateValidity_ValidityPeriod_PeriodType")
        }
        {
            $v = "DAYS","HOURS","MONTHS","WEEKS","YEARS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PCAAD_map = @{
    "AccessRights_AutoEnroll"=@("New-PCAADTemplateGroupAccessControlEntry","Update-PCAADTemplateGroupAccessControlEntry")
    "AccessRights_Enroll"=@("New-PCAADTemplateGroupAccessControlEntry","Update-PCAADTemplateGroupAccessControlEntry")
    "Definition_TemplateV2_CertificateValidity_RenewalPeriod_PeriodType"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV2_CertificateValidity_ValidityPeriod_PeriodType"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV2_PrivateKeyAttributes_KeySpec"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV2_PrivateKeyFlags_ClientVersion"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV3_CertificateValidity_RenewalPeriod_PeriodType"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV3_CertificateValidity_ValidityPeriod_PeriodType"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV3_HashAlgorithm"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV3_PrivateKeyAttributes_Algorithm"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV3_PrivateKeyAttributes_KeySpec"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV3_PrivateKeyAttributes_KeyUsageProperty_PropertyType"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV3_PrivateKeyFlags_ClientVersion"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV4_CertificateValidity_RenewalPeriod_PeriodType"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV4_CertificateValidity_ValidityPeriod_PeriodType"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV4_HashAlgorithm"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV4_PrivateKeyAttributes_Algorithm"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV4_PrivateKeyAttributes_KeySpec"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV4_PrivateKeyAttributes_KeyUsageProperty_PropertyType"=@("New-PCAADTemplate","Update-PCAADTemplate")
    "Definition_TemplateV4_PrivateKeyFlags_ClientVersion"=@("New-PCAADTemplate","Update-PCAADTemplate")
}

_awsArgumentCompleterRegistration $PCAAD_Completers $PCAAD_map

$PCAAD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PCAAD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PCAAD_SelectMap = @{
    "Select"=@("New-PCAADConnector",
               "New-PCAADDirectoryRegistration",
               "New-PCAADServicePrincipalName",
               "New-PCAADTemplate",
               "New-PCAADTemplateGroupAccessControlEntry",
               "Remove-PCAADConnector",
               "Remove-PCAADDirectoryRegistration",
               "Remove-PCAADServicePrincipalName",
               "Remove-PCAADTemplate",
               "Remove-PCAADTemplateGroupAccessControlEntry",
               "Get-PCAADConnector",
               "Get-PCAADDirectoryRegistration",
               "Get-PCAADServicePrincipalName",
               "Get-PCAADTemplate",
               "Get-PCAADTemplateGroupAccessControlEntry",
               "Get-PCAADConnectorList",
               "Get-PCAADDirectoryRegistrationList",
               "Get-PCAADServicePrincipalNameList",
               "Get-PCAADResourceTagList",
               "Get-PCAADTemplateGroupAccessControlEntryList",
               "Get-PCAADTemplateList",
               "Add-PCAADResourceTag",
               "Remove-PCAADResourceTag",
               "Update-PCAADTemplate",
               "Update-PCAADTemplateGroupAccessControlEntry")
}

_awsArgumentCompleterRegistration $PCAAD_SelectCompleters $PCAAD_SelectMap
# Argument completions for service Private CA Connector for SCEP


$PCASCEP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PCASCEP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PCASCEP_SelectMap = @{
    "Select"=@("New-PCASCEPChallenge",
               "New-PCASCEPConnector",
               "Remove-PCASCEPChallenge",
               "Remove-PCASCEPConnector",
               "Get-PCASCEPChallengeMetadata",
               "Get-PCASCEPChallengePassword",
               "Get-PCASCEPConnector",
               "Get-PCASCEPChallengeMetadataList",
               "Get-PCASCEPConnectorList",
               "Get-PCASCEPResourceTag",
               "Add-PCASCEPResourceTag",
               "Remove-PCASCEPResourceTag")
}

_awsArgumentCompleterRegistration $PCASCEP_SelectCompleters $PCASCEP_SelectMap
# Argument completions for service AWS Parallel Computing Service


$PCS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.PCS.PurchaseOption
        {
            ($_ -eq "New-PCSComputeNodeGroup/PurchaseOption") -Or
            ($_ -eq "Update-PCSComputeNodeGroup/PurchaseOption")
        }
        {
            $v = "ONDEMAND","SPOT"
            break
        }

        # Amazon.PCS.SchedulerType
        "New-PCSCluster/Scheduler_Type"
        {
            $v = "SLURM"
            break
        }

        # Amazon.PCS.Size
        "New-PCSCluster/Size"
        {
            $v = "LARGE","MEDIUM","SMALL"
            break
        }

        # Amazon.PCS.SpotAllocationStrategy
        {
            ($_ -eq "New-PCSComputeNodeGroup/SpotOptions_AllocationStrategy") -Or
            ($_ -eq "Update-PCSComputeNodeGroup/SpotOptions_AllocationStrategy")
        }
        {
            $v = "capacity-optimized","lowest-price","price-capacity-optimized"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PCS_map = @{
    "PurchaseOption"=@("New-PCSComputeNodeGroup","Update-PCSComputeNodeGroup")
    "Scheduler_Type"=@("New-PCSCluster")
    "Size"=@("New-PCSCluster")
    "SpotOptions_AllocationStrategy"=@("New-PCSComputeNodeGroup","Update-PCSComputeNodeGroup")
}

_awsArgumentCompleterRegistration $PCS_Completers $PCS_map

$PCS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PCS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PCS_SelectMap = @{
    "Select"=@("New-PCSCluster",
               "New-PCSComputeNodeGroup",
               "New-PCSQueue",
               "Remove-PCSCluster",
               "Remove-PCSComputeNodeGroup",
               "Remove-PCSQueue",
               "Get-PCSCluster",
               "Get-PCSComputeNodeGroup",
               "Get-PCSQueue",
               "Get-PCSClusterList",
               "Get-PCSComputeNodeGroupList",
               "Get-PCSQueueList",
               "Get-PCSResourceTag",
               "Register-PCSComputeNodeGroupInstance",
               "Add-PCSResourceTag",
               "Remove-PCSResourceTag",
               "Update-PCSComputeNodeGroup",
               "Update-PCSQueue")
}

_awsArgumentCompleterRegistration $PCS_SelectCompleters $PCS_SelectMap
# Argument completions for service AWS Personalize


$PERS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Personalize.BatchInferenceJobMode
        "New-PERSBatchInferenceJob/BatchInferenceJobMode"
        {
            $v = "BATCH_INFERENCE","THEME_GENERATION"
            break
        }

        # Amazon.Personalize.Domain
        {
            ($_ -eq "Get-PERSRecipeList/Domain") -Or
            ($_ -eq "New-PERSDatasetGroup/Domain") -Or
            ($_ -eq "New-PERSSchema/Domain")
        }
        {
            $v = "ECOMMERCE","VIDEO_ON_DEMAND"
            break
        }

        # Amazon.Personalize.ImportMode
        "New-PERSDatasetImportJob/ImportMode"
        {
            $v = "FULL","INCREMENTAL"
            break
        }

        # Amazon.Personalize.IngestionMode
        "New-PERSDatasetExportJob/IngestionMode"
        {
            $v = "ALL","BULK","PUT"
            break
        }

        # Amazon.Personalize.ObjectiveSensitivity
        "New-PERSSolution/OptimizationObjective_ObjectiveSensitivity"
        {
            $v = "HIGH","LOW","MEDIUM","OFF"
            break
        }

        # Amazon.Personalize.RecipeProvider
        "Get-PERSRecipeList/RecipeProvider"
        {
            $v = "SERVICE"
            break
        }

        # Amazon.Personalize.TrainingMode
        "New-PERSSolutionVersion/TrainingMode"
        {
            $v = "AUTOTRAIN","FULL","UPDATE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PERS_map = @{
    "BatchInferenceJobMode"=@("New-PERSBatchInferenceJob")
    "Domain"=@("Get-PERSRecipeList","New-PERSDatasetGroup","New-PERSSchema")
    "ImportMode"=@("New-PERSDatasetImportJob")
    "IngestionMode"=@("New-PERSDatasetExportJob")
    "OptimizationObjective_ObjectiveSensitivity"=@("New-PERSSolution")
    "RecipeProvider"=@("Get-PERSRecipeList")
    "TrainingMode"=@("New-PERSSolutionVersion")
}

_awsArgumentCompleterRegistration $PERS_Completers $PERS_map

$PERS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PERS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PERS_SelectMap = @{
    "Select"=@("New-PERSBatchInferenceJob",
               "New-PERSBatchSegmentJob",
               "New-PERSCampaign",
               "New-PERSDataDeletionJob",
               "New-PERSDataset",
               "New-PERSDatasetExportJob",
               "New-PERSDatasetGroup",
               "New-PERSDatasetImportJob",
               "New-PERSEventTracker",
               "New-PERSFilter",
               "New-PERSMetricAttribution",
               "New-PERSRecommender",
               "New-PERSSchema",
               "New-PERSSolution",
               "New-PERSSolutionVersion",
               "Remove-PERSCampaign",
               "Remove-PERSDataset",
               "Remove-PERSDatasetGroup",
               "Remove-PERSEventTracker",
               "Remove-PERSFilter",
               "Remove-PERSMetricAttribution",
               "Remove-PERSRecommender",
               "Remove-PERSSchema",
               "Remove-PERSSolution",
               "Get-PERSAlgorithm",
               "Get-PERSBatchInferenceJob",
               "Get-PERSBatchSegmentJob",
               "Get-PERSCampaign",
               "Get-PERSDataDeletionJob",
               "Get-PERSDataset",
               "Get-PERSDatasetExportJob",
               "Get-PERSDatasetGroup",
               "Get-PERSDatasetImportJob",
               "Get-PERSEventTracker",
               "Get-PERSFeatureTransformation",
               "Get-PERSFilter",
               "Get-PERSMetricAttribution",
               "Get-PERSRecipe",
               "Get-PERSRecommender",
               "Get-PERSSchema",
               "Get-PERSSolution",
               "Get-PERSSolutionVersion",
               "Get-PERSSolutionMetric",
               "Get-PERSBatchInferenceJobList",
               "Get-PERSBatchSegmentJobList",
               "Get-PERSCampaignList",
               "Get-PERSDataDeletionJobList",
               "Get-PERSDatasetExportJobList",
               "Get-PERSDatasetGroupList",
               "Get-PERSDatasetImportJobList",
               "Get-PERSDatasetList",
               "Get-PERSEventTrackerList",
               "Get-PERSFilterList",
               "Get-PERSMetricAttributionMetricList",
               "Get-PERSMetricAttributionList",
               "Get-PERSRecipeList",
               "Get-PERSRecommenderList",
               "Get-PERSSchemaList",
               "Get-PERSSolutionList",
               "Get-PERSSolutionVersionList",
               "Get-PERSResourceTag",
               "Start-PERSRecommender",
               "Stop-PERSRecommender",
               "Stop-PERSSolutionVersionCreation",
               "Add-PERSResourceTag",
               "Remove-PERSResourceTag",
               "Update-PERSCampaign",
               "Update-PERSDataset",
               "Update-PERSMetricAttribution",
               "Update-PERSRecommender",
               "Update-PERSSolution")
}

_awsArgumentCompleterRegistration $PERS_SelectCompleters $PERS_SelectMap
# Argument completions for service Amazon Personalize Events


$PERSE_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PERSE.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PERSE_SelectMap = @{
    "Select"=@("Write-PERSEActionInteraction",
               "Write-PERSEAction",
               "Write-PERSEEvent",
               "Write-PERSEItem",
               "Write-PERSEUser")
}

_awsArgumentCompleterRegistration $PERSE_SelectCompleters $PERSE_SelectMap
# Argument completions for service Amazon Personalize Runtime


$PERSR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PERSR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PERSR_SelectMap = @{
    "Select"=@("Get-PERSRActionRecommendation",
               "Get-PERSRPersonalizedRanking",
               "Get-PERSRRecommendation")
}

_awsArgumentCompleterRegistration $PERSR_SelectCompleters $PERSR_SelectMap
# Argument completions for service AWS Performance Insights


$PI_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.PI.AcceptLanguage
        "Get-PIPerformanceAnalysisReport/AcceptLanguage"
        {
            $v = "EN_US"
            break
        }

        # Amazon.PI.PeriodAlignment
        "Get-PIResourceMetric/PeriodAlignment"
        {
            $v = "END_TIME","START_TIME"
            break
        }

        # Amazon.PI.ServiceType
        {
            ($_ -eq "Add-PIResourceTag/ServiceType") -Or
            ($_ -eq "Get-PIAvailableResourceDimensionList/ServiceType") -Or
            ($_ -eq "Get-PIAvailableResourceMetricList/ServiceType") -Or
            ($_ -eq "Get-PIDimensionKey/ServiceType") -Or
            ($_ -eq "Get-PIDimensionKeyDetail/ServiceType") -Or
            ($_ -eq "Get-PIPerformanceAnalysisReport/ServiceType") -Or
            ($_ -eq "Get-PIPerformanceAnalysisReportList/ServiceType") -Or
            ($_ -eq "Get-PIResourceMetadata/ServiceType") -Or
            ($_ -eq "Get-PIResourceMetric/ServiceType") -Or
            ($_ -eq "Get-PIResourceTag/ServiceType") -Or
            ($_ -eq "New-PIPerformanceAnalysisReport/ServiceType") -Or
            ($_ -eq "Remove-PIPerformanceAnalysisReport/ServiceType") -Or
            ($_ -eq "Remove-PIResourceTag/ServiceType")
        }
        {
            $v = "DOCDB","RDS"
            break
        }

        # Amazon.PI.TextFormat
        "Get-PIPerformanceAnalysisReport/TextFormat"
        {
            $v = "MARKDOWN","PLAIN_TEXT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PI_map = @{
    "AcceptLanguage"=@("Get-PIPerformanceAnalysisReport")
    "PeriodAlignment"=@("Get-PIResourceMetric")
    "ServiceType"=@("Add-PIResourceTag","Get-PIAvailableResourceDimensionList","Get-PIAvailableResourceMetricList","Get-PIDimensionKey","Get-PIDimensionKeyDetail","Get-PIPerformanceAnalysisReport","Get-PIPerformanceAnalysisReportList","Get-PIResourceMetadata","Get-PIResourceMetric","Get-PIResourceTag","New-PIPerformanceAnalysisReport","Remove-PIPerformanceAnalysisReport","Remove-PIResourceTag")
    "TextFormat"=@("Get-PIPerformanceAnalysisReport")
}

_awsArgumentCompleterRegistration $PI_Completers $PI_map

$PI_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PI.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PI_SelectMap = @{
    "Select"=@("New-PIPerformanceAnalysisReport",
               "Remove-PIPerformanceAnalysisReport",
               "Get-PIDimensionKey",
               "Get-PIDimensionKeyDetail",
               "Get-PIPerformanceAnalysisReport",
               "Get-PIResourceMetadata",
               "Get-PIResourceMetric",
               "Get-PIAvailableResourceDimensionList",
               "Get-PIAvailableResourceMetricList",
               "Get-PIPerformanceAnalysisReportList",
               "Get-PIResourceTag",
               "Add-PIResourceTag",
               "Remove-PIResourceTag")
}

_awsArgumentCompleterRegistration $PI_SelectCompleters $PI_SelectMap
# Argument completions for service Amazon Pinpoint


$PIN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Pinpoint.Action
        {
            ($_ -eq "New-PINPushTemplate/ADM_Action") -Or
            ($_ -eq "Update-PINPushTemplate/ADM_Action") -Or
            ($_ -eq "New-PINCampaign/ADMMessage_Action") -Or
            ($_ -eq "Send-PINMessage/ADMMessage_Action") -Or
            ($_ -eq "Send-PINUserMessageBatch/ADMMessage_Action") -Or
            ($_ -eq "Update-PINCampaign/ADMMessage_Action") -Or
            ($_ -eq "New-PINPushTemplate/APNS_Action") -Or
            ($_ -eq "Update-PINPushTemplate/APNS_Action") -Or
            ($_ -eq "New-PINCampaign/APNSMessage_Action") -Or
            ($_ -eq "Send-PINMessage/APNSMessage_Action") -Or
            ($_ -eq "Send-PINUserMessageBatch/APNSMessage_Action") -Or
            ($_ -eq "Update-PINCampaign/APNSMessage_Action") -Or
            ($_ -eq "New-PINPushTemplate/Baidu_Action") -Or
            ($_ -eq "Update-PINPushTemplate/Baidu_Action") -Or
            ($_ -eq "New-PINCampaign/BaiduMessage_Action") -Or
            ($_ -eq "Send-PINMessage/BaiduMessage_Action") -Or
            ($_ -eq "Send-PINUserMessageBatch/BaiduMessage_Action") -Or
            ($_ -eq "Update-PINCampaign/BaiduMessage_Action") -Or
            ($_ -eq "New-PINPushTemplate/Default_Action") -Or
            ($_ -eq "Update-PINPushTemplate/Default_Action") -Or
            ($_ -eq "New-PINCampaign/DefaultMessage_Action") -Or
            ($_ -eq "Update-PINCampaign/DefaultMessage_Action") -Or
            ($_ -eq "Send-PINMessage/DefaultPushNotificationMessage_Action") -Or
            ($_ -eq "Send-PINUserMessageBatch/DefaultPushNotificationMessage_Action") -Or
            ($_ -eq "New-PINPushTemplate/GCM_Action") -Or
            ($_ -eq "Update-PINPushTemplate/GCM_Action") -Or
            ($_ -eq "New-PINCampaign/GCMMessage_Action") -Or
            ($_ -eq "Send-PINMessage/GCMMessage_Action") -Or
            ($_ -eq "Send-PINUserMessageBatch/GCMMessage_Action") -Or
            ($_ -eq "Update-PINCampaign/GCMMessage_Action")
        }
        {
            $v = "DEEP_LINK","OPEN_APP","URL"
            break
        }

        # Amazon.Pinpoint.ChannelType
        "Update-PINEndpoint/EndpointRequest_ChannelType"
        {
            $v = "ADM","APNS","APNS_SANDBOX","APNS_VOIP","APNS_VOIP_SANDBOX","BAIDU","CUSTOM","EMAIL","GCM","IN_APP","PUSH","SMS","VOICE"
            break
        }

        # Amazon.Pinpoint.DimensionType
        {
            ($_ -eq "New-PINSegment/AppVersion_DimensionType") -Or
            ($_ -eq "Update-PINSegment/AppVersion_DimensionType") -Or
            ($_ -eq "New-PINSegment/Channel_DimensionType") -Or
            ($_ -eq "Update-PINSegment/Channel_DimensionType") -Or
            ($_ -eq "New-PINSegment/Country_DimensionType") -Or
            ($_ -eq "Update-PINSegment/Country_DimensionType") -Or
            ($_ -eq "New-PINSegment/DeviceType_DimensionType") -Or
            ($_ -eq "Update-PINSegment/DeviceType_DimensionType") -Or
            ($_ -eq "New-PINCampaign/EventType_DimensionType") -Or
            ($_ -eq "New-PINJourney/EventType_DimensionType") -Or
            ($_ -eq "Update-PINCampaign/EventType_DimensionType") -Or
            ($_ -eq "Update-PINJourney/EventType_DimensionType") -Or
            ($_ -eq "New-PINSegment/Make_DimensionType") -Or
            ($_ -eq "Update-PINSegment/Make_DimensionType") -Or
            ($_ -eq "New-PINSegment/Model_DimensionType") -Or
            ($_ -eq "Update-PINSegment/Model_DimensionType") -Or
            ($_ -eq "New-PINSegment/Platform_DimensionType") -Or
            ($_ -eq "Update-PINSegment/Platform_DimensionType")
        }
        {
            $v = "EXCLUSIVE","INCLUSIVE"
            break
        }

        # Amazon.Pinpoint.Duration
        {
            ($_ -eq "New-PINSegment/Recency_Duration") -Or
            ($_ -eq "Update-PINSegment/Recency_Duration")
        }
        {
            $v = "DAY_14","DAY_30","DAY_7","HR_24"
            break
        }

        # Amazon.Pinpoint.FilterType
        {
            ($_ -eq "New-PINCampaign/EventFilter_FilterType") -Or
            ($_ -eq "New-PINJourney/EventFilter_FilterType") -Or
            ($_ -eq "Update-PINCampaign/EventFilter_FilterType") -Or
            ($_ -eq "Update-PINJourney/EventFilter_FilterType")
        }
        {
            $v = "ENDPOINT","SYSTEM"
            break
        }

        # Amazon.Pinpoint.Format
        "New-PINImportJob/ImportJobRequest_Format"
        {
            $v = "CSV","JSON"
            break
        }

        # Amazon.Pinpoint.Frequency
        {
            ($_ -eq "New-PINCampaign/Schedule_Frequency") -Or
            ($_ -eq "Update-PINCampaign/Schedule_Frequency")
        }
        {
            $v = "DAILY","EVENT","HOURLY","IN_APP_EVENT","MONTHLY","ONCE","WEEKLY"
            break
        }

        # Amazon.Pinpoint.Include
        {
            ($_ -eq "New-PINSegment/SegmentGroups_Include") -Or
            ($_ -eq "Update-PINSegment/SegmentGroups_Include")
        }
        {
            $v = "ALL","ANY","NONE"
            break
        }

        # Amazon.Pinpoint.Layout
        {
            ($_ -eq "New-PINCampaign/InAppMessage_Layout") -Or
            ($_ -eq "Update-PINCampaign/InAppMessage_Layout") -Or
            ($_ -eq "New-PINInAppTemplate/InAppTemplateRequest_Layout") -Or
            ($_ -eq "Update-PINInAppTemplate/InAppTemplateRequest_Layout")
        }
        {
            $v = "BOTTOM_BANNER","CAROUSEL","MIDDLE_BANNER","MOBILE_FEED","OVERLAYS","TOP_BANNER"
            break
        }

        # Amazon.Pinpoint.MessageType
        {
            ($_ -eq "New-PINCampaign/SMSMessage_MessageType") -Or
            ($_ -eq "Send-PINMessage/SMSMessage_MessageType") -Or
            ($_ -eq "Send-PINUserMessageBatch/SMSMessage_MessageType") -Or
            ($_ -eq "Update-PINCampaign/SMSMessage_MessageType")
        }
        {
            $v = "PROMOTIONAL","TRANSACTIONAL"
            break
        }

        # Amazon.Pinpoint.Mode
        {
            ($_ -eq "Update-PINApplicationSettingList/CampaignHook_Mode") -Or
            ($_ -eq "New-PINCampaign/Hook_Mode") -Or
            ($_ -eq "Update-PINCampaign/Hook_Mode")
        }
        {
            $v = "DELIVERY","FILTER"
            break
        }

        # Amazon.Pinpoint.RecencyType
        {
            ($_ -eq "New-PINSegment/Recency_RecencyType") -Or
            ($_ -eq "Update-PINSegment/Recency_RecencyType")
        }
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.Pinpoint.State
        {
            ($_ -eq "Update-PINJourneyState/JourneyStateRequest_State") -Or
            ($_ -eq "New-PINJourney/WriteJourneyRequest_State") -Or
            ($_ -eq "Update-PINJourney/WriteJourneyRequest_State")
        }
        {
            $v = "ACTIVE","CANCELLED","CLOSED","COMPLETED","DRAFT","PAUSED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PIN_map = @{
    "ADM_Action"=@("New-PINPushTemplate","Update-PINPushTemplate")
    "ADMMessage_Action"=@("New-PINCampaign","Send-PINMessage","Send-PINUserMessageBatch","Update-PINCampaign")
    "APNS_Action"=@("New-PINPushTemplate","Update-PINPushTemplate")
    "APNSMessage_Action"=@("New-PINCampaign","Send-PINMessage","Send-PINUserMessageBatch","Update-PINCampaign")
    "AppVersion_DimensionType"=@("New-PINSegment","Update-PINSegment")
    "Baidu_Action"=@("New-PINPushTemplate","Update-PINPushTemplate")
    "BaiduMessage_Action"=@("New-PINCampaign","Send-PINMessage","Send-PINUserMessageBatch","Update-PINCampaign")
    "CampaignHook_Mode"=@("Update-PINApplicationSettingList")
    "Channel_DimensionType"=@("New-PINSegment","Update-PINSegment")
    "Country_DimensionType"=@("New-PINSegment","Update-PINSegment")
    "Default_Action"=@("New-PINPushTemplate","Update-PINPushTemplate")
    "DefaultMessage_Action"=@("New-PINCampaign","Update-PINCampaign")
    "DefaultPushNotificationMessage_Action"=@("Send-PINMessage","Send-PINUserMessageBatch")
    "DeviceType_DimensionType"=@("New-PINSegment","Update-PINSegment")
    "EndpointRequest_ChannelType"=@("Update-PINEndpoint")
    "EventFilter_FilterType"=@("New-PINCampaign","New-PINJourney","Update-PINCampaign","Update-PINJourney")
    "EventType_DimensionType"=@("New-PINCampaign","New-PINJourney","Update-PINCampaign","Update-PINJourney")
    "GCM_Action"=@("New-PINPushTemplate","Update-PINPushTemplate")
    "GCMMessage_Action"=@("New-PINCampaign","Send-PINMessage","Send-PINUserMessageBatch","Update-PINCampaign")
    "Hook_Mode"=@("New-PINCampaign","Update-PINCampaign")
    "ImportJobRequest_Format"=@("New-PINImportJob")
    "InAppMessage_Layout"=@("New-PINCampaign","Update-PINCampaign")
    "InAppTemplateRequest_Layout"=@("New-PINInAppTemplate","Update-PINInAppTemplate")
    "JourneyStateRequest_State"=@("Update-PINJourneyState")
    "Make_DimensionType"=@("New-PINSegment","Update-PINSegment")
    "Model_DimensionType"=@("New-PINSegment","Update-PINSegment")
    "Platform_DimensionType"=@("New-PINSegment","Update-PINSegment")
    "Recency_Duration"=@("New-PINSegment","Update-PINSegment")
    "Recency_RecencyType"=@("New-PINSegment","Update-PINSegment")
    "Schedule_Frequency"=@("New-PINCampaign","Update-PINCampaign")
    "SegmentGroups_Include"=@("New-PINSegment","Update-PINSegment")
    "SMSMessage_MessageType"=@("New-PINCampaign","Send-PINMessage","Send-PINUserMessageBatch","Update-PINCampaign")
    "WriteJourneyRequest_State"=@("New-PINJourney","Update-PINJourney")
}

_awsArgumentCompleterRegistration $PIN_Completers $PIN_map

$PIN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PIN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PIN_SelectMap = @{
    "Select"=@("New-PINApp",
               "New-PINCampaign",
               "New-PINEmailTemplate",
               "New-PINExportJob",
               "New-PINImportJob",
               "New-PINInAppTemplate",
               "New-PINJourney",
               "New-PINPushTemplate",
               "New-PINRecommenderConfiguration",
               "New-PINSegment",
               "New-PINSmsTemplate",
               "New-PINVoiceTemplate",
               "Remove-PINAdmChannel",
               "Remove-PINApnsChannel",
               "Remove-PINApnsSandboxChannel",
               "Remove-PINApnsVoipChannel",
               "Remove-PINApnsVoipSandboxChannel",
               "Remove-PINApp",
               "Remove-PINBaiduChannel",
               "Remove-PINCampaign",
               "Remove-PINEmailChannel",
               "Remove-PINEmailTemplate",
               "Remove-PINEndpoint",
               "Remove-PINEventStream",
               "Remove-PINGcmChannel",
               "Remove-PINInAppTemplate",
               "Remove-PINJourney",
               "Remove-PINPushTemplate",
               "Remove-PINRecommenderConfiguration",
               "Remove-PINSegment",
               "Remove-PINSmsChannel",
               "Remove-PINSmsTemplate",
               "Remove-PINUserEndpoint",
               "Remove-PINVoiceChannel",
               "Remove-PINVoiceTemplate",
               "Get-PINAdmChannel",
               "Get-PINApnsChannel",
               "Get-PINApnsSandboxChannel",
               "Get-PINApnsVoipChannel",
               "Get-PINApnsVoipSandboxChannel",
               "Get-PINApp",
               "Get-PINApplicationDateRangeKpi",
               "Get-PINApplicationSettingList",
               "Get-PINAppList",
               "Get-PINBaiduChannel",
               "Get-PINCampaign",
               "Get-PINCampaignActivityList",
               "Get-PINCampaignDateRangeKpi",
               "Get-PINCampaignList",
               "Get-PINCampaignVersion",
               "Get-PINCampaignVersionList",
               "Get-PINChannel",
               "Get-PINEmailChannel",
               "Get-PINEmailTemplate",
               "Get-PINEndpoint",
               "Get-PINEventStream",
               "Get-PINExportJob",
               "Get-PINExportJobList",
               "Get-PINGcmChannel",
               "Get-PINImportJob",
               "Get-PINImportJobList",
               "Get-PINInAppMessage",
               "Get-PINInAppTemplate",
               "Get-PINJourney",
               "Get-PINJourneyDateRangeKpi",
               "Get-PINJourneyExecutionActivityMetric",
               "Get-PINJourneyExecutionMetric",
               "Get-PINJourneyRunExecutionActivityMetric",
               "Get-PINJourneyRunExecutionMetric",
               "Get-PINJourneyRun",
               "Get-PINPushTemplate",
               "Get-PINRecommenderConfiguration",
               "Get-PINRecommenderConfigurationList",
               "Get-PINSegment",
               "Get-PINSegmentExportJobList",
               "Get-PINSegmentImportJobList",
               "Get-PINSegmentList",
               "Get-PINSegmentVersion",
               "Get-PINSegmentVersionList",
               "Get-PINSmsChannel",
               "Get-PINSmsTemplate",
               "Get-PINUserEndpoint",
               "Get-PINVoiceChannel",
               "Get-PINVoiceTemplate",
               "Get-PINJourneyList",
               "Get-PINResourceTag",
               "Get-PINTemplateList",
               "Get-PINTemplateVersionList",
               "Confirm-PINPhoneNumber",
               "Write-PINEvent",
               "Write-PINEventStream",
               "Remove-PINAttribute",
               "Send-PINMessage",
               "Send-PINOTPMessage",
               "Send-PINUserMessageBatch",
               "Add-PINResourceTag",
               "Remove-PINResourceTag",
               "Update-PINAdmChannel",
               "Update-PINApnsChannel",
               "Update-PINApnsSandboxChannel",
               "Update-PINApnsVoipChannel",
               "Update-PINApnsVoipSandboxChannel",
               "Update-PINApplicationSettingList",
               "Update-PINBaiduChannel",
               "Update-PINCampaign",
               "Update-PINEmailChannel",
               "Update-PINEmailTemplate",
               "Update-PINEndpoint",
               "Update-PINEndpointsBatch",
               "Update-PINGcmChannel",
               "Update-PINInAppTemplate",
               "Update-PINJourney",
               "Update-PINJourneyState",
               "Update-PINPushTemplate",
               "Update-PINRecommenderConfiguration",
               "Update-PINSegment",
               "Update-PINSmsChannel",
               "Update-PINSmsTemplate",
               "Update-PINTemplateActiveVersion",
               "Update-PINVoiceChannel",
               "Update-PINVoiceTemplate",
               "Confirm-PINOTPMessage")
}

_awsArgumentCompleterRegistration $PIN_SelectCompleters $PIN_SelectMap
# Argument completions for service Amazon Pinpoint Email


$PINE_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.PinpointEmail.BehaviorOnMxFailure
        "Write-PINEEmailIdentityMailFromAttribute/BehaviorOnMxFailure"
        {
            $v = "REJECT_MESSAGE","USE_DEFAULT_VALUE"
            break
        }

        # Amazon.PinpointEmail.TlsPolicy
        {
            ($_ -eq "New-PINEConfigurationSet/DeliveryOptions_TlsPolicy") -Or
            ($_ -eq "Write-PINEConfigurationSetDeliveryOption/TlsPolicy")
        }
        {
            $v = "OPTIONAL","REQUIRE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PINE_map = @{
    "BehaviorOnMxFailure"=@("Write-PINEEmailIdentityMailFromAttribute")
    "DeliveryOptions_TlsPolicy"=@("New-PINEConfigurationSet")
    "TlsPolicy"=@("Write-PINEConfigurationSetDeliveryOption")
}

_awsArgumentCompleterRegistration $PINE_Completers $PINE_map

$PINE_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PINE.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PINE_SelectMap = @{
    "Select"=@("New-PINEConfigurationSet",
               "New-PINEConfigurationSetEventDestination",
               "New-PINEDedicatedIpPool",
               "New-PINEDeliverabilityTestReport",
               "New-PINEEmailIdentity",
               "Remove-PINEConfigurationSet",
               "Remove-PINEConfigurationSetEventDestination",
               "Remove-PINEDedicatedIpPool",
               "Remove-PINEEmailIdentity",
               "Get-PINEAccount",
               "Get-PINEBlacklistReport",
               "Get-PINEConfigurationSet",
               "Get-PINEConfigurationSetEventDestination",
               "Get-PINEDedicatedIp",
               "Get-PINEDedicatedIpList",
               "Get-PINEDeliverabilityDashboardOption",
               "Get-PINEDeliverabilityTestReport",
               "Get-PINEDomainDeliverabilityCampaign",
               "Get-PINEDomainStatisticsReport",
               "Get-PINEEmailIdentity",
               "Get-PINEConfigurationSetList",
               "Get-PINEDedicatedIpPoolList",
               "Get-PINEDeliverabilityTestReportList",
               "Get-PINEDomainDeliverabilityCampaignList",
               "Get-PINEEmailIdentityList",
               "Get-PINEResourceTag",
               "Write-PINEAccountDedicatedIpWarmupAttribute",
               "Write-PINEAccountSendingAttribute",
               "Write-PINEConfigurationSetDeliveryOption",
               "Write-PINEConfigurationSetReputationOption",
               "Write-PINEConfigurationSetSendingOption",
               "Write-PINEConfigurationSetTrackingOption",
               "Write-PINEDedicatedIpInPool",
               "Write-PINEDedicatedIpWarmupAttribute",
               "Write-PINEDeliverabilityDashboardOption",
               "Write-PINEEmailIdentityDkimAttribute",
               "Write-PINEEmailIdentityFeedbackAttribute",
               "Write-PINEEmailIdentityMailFromAttribute",
               "Send-PINEEmail",
               "Add-PINEResourceTag",
               "Remove-PINEResourceTag",
               "Update-PINEConfigurationSetEventDestination")
}

_awsArgumentCompleterRegistration $PINE_SelectCompleters $PINE_SelectMap
# Argument completions for service Amazon Pinpoint SMS Voice V2


$SMSV_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.PinpointSMSVoiceV2.KeywordAction
        "Set-SMSVKeyword/KeywordAction"
        {
            $v = "AUTOMATIC_RESPONSE","OPT_IN","OPT_OUT"
            break
        }

        # Amazon.PinpointSMSVoiceV2.LanguageCode
        "Send-SMSVDestinationNumberVerificationCode/LanguageCode"
        {
            $v = "DE_DE","EN_GB","EN_US","ES_419","ES_ES","FR_CA","FR_FR","IT_IT","JA_JP","KO_KR","PT_BR","ZH_CN","ZH_TW"
            break
        }

        # Amazon.PinpointSMSVoiceV2.MessageType
        {
            ($_ -eq "New-SMSVPhoneNumber/MessageType") -Or
            ($_ -eq "New-SMSVPool/MessageType") -Or
            ($_ -eq "Send-SMSVTextMessage/MessageType") -Or
            ($_ -eq "Set-SMSVDefaultMessageType/MessageType")
        }
        {
            $v = "PROMOTIONAL","TRANSACTIONAL"
            break
        }

        # Amazon.PinpointSMSVoiceV2.NumberCapability
        {
            ($_ -eq "Get-SMSVProtectConfigurationCountryRuleSet/NumberCapability") -Or
            ($_ -eq "Update-SMSVProtectConfigurationCountryRuleSet/NumberCapability")
        }
        {
            $v = "MMS","SMS","VOICE"
            break
        }

        # Amazon.PinpointSMSVoiceV2.Owner
        {
            ($_ -eq "Get-SMSVOptOutList/Owner") -Or
            ($_ -eq "Get-SMSVPhoneNumber/Owner") -Or
            ($_ -eq "Get-SMSVPool/Owner") -Or
            ($_ -eq "Get-SMSVSenderId/Owner")
        }
        {
            $v = "SELF","SHARED"
            break
        }

        # Amazon.PinpointSMSVoiceV2.RequestableNumberType
        "New-SMSVPhoneNumber/NumberType"
        {
            $v = "LONG_CODE","SIMULATOR","TEN_DLC","TOLL_FREE"
            break
        }

        # Amazon.PinpointSMSVoiceV2.VerificationChannel
        "Send-SMSVDestinationNumberVerificationCode/VerificationChannel"
        {
            $v = "TEXT","VOICE"
            break
        }

        # Amazon.PinpointSMSVoiceV2.VoiceId
        "Send-SMSVVoiceMessage/VoiceId"
        {
            $v = "AMY","ASTRID","BIANCA","BRIAN","CAMILA","CARLA","CARMEN","CELINE","CHANTAL","CONCHITA","CRISTIANO","DORA","EMMA","ENRIQUE","EWA","FILIZ","GERAINT","GIORGIO","GWYNETH","HANS","INES","IVY","JACEK","JAN","JOANNA","JOEY","JUSTIN","KARL","KENDRA","KIMBERLY","LEA","LIV","LOTTE","LUCIA","LUPE","MADS","MAJA","MARLENE","MATHIEU","MATTHEW","MAXIM","MIA","MIGUEL","MIZUKI","NAJA","NICOLE","PENELOPE","RAVEENA","RICARDO","RUBEN","RUSSELL","SALLI","SEOYEON","TAKUMI","TATYANA","VICKI","VITORIA","ZEINA","ZHIYU"
            break
        }

        # Amazon.PinpointSMSVoiceV2.VoiceMessageBodyTextType
        "Send-SMSVVoiceMessage/MessageBodyTextType"
        {
            $v = "SSML","TEXT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMSV_map = @{
    "KeywordAction"=@("Set-SMSVKeyword")
    "LanguageCode"=@("Send-SMSVDestinationNumberVerificationCode")
    "MessageBodyTextType"=@("Send-SMSVVoiceMessage")
    "MessageType"=@("New-SMSVPhoneNumber","New-SMSVPool","Send-SMSVTextMessage","Set-SMSVDefaultMessageType")
    "NumberCapability"=@("Get-SMSVProtectConfigurationCountryRuleSet","Update-SMSVProtectConfigurationCountryRuleSet")
    "NumberType"=@("New-SMSVPhoneNumber")
    "Owner"=@("Get-SMSVOptOutList","Get-SMSVPhoneNumber","Get-SMSVPool","Get-SMSVSenderId")
    "VerificationChannel"=@("Send-SMSVDestinationNumberVerificationCode")
    "VoiceId"=@("Send-SMSVVoiceMessage")
}

_awsArgumentCompleterRegistration $SMSV_Completers $SMSV_map

$SMSV_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SMSV.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMSV_SelectMap = @{
    "Select"=@("Register-SMSVOriginationIdentity",
               "Register-SMSVProtectConfiguration",
               "New-SMSVConfigurationSet",
               "New-SMSVEventDestination",
               "New-SMSVOptOutList",
               "New-SMSVPool",
               "New-SMSVProtectConfiguration",
               "New-SMSVRegistration",
               "New-SMSVRegistrationAssociation",
               "New-SMSVRegistrationAttachment",
               "New-SMSVRegistrationVersion",
               "New-SMSVVerifiedDestinationNumber",
               "Remove-SMSVAccountDefaultProtectConfiguration",
               "Remove-SMSVConfigurationSet",
               "Remove-SMSVDefaultMessageType",
               "Remove-SMSVDefaultSenderId",
               "Remove-SMSVEventDestination",
               "Remove-SMSVKeyword",
               "Remove-SMSVMediaMessageSpendLimitOverride",
               "Remove-SMSVOptedOutNumber",
               "Remove-SMSVOptOutList",
               "Remove-SMSVPool",
               "Remove-SMSVProtectConfiguration",
               "Remove-SMSVRegistration",
               "Remove-SMSVRegistrationAttachment",
               "Remove-SMSVRegistrationFieldValue",
               "Remove-SMSVResourcePolicy",
               "Remove-SMSVTextMessageSpendLimitOverride",
               "Remove-SMSVVerifiedDestinationNumber",
               "Remove-SMSVVoiceMessageSpendLimitOverride",
               "Get-SMSVAccountAttribute",
               "Get-SMSVAccountLimit",
               "Get-SMSVConfigurationSet",
               "Get-SMSVKeyword",
               "Get-SMSVOptedOutNumber",
               "Get-SMSVOptOutList",
               "Get-SMSVPhoneNumber",
               "Get-SMSVPool",
               "Get-SMSVProtectConfiguration",
               "Get-SMSVRegistrationAttachment",
               "Get-SMSVRegistrationFieldDefinition",
               "Get-SMSVRegistrationFieldValue",
               "Get-SMSVRegistration",
               "Get-SMSVRegistrationSectionDefinition",
               "Get-SMSVRegistrationTypeDefinition",
               "Get-SMSVRegistrationVersion",
               "Get-SMSVSenderId",
               "Get-SMSVSpendLimit",
               "Get-SMSVVerifiedDestinationNumber",
               "Unregister-SMSVOriginationIdentity",
               "Unregister-SMSVProtectConfiguration",
               "Close-SMSVRegistrationVersion",
               "Get-SMSVProtectConfigurationCountryRuleSet",
               "Get-SMSVResourcePolicy",
               "Get-SMSVPoolOriginationIdentityList",
               "Get-SMSVRegistrationAssociationList",
               "Get-SMSVResourceTagList",
               "Set-SMSVKeyword",
               "Set-SMSVOptedOutNumber",
               "Set-SMSVRegistrationFieldValue",
               "Write-SMSVResourcePolicy",
               "Remove-SMSVPhoneNumber",
               "Remove-SMSVSenderId",
               "New-SMSVPhoneNumber",
               "Request-SMSVSenderId",
               "Send-SMSVDestinationNumberVerificationCode",
               "Send-SMSVMediaMessage",
               "Send-SMSVTextMessage",
               "Send-SMSVVoiceMessage",
               "Set-SMSVAccountDefaultProtectConfiguration",
               "Set-SMSVDefaultMessageType",
               "Set-SMSVDefaultSenderId",
               "Set-SMSVMediaMessageSpendLimitOverride",
               "Set-SMSVTextMessageSpendLimitOverride",
               "Set-SMSVVoiceMessageSpendLimitOverride",
               "Submit-SMSVRegistrationVersion",
               "Add-SMSVResourceTag",
               "Remove-SMSVResourceTag",
               "Update-SMSVEventDestination",
               "Update-SMSVPhoneNumber",
               "Update-SMSVPool",
               "Update-SMSVProtectConfiguration",
               "Update-SMSVProtectConfigurationCountryRuleSet",
               "Update-SMSVSenderId",
               "Confirm-SMSVDestinationNumber")
}

_awsArgumentCompleterRegistration $SMSV_SelectCompleters $SMSV_SelectMap
# Argument completions for service Amazon EventBridge Pipes


$PIPES_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Pipes.AssignPublicIp
        {
            ($_ -eq "New-PIPESPipe/AwsvpcConfiguration_AssignPublicIp") -Or
            ($_ -eq "Update-PIPESPipe/AwsvpcConfiguration_AssignPublicIp")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Pipes.DynamoDBStreamStartPosition
        "New-PIPESPipe/DynamoDBStreamParameters_StartingPosition"
        {
            $v = "LATEST","TRIM_HORIZON"
            break
        }

        # Amazon.Pipes.EpochTimeUnit
        {
            ($_ -eq "New-PIPESPipe/TimestreamParameters_EpochTimeUnit") -Or
            ($_ -eq "Update-PIPESPipe/TimestreamParameters_EpochTimeUnit")
        }
        {
            $v = "MICROSECONDS","MILLISECONDS","NANOSECONDS","SECONDS"
            break
        }

        # Amazon.Pipes.KinesisStreamStartPosition
        "New-PIPESPipe/KinesisStreamParameters_StartingPosition"
        {
            $v = "AT_TIMESTAMP","LATEST","TRIM_HORIZON"
            break
        }

        # Amazon.Pipes.LaunchType
        {
            ($_ -eq "New-PIPESPipe/EcsTaskParameters_LaunchType") -Or
            ($_ -eq "Update-PIPESPipe/EcsTaskParameters_LaunchType")
        }
        {
            $v = "EC2","EXTERNAL","FARGATE"
            break
        }

        # Amazon.Pipes.LogLevel
        {
            ($_ -eq "New-PIPESPipe/LogConfiguration_Level") -Or
            ($_ -eq "Update-PIPESPipe/LogConfiguration_Level")
        }
        {
            $v = "ERROR","INFO","OFF","TRACE"
            break
        }

        # Amazon.Pipes.MSKStartPosition
        "New-PIPESPipe/ManagedStreamingKafkaParameters_StartingPosition"
        {
            $v = "LATEST","TRIM_HORIZON"
            break
        }

        # Amazon.Pipes.OnPartialBatchItemFailureStreams
        {
            ($_ -eq "New-PIPESPipe/DynamoDBStreamParameters_OnPartialBatchItemFailure") -Or
            ($_ -eq "Update-PIPESPipe/DynamoDBStreamParameters_OnPartialBatchItemFailure") -Or
            ($_ -eq "New-PIPESPipe/KinesisStreamParameters_OnPartialBatchItemFailure") -Or
            ($_ -eq "Update-PIPESPipe/KinesisStreamParameters_OnPartialBatchItemFailure")
        }
        {
            $v = "AUTOMATIC_BISECT"
            break
        }

        # Amazon.Pipes.PipeState
        "Get-PIPESPipeList/CurrentState"
        {
            $v = "CREATE_FAILED","CREATE_ROLLBACK_FAILED","CREATING","DELETE_FAILED","DELETE_ROLLBACK_FAILED","DELETING","RUNNING","STARTING","START_FAILED","STOPPED","STOPPING","STOP_FAILED","UPDATE_FAILED","UPDATE_ROLLBACK_FAILED","UPDATING"
            break
        }

        # Amazon.Pipes.PipeTargetInvocationType
        {
            ($_ -eq "New-PIPESPipe/LambdaFunctionParameters_InvocationType") -Or
            ($_ -eq "Update-PIPESPipe/LambdaFunctionParameters_InvocationType") -Or
            ($_ -eq "New-PIPESPipe/StepFunctionStateMachineParameters_InvocationType") -Or
            ($_ -eq "Update-PIPESPipe/StepFunctionStateMachineParameters_InvocationType")
        }
        {
            $v = "FIRE_AND_FORGET","REQUEST_RESPONSE"
            break
        }

        # Amazon.Pipes.PropagateTags
        {
            ($_ -eq "New-PIPESPipe/EcsTaskParameters_PropagateTag") -Or
            ($_ -eq "Update-PIPESPipe/EcsTaskParameters_PropagateTag")
        }
        {
            $v = "TASK_DEFINITION"
            break
        }

        # Amazon.Pipes.RequestedPipeState
        {
            ($_ -eq "Get-PIPESPipeList/DesiredState") -Or
            ($_ -eq "New-PIPESPipe/DesiredState") -Or
            ($_ -eq "Update-PIPESPipe/DesiredState")
        }
        {
            $v = "RUNNING","STOPPED"
            break
        }

        # Amazon.Pipes.S3OutputFormat
        {
            ($_ -eq "New-PIPESPipe/S3LogDestination_OutputFormat") -Or
            ($_ -eq "Update-PIPESPipe/S3LogDestination_OutputFormat")
        }
        {
            $v = "json","plain","w3c"
            break
        }

        # Amazon.Pipes.SelfManagedKafkaStartPosition
        "New-PIPESPipe/SelfManagedKafkaParameters_StartingPosition"
        {
            $v = "LATEST","TRIM_HORIZON"
            break
        }

        # Amazon.Pipes.TimeFieldType
        {
            ($_ -eq "New-PIPESPipe/TimestreamParameters_TimeFieldType") -Or
            ($_ -eq "Update-PIPESPipe/TimestreamParameters_TimeFieldType")
        }
        {
            $v = "EPOCH","TIMESTAMP_FORMAT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PIPES_map = @{
    "AwsvpcConfiguration_AssignPublicIp"=@("New-PIPESPipe","Update-PIPESPipe")
    "CurrentState"=@("Get-PIPESPipeList")
    "DesiredState"=@("Get-PIPESPipeList","New-PIPESPipe","Update-PIPESPipe")
    "DynamoDBStreamParameters_OnPartialBatchItemFailure"=@("New-PIPESPipe","Update-PIPESPipe")
    "DynamoDBStreamParameters_StartingPosition"=@("New-PIPESPipe")
    "EcsTaskParameters_LaunchType"=@("New-PIPESPipe","Update-PIPESPipe")
    "EcsTaskParameters_PropagateTag"=@("New-PIPESPipe","Update-PIPESPipe")
    "KinesisStreamParameters_OnPartialBatchItemFailure"=@("New-PIPESPipe","Update-PIPESPipe")
    "KinesisStreamParameters_StartingPosition"=@("New-PIPESPipe")
    "LambdaFunctionParameters_InvocationType"=@("New-PIPESPipe","Update-PIPESPipe")
    "LogConfiguration_Level"=@("New-PIPESPipe","Update-PIPESPipe")
    "ManagedStreamingKafkaParameters_StartingPosition"=@("New-PIPESPipe")
    "S3LogDestination_OutputFormat"=@("New-PIPESPipe","Update-PIPESPipe")
    "SelfManagedKafkaParameters_StartingPosition"=@("New-PIPESPipe")
    "StepFunctionStateMachineParameters_InvocationType"=@("New-PIPESPipe","Update-PIPESPipe")
    "TimestreamParameters_EpochTimeUnit"=@("New-PIPESPipe","Update-PIPESPipe")
    "TimestreamParameters_TimeFieldType"=@("New-PIPESPipe","Update-PIPESPipe")
}

_awsArgumentCompleterRegistration $PIPES_Completers $PIPES_map

$PIPES_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PIPES.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PIPES_SelectMap = @{
    "Select"=@("New-PIPESPipe",
               "Remove-PIPESPipe",
               "Get-PIPESPipe",
               "Get-PIPESPipeList",
               "Get-PIPESResourceTag",
               "Start-PIPESPipe",
               "Stop-PIPESPipe",
               "Add-PIPESResourceTag",
               "Remove-PIPESResourceTag",
               "Update-PIPESPipe")
}

_awsArgumentCompleterRegistration $PIPES_SelectCompleters $PIPES_SelectMap
# Argument completions for service Amazon Polly


$POL_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Polly.Engine
        {
            ($_ -eq "Get-POLSpeech/Engine") -Or
            ($_ -eq "Get-POLVoice/Engine") -Or
            ($_ -eq "Start-POLSpeechSynthesisTask/Engine")
        }
        {
            $v = "generative","long-form","neural","standard"
            break
        }

        # Amazon.Polly.LanguageCode
        {
            ($_ -eq "Get-POLSpeech/LanguageCode") -Or
            ($_ -eq "Get-POLVoice/LanguageCode") -Or
            ($_ -eq "Start-POLSpeechSynthesisTask/LanguageCode")
        }
        {
            $v = "ar-AE","arb","ca-ES","cmn-CN","cs-CZ","cy-GB","da-DK","de-AT","de-CH","de-DE","en-AU","en-GB","en-GB-WLS","en-IE","en-IN","en-NZ","en-US","en-ZA","es-ES","es-MX","es-US","fi-FI","fr-BE","fr-CA","fr-FR","hi-IN","is-IS","it-IT","ja-JP","ko-KR","nb-NO","nl-BE","nl-NL","pl-PL","pt-BR","pt-PT","ro-RO","ru-RU","sv-SE","tr-TR","yue-CN"
            break
        }

        # Amazon.Polly.OutputFormat
        {
            ($_ -eq "Get-POLSpeech/OutputFormat") -Or
            ($_ -eq "Start-POLSpeechSynthesisTask/OutputFormat")
        }
        {
            $v = "json","mp3","ogg_vorbis","pcm"
            break
        }

        # Amazon.Polly.TaskStatus
        "Get-POLSpeechSynthesisTaskList/Status"
        {
            $v = "completed","failed","inProgress","scheduled"
            break
        }

        # Amazon.Polly.TextType
        {
            ($_ -eq "Get-POLSpeech/TextType") -Or
            ($_ -eq "Start-POLSpeechSynthesisTask/TextType")
        }
        {
            $v = "ssml","text"
            break
        }

        # Amazon.Polly.VoiceId
        {
            ($_ -eq "Get-POLSpeech/VoiceId") -Or
            ($_ -eq "Start-POLSpeechSynthesisTask/VoiceId")
        }
        {
            $v = "Aditi","Adriano","Amy","Andres","Aria","Arlet","Arthur","Astrid","Ayanda","Bianca","Brian","Burcu","Camila","Carla","Carmen","Celine","Chantal","Conchita","Cristiano","Daniel","Danielle","Dora","Elin","Emma","Enrique","Ewa","Filiz","Gabrielle","Geraint","Giorgio","Gregory","Gwyneth","Hala","Hannah","Hans","Hiujin","Ida","Ines","Isabelle","Ivy","Jacek","Jan","Jitka","Joanna","Joey","Justin","Kajal","Karl","Kazuha","Kendra","Kevin","Kimberly","Laura","Lea","Liam","Lisa","Liv","Lotte","Lucia","Lupe","Mads","Maja","Marlene","Mathieu","Matthew","Maxim","Mia","Miguel","Mizuki","Naja","Niamh","Nicole","Ola","Olivia","Pedro","Penelope","Raveena","Remi","Ricardo","Ruben","Russell","Ruth","Sabrina","Salli","Seoyeon","Sergio","Sofie","Stephen","Suvi","Takumi","Tatyana","Thiago","Tomoko","Vicki","Vitoria","Zayd","Zeina","Zhiyu"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$POL_map = @{
    "Engine"=@("Get-POLSpeech","Get-POLVoice","Start-POLSpeechSynthesisTask")
    "LanguageCode"=@("Get-POLSpeech","Get-POLVoice","Start-POLSpeechSynthesisTask")
    "OutputFormat"=@("Get-POLSpeech","Start-POLSpeechSynthesisTask")
    "Status"=@("Get-POLSpeechSynthesisTaskList")
    "TextType"=@("Get-POLSpeech","Start-POLSpeechSynthesisTask")
    "VoiceId"=@("Get-POLSpeech","Start-POLSpeechSynthesisTask")
}

_awsArgumentCompleterRegistration $POL_Completers $POL_map

$POL_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.POL.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$POL_SelectMap = @{
    "Select"=@("Remove-POLLexicon",
               "Get-POLVoice",
               "Get-POLLexicon",
               "Get-POLSpeechSynthesisTask",
               "Get-POLLexiconList",
               "Get-POLSpeechSynthesisTaskList",
               "Write-POLLexicon",
               "Start-POLSpeechSynthesisTask",
               "Get-POLSpeech")
}

_awsArgumentCompleterRegistration $POL_SelectCompleters $POL_SelectMap
# Argument completions for service AWS Price List Service


$PLS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PLS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PLS_SelectMap = @{
    "Select"=@("Get-PLSService",
               "Get-PLSAttributeValue",
               "Get-PLSPriceListFileUrl",
               "Get-PLSProduct",
               "Get-PLSPriceListList")
}

_awsArgumentCompleterRegistration $PLS_SelectCompleters $PLS_SelectMap
# Argument completions for service AWS Route53 Recovery Readiness


$PD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PD_SelectMap = @{
    "Select"=@("New-PDCell",
               "New-PDCrossAccountAuthorization",
               "New-PDReadinessCheck",
               "New-PDRecoveryGroup",
               "New-PDResourceSet",
               "Remove-PDCell",
               "Remove-PDCrossAccountAuthorization",
               "Remove-PDReadinessCheck",
               "Remove-PDRecoveryGroup",
               "Remove-PDResourceSet",
               "Get-PDArchitectureRecommendation",
               "Get-PDCell",
               "Get-PDCellReadinessSummary",
               "Get-PDReadinessCheck",
               "Get-PDReadinessCheckResourceStatus",
               "Get-PDReadinessCheckStatus",
               "Get-PDRecoveryGroup",
               "Get-PDRecoveryGroupReadinessSummary",
               "Get-PDResourceSet",
               "Get-PDCellList",
               "Get-PDCrossAccountAuthorizationList",
               "Get-PDReadinessCheckList",
               "Get-PDRecoveryGroupList",
               "Get-PDResourceSetList",
               "Get-PDRuleList",
               "Get-PDTagsForResourceList",
               "Add-PDResourceTag",
               "Remove-PDResourceTag",
               "Update-PDCell",
               "Update-PDReadinessCheck",
               "Update-PDRecoveryGroup",
               "Update-PDResourceSet")
}

_awsArgumentCompleterRegistration $PD_SelectCompleters $PD_SelectMap
# Argument completions for service AWS Private 5G


$PV5G_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Private5G.CommitmentLength
        {
            ($_ -eq "Enable-PV5GNetworkSite/CommitmentConfiguration_CommitmentLength") -Or
            ($_ -eq "Start-PV5GNetworkResourceUpdate/CommitmentConfiguration_CommitmentLength")
        }
        {
            $v = "ONE_YEAR","SIXTY_DAYS","THREE_YEARS"
            break
        }

        # Amazon.Private5G.ElevationReference
        "Set-PV5GAccessPoint/Position_ElevationReference"
        {
            $v = "AGL","AMSL"
            break
        }

        # Amazon.Private5G.ElevationUnit
        "Set-PV5GAccessPoint/Position_ElevationUnit"
        {
            $v = "FEET"
            break
        }

        # Amazon.Private5G.UpdateType
        "Start-PV5GNetworkResourceUpdate/UpdateType"
        {
            $v = "COMMITMENT","REPLACE","RETURN"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PV5G_map = @{
    "CommitmentConfiguration_CommitmentLength"=@("Enable-PV5GNetworkSite","Start-PV5GNetworkResourceUpdate")
    "Position_ElevationReference"=@("Set-PV5GAccessPoint")
    "Position_ElevationUnit"=@("Set-PV5GAccessPoint")
    "UpdateType"=@("Start-PV5GNetworkResourceUpdate")
}

_awsArgumentCompleterRegistration $PV5G_Completers $PV5G_map

$PV5G_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PV5G.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PV5G_SelectMap = @{
    "Select"=@("Confirm-PV5GOrderReceipt",
               "Enable-PV5GDeviceIdentifier",
               "Enable-PV5GNetworkSite",
               "Set-PV5GAccessPoint",
               "New-PV5GNetwork",
               "New-PV5GNetworkSite",
               "Disable-PV5GDeviceIdentifier",
               "Remove-PV5GNetwork",
               "Remove-PV5GNetworkSite",
               "Get-PV5GDeviceIdentifier",
               "Get-PV5GNetwork",
               "Get-PV5GNetworkResource",
               "Get-PV5GNetworkSite",
               "Get-PV5GOrder",
               "Get-PV5GDeviceIdentifierList",
               "Get-PV5GNetworkResourceList",
               "Get-PV5GNetworkList",
               "Get-PV5GNetworkSiteList",
               "Get-PV5GOrderList",
               "Get-PV5GResourceTag",
               "Ping-PV5GPing",
               "Start-PV5GNetworkResourceUpdate",
               "Add-PV5GResourceTag",
               "Remove-PV5GResourceTag",
               "Update-PV5GNetworkSite",
               "Update-PV5GNetworkSitePlan")
}

_awsArgumentCompleterRegistration $PV5G_SelectCompleters $PV5G_SelectMap
# Argument completions for service AWS Proton


$PRO_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Proton.ComponentDeploymentUpdateType
        "Update-PROComponent/DeploymentType"
        {
            $v = "CURRENT_VERSION","NONE"
            break
        }

        # Amazon.Proton.DeploymentUpdateType
        {
            ($_ -eq "Update-PROEnvironment/DeploymentType") -Or
            ($_ -eq "Update-PROServiceInstance/DeploymentType") -Or
            ($_ -eq "Update-PROServicePipeline/DeploymentType")
        }
        {
            $v = "CURRENT_VERSION","MAJOR_VERSION","MINOR_VERSION","NONE"
            break
        }

        # Amazon.Proton.EnvironmentAccountConnectionRequesterAccountType
        "Get-PROEnvironmentAccountConnectionList/RequestedBy"
        {
            $v = "ENVIRONMENT_ACCOUNT","MANAGEMENT_ACCOUNT"
            break
        }

        # Amazon.Proton.ListServiceInstancesSortBy
        "Get-PROServiceInstanceList/SortBy"
        {
            $v = "createdAt","deploymentStatus","environmentName","lastDeploymentAttemptedAt","name","serviceName","templateName"
            break
        }

        # Amazon.Proton.Provisioning
        {
            ($_ -eq "New-PROServiceTemplate/PipelineProvisioning") -Or
            ($_ -eq "New-PROEnvironmentTemplate/Provisioning")
        }
        {
            $v = "CUSTOMER_MANAGED"
            break
        }

        # Amazon.Proton.RepositoryProvider
        {
            ($_ -eq "Update-PROAccountSetting/PipelineProvisioningRepository_Provider") -Or
            ($_ -eq "Get-PRORepository/Provider") -Or
            ($_ -eq "New-PRORepository/Provider") -Or
            ($_ -eq "Remove-PRORepository/Provider") -Or
            ($_ -eq "New-PROEnvironment/ProvisioningRepository_Provider") -Or
            ($_ -eq "Update-PROEnvironment/ProvisioningRepository_Provider") -Or
            ($_ -eq "Get-PRORepositorySyncDefinitionList/RepositoryProvider") -Or
            ($_ -eq "Get-PRORepositorySyncStatus/RepositoryProvider") -Or
            ($_ -eq "New-PROServiceSyncConfig/RepositoryProvider") -Or
            ($_ -eq "New-PROTemplateSyncConfig/RepositoryProvider") -Or
            ($_ -eq "Update-PROServiceSyncConfig/RepositoryProvider") -Or
            ($_ -eq "Update-PROTemplateSyncConfig/RepositoryProvider")
        }
        {
            $v = "BITBUCKET","GITHUB","GITHUB_ENTERPRISE"
            break
        }

        # Amazon.Proton.ResourceDeploymentStatus
        "Edit-PROResourceDeploymentStatusChange/Status"
        {
            $v = "FAILED","IN_PROGRESS","SUCCEEDED"
            break
        }

        # Amazon.Proton.SortOrder
        "Get-PROServiceInstanceList/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.Proton.SyncType
        {
            ($_ -eq "Get-PRORepositorySyncDefinitionList/SyncType") -Or
            ($_ -eq "Get-PRORepositorySyncStatus/SyncType")
        }
        {
            $v = "SERVICE_SYNC","TEMPLATE_SYNC"
            break
        }

        # Amazon.Proton.TemplateType
        {
            ($_ -eq "Get-PROTemplateSyncConfig/TemplateType") -Or
            ($_ -eq "Get-PROTemplateSyncStatus/TemplateType") -Or
            ($_ -eq "New-PROTemplateSyncConfig/TemplateType") -Or
            ($_ -eq "Remove-PROTemplateSyncConfig/TemplateType") -Or
            ($_ -eq "Update-PROTemplateSyncConfig/TemplateType")
        }
        {
            $v = "ENVIRONMENT","SERVICE"
            break
        }

        # Amazon.Proton.TemplateVersionStatus
        {
            ($_ -eq "Update-PROEnvironmentTemplateVersion/Status") -Or
            ($_ -eq "Update-PROServiceTemplateVersion/Status")
        }
        {
            $v = "DRAFT","PUBLISHED","REGISTRATION_FAILED","REGISTRATION_IN_PROGRESS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PRO_map = @{
    "DeploymentType"=@("Update-PROComponent","Update-PROEnvironment","Update-PROServiceInstance","Update-PROServicePipeline")
    "PipelineProvisioning"=@("New-PROServiceTemplate")
    "PipelineProvisioningRepository_Provider"=@("Update-PROAccountSetting")
    "Provider"=@("Get-PRORepository","New-PRORepository","Remove-PRORepository")
    "Provisioning"=@("New-PROEnvironmentTemplate")
    "ProvisioningRepository_Provider"=@("New-PROEnvironment","Update-PROEnvironment")
    "RepositoryProvider"=@("Get-PRORepositorySyncDefinitionList","Get-PRORepositorySyncStatus","New-PROServiceSyncConfig","New-PROTemplateSyncConfig","Update-PROServiceSyncConfig","Update-PROTemplateSyncConfig")
    "RequestedBy"=@("Get-PROEnvironmentAccountConnectionList")
    "SortBy"=@("Get-PROServiceInstanceList")
    "SortOrder"=@("Get-PROServiceInstanceList")
    "Status"=@("Edit-PROResourceDeploymentStatusChange","Update-PROEnvironmentTemplateVersion","Update-PROServiceTemplateVersion")
    "SyncType"=@("Get-PRORepositorySyncDefinitionList","Get-PRORepositorySyncStatus")
    "TemplateType"=@("Get-PROTemplateSyncConfig","Get-PROTemplateSyncStatus","New-PROTemplateSyncConfig","Remove-PROTemplateSyncConfig","Update-PROTemplateSyncConfig")
}

_awsArgumentCompleterRegistration $PRO_Completers $PRO_map

$PRO_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.PRO.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$PRO_SelectMap = @{
    "Select"=@("Approve-PROEnvironmentAccountConnection",
               "Stop-PROComponentDeployment",
               "Stop-PROEnvironmentDeployment",
               "Stop-PROServiceInstanceDeployment",
               "Stop-PROServicePipelineDeployment",
               "New-PROComponent",
               "New-PROEnvironment",
               "New-PROEnvironmentAccountConnection",
               "New-PROEnvironmentTemplate",
               "New-PROEnvironmentTemplateVersion",
               "New-PRORepository",
               "New-PROService",
               "New-PROServiceInstance",
               "New-PROServiceSyncConfig",
               "New-PROServiceTemplate",
               "New-PROServiceTemplateVersion",
               "New-PROTemplateSyncConfig",
               "Remove-PROComponent",
               "Remove-PRODeployment",
               "Remove-PROEnvironment",
               "Remove-PROEnvironmentAccountConnection",
               "Remove-PROEnvironmentTemplate",
               "Remove-PROEnvironmentTemplateVersion",
               "Remove-PRORepository",
               "Remove-PROService",
               "Remove-PROServiceSyncConfig",
               "Remove-PROServiceTemplate",
               "Remove-PROServiceTemplateVersion",
               "Remove-PROTemplateSyncConfig",
               "Get-PROAccountSetting",
               "Get-PROComponent",
               "Get-PRODeployment",
               "Get-PROEnvironment",
               "Get-PROEnvironmentAccountConnection",
               "Get-PROEnvironmentTemplate",
               "Get-PROEnvironmentTemplateVersion",
               "Get-PRORepository",
               "Get-PRORepositorySyncStatus",
               "Get-PROResourcesSummary",
               "Get-PROService",
               "Get-PROServiceInstance",
               "Get-PROServiceInstanceSyncStatus",
               "Get-PROServiceSyncBlockerSummary",
               "Get-PROServiceSyncConfig",
               "Get-PROServiceTemplate",
               "Get-PROServiceTemplateVersion",
               "Get-PROTemplateSyncConfig",
               "Get-PROTemplateSyncStatus",
               "Get-PROComponentOutputList",
               "Get-PROComponentProvisionedResourceList",
               "Get-PROComponentList",
               "Get-PRODeploymentList",
               "Get-PROEnvironmentAccountConnectionList",
               "Get-PROEnvironmentOutputList",
               "Get-PROEnvironmentProvisionedResourceList",
               "Get-PROEnvironmentList",
               "Get-PROEnvironmentTemplateList",
               "Get-PROEnvironmentTemplateVersionList",
               "Get-PRORepositoryList",
               "Get-PRORepositorySyncDefinitionList",
               "Get-PROServiceInstanceOutputList",
               "Get-PROServiceInstanceProvisionedResourceList",
               "Get-PROServiceInstanceList",
               "Get-PROServicePipelineOutputList",
               "Get-PROServicePipelineProvisionedResourceList",
               "Get-PROServiceList",
               "Get-PROServiceTemplateList",
               "Get-PROServiceTemplateVersionList",
               "Get-PROResourceTag",
               "Edit-PROResourceDeploymentStatusChange",
               "Deny-PROEnvironmentAccountConnection",
               "Add-PROResourceTag",
               "Remove-PROResourceTag",
               "Update-PROAccountSetting",
               "Update-PROComponent",
               "Update-PROEnvironment",
               "Update-PROEnvironmentAccountConnection",
               "Update-PROEnvironmentTemplate",
               "Update-PROEnvironmentTemplateVersion",
               "Update-PROService",
               "Update-PROServiceInstance",
               "Update-PROServicePipeline",
               "Update-PROServiceSyncBlocker",
               "Update-PROServiceSyncConfig",
               "Update-PROServiceTemplate",
               "Update-PROServiceTemplateVersion",
               "Update-PROTemplateSyncConfig")
}

_awsArgumentCompleterRegistration $PRO_SelectCompleters $PRO_SelectMap
# Argument completions for service Amazon Q Apps


$qapps_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.QApps.DocumentScope
        "Import-qappsDocument/Scope"
        {
            $v = "APPLICATION","SESSION"
            break
        }

        # Amazon.QApps.LibraryItemStatus
        "Update-qappsLibraryItem/Status"
        {
            $v = "DISABLED","PUBLISHED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$qapps_map = @{
    "Scope"=@("Import-qappsDocument")
    "Status"=@("Update-qappsLibraryItem")
}

_awsArgumentCompleterRegistration $qapps_Completers $qapps_map

$qapps_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.qapps.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$qapps_SelectMap = @{
    "Select"=@("Register-qappsLibraryItemReview",
               "Register-qappsQAppWithUser",
               "New-qappsLibraryItem",
               "New-qappsQApp",
               "Remove-qappsLibraryItem",
               "Remove-qappsQApp",
               "Unregister-qappsLibraryItemReview",
               "Unregister-qappsQAppFromUser",
               "Get-qappsLibraryItem",
               "Get-qappsQApp",
               "Get-qappsQAppSession",
               "Import-qappsDocument",
               "Get-qappsLibraryItemList",
               "Get-qappsQAppList",
               "Get-qappsResourceTag",
               "ConvertFrom-qappsQApp",
               "Start-qappsQAppSession",
               "Stop-qappsQAppSession",
               "Add-qappsResourceTag",
               "Remove-qappsResourceTag",
               "Update-qappsLibraryItem",
               "Update-qappsLibraryItemMetadata",
               "Update-qappsQApp",
               "Update-qappsQAppSession")
}

_awsArgumentCompleterRegistration $qapps_SelectCompleters $qapps_SelectMap
# Argument completions for service Amazon QBusiness


$QBUS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.QBusiness.APISchemaType
        {
            ($_ -eq "New-QBUSPlugin/CustomPluginConfiguration_ApiSchemaType") -Or
            ($_ -eq "Update-QBUSPlugin/CustomPluginConfiguration_ApiSchemaType")
        }
        {
            $v = "OPEN_API_V3"
            break
        }

        # Amazon.QBusiness.AttachmentsControlMode
        {
            ($_ -eq "New-QBUSApplication/AttachmentsConfiguration_AttachmentsControlMode") -Or
            ($_ -eq "Update-QBUSApplication/AttachmentsConfiguration_AttachmentsControlMode")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.QBusiness.AutoSubscriptionStatus
        "Update-QBUSApplication/AutoSubscriptionConfiguration_AutoSubscribe"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.QBusiness.ChatMode
        "Set-QBUSChatSync/ChatMode"
        {
            $v = "CREATOR_MODE","PLUGIN_MODE","RETRIEVAL_MODE"
            break
        }

        # Amazon.QBusiness.CreatorModeControl
        "Update-QBUSChatControlsConfiguration/CreatorModeConfiguration_CreatorModeControl"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.QBusiness.DataSourceSyncJobStatus
        "Get-QBUSDataSourceSyncJobList/StatusFilter"
        {
            $v = "ABORTED","FAILED","INCOMPLETE","STOPPING","SUCCEEDED","SYNCING","SYNCING_INDEXING"
            break
        }

        # Amazon.QBusiness.DocumentEnrichmentConditionOperator
        {
            ($_ -eq "New-QBUSDataSource/DocumentEnrichmentConfiguration_PostInvocationCondition_Operator") -Or
            ($_ -eq "Update-QBUSDataSource/DocumentEnrichmentConfiguration_PostInvocationCondition_Operator") -Or
            ($_ -eq "New-QBUSDataSource/DocumentEnrichmentConfiguration_PreInvocationCondition_Operator") -Or
            ($_ -eq "Update-QBUSDataSource/DocumentEnrichmentConfiguration_PreInvocationCondition_Operator")
        }
        {
            $v = "BEGINS_WITH","CONTAINS","EQUALS","EXISTS","GREATER_THAN","GREATER_THAN_OR_EQUALS","LESS_THAN","LESS_THAN_OR_EQUALS","NOT_CONTAINS","NOT_EQUALS","NOT_EXISTS"
            break
        }

        # Amazon.QBusiness.IdentityType
        "New-QBUSApplication/IdentityType"
        {
            $v = "AWS_IAM_IDC","AWS_IAM_IDP_OIDC","AWS_IAM_IDP_SAML"
            break
        }

        # Amazon.QBusiness.IndexType
        "New-QBUSIndex/Type"
        {
            $v = "ENTERPRISE","STARTER"
            break
        }

        # Amazon.QBusiness.MembershipType
        "Write-QBUSGroup/Type"
        {
            $v = "DATASOURCE","INDEX"
            break
        }

        # Amazon.QBusiness.MessageUsefulness
        "Write-QBUSFeedback/MessageUsefulness_Usefulness"
        {
            $v = "NOT_USEFUL","USEFUL"
            break
        }

        # Amazon.QBusiness.MessageUsefulnessReason
        "Write-QBUSFeedback/MessageUsefulness_Reason"
        {
            $v = "COMPLETE","FACTUALLY_CORRECT","HARMFUL_OR_UNSAFE","HELPFUL","INCORRECT_OR_MISSING_SOURCES","NOT_BASED_ON_DOCUMENTS","NOT_COMPLETE","NOT_CONCISE","NOT_FACTUALLY_CORRECT","NOT_HELPFUL","OTHER","RELEVANT_SOURCES"
            break
        }

        # Amazon.QBusiness.PersonalizationControlMode
        {
            ($_ -eq "New-QBUSApplication/PersonalizationConfiguration_PersonalizationControlMode") -Or
            ($_ -eq "Update-QBUSApplication/PersonalizationConfiguration_PersonalizationControlMode")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.QBusiness.PluginState
        "Update-QBUSPlugin/State"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.QBusiness.PluginType
        "New-QBUSPlugin/Type"
        {
            $v = "CUSTOM","JIRA","SALESFORCE","SERVICE_NOW","ZENDESK"
            break
        }

        # Amazon.QBusiness.QAppsControlMode
        {
            ($_ -eq "New-QBUSApplication/QAppsConfiguration_QAppsControlMode") -Or
            ($_ -eq "Update-QBUSApplication/QAppsConfiguration_QAppsControlMode")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.QBusiness.ResponseScope
        "Update-QBUSChatControlsConfiguration/ResponseScope"
        {
            $v = "ENTERPRISE_CONTENT_ONLY","EXTENDED_KNOWLEDGE_ENABLED"
            break
        }

        # Amazon.QBusiness.RetrieverType
        "New-QBUSRetriever/Type"
        {
            $v = "KENDRA_INDEX","NATIVE_INDEX"
            break
        }

        # Amazon.QBusiness.SubscriptionType
        "Update-QBUSApplication/AutoSubscriptionConfiguration_DefaultSubscriptionType"
        {
            $v = "Q_BUSINESS","Q_LITE"
            break
        }

        # Amazon.QBusiness.WebExperienceSamplePromptsControlMode
        {
            ($_ -eq "New-QBUSWebExperience/SamplePromptsControlMode") -Or
            ($_ -eq "Update-QBUSWebExperience/SamplePromptsControlMode")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$QBUS_map = @{
    "AttachmentsConfiguration_AttachmentsControlMode"=@("New-QBUSApplication","Update-QBUSApplication")
    "AutoSubscriptionConfiguration_AutoSubscribe"=@("Update-QBUSApplication")
    "AutoSubscriptionConfiguration_DefaultSubscriptionType"=@("Update-QBUSApplication")
    "ChatMode"=@("Set-QBUSChatSync")
    "CreatorModeConfiguration_CreatorModeControl"=@("Update-QBUSChatControlsConfiguration")
    "CustomPluginConfiguration_ApiSchemaType"=@("New-QBUSPlugin","Update-QBUSPlugin")
    "DocumentEnrichmentConfiguration_PostInvocationCondition_Operator"=@("New-QBUSDataSource","Update-QBUSDataSource")
    "DocumentEnrichmentConfiguration_PreInvocationCondition_Operator"=@("New-QBUSDataSource","Update-QBUSDataSource")
    "IdentityType"=@("New-QBUSApplication")
    "MessageUsefulness_Reason"=@("Write-QBUSFeedback")
    "MessageUsefulness_Usefulness"=@("Write-QBUSFeedback")
    "PersonalizationConfiguration_PersonalizationControlMode"=@("New-QBUSApplication","Update-QBUSApplication")
    "QAppsConfiguration_QAppsControlMode"=@("New-QBUSApplication","Update-QBUSApplication")
    "ResponseScope"=@("Update-QBUSChatControlsConfiguration")
    "SamplePromptsControlMode"=@("New-QBUSWebExperience","Update-QBUSWebExperience")
    "State"=@("Update-QBUSPlugin")
    "StatusFilter"=@("Get-QBUSDataSourceSyncJobList")
    "Type"=@("New-QBUSIndex","New-QBUSPlugin","New-QBUSRetriever","Write-QBUSGroup")
}

_awsArgumentCompleterRegistration $QBUS_Completers $QBUS_map

$QBUS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.QBUS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$QBUS_SelectMap = @{
    "Select"=@("Remove-QBUSBatchDeleteDocument",
               "Set-QBUSBatchPutDocument",
               "Set-QBUSChatSync",
               "New-QBUSApplication",
               "New-QBUSDataSource",
               "New-QBUSIndex",
               "New-QBUSPlugin",
               "New-QBUSRetriever",
               "New-QBUSUser",
               "New-QBUSWebExperience",
               "Remove-QBUSApplication",
               "Remove-QBUSChatControlsConfiguration",
               "Remove-QBUSConversation",
               "Remove-QBUSDataSource",
               "Remove-QBUSGroup",
               "Remove-QBUSIndex",
               "Remove-QBUSPlugin",
               "Remove-QBUSRetriever",
               "Remove-QBUSUser",
               "Remove-QBUSWebExperience",
               "Get-QBUSApplication",
               "Get-QBUSChatControlsConfiguration",
               "Get-QBUSDataSource",
               "Get-QBUSGroup",
               "Get-QBUSIndex",
               "Get-QBUSPlugin",
               "Get-QBUSRetriever",
               "Get-QBUSUser",
               "Get-QBUSWebExperience",
               "Get-QBUSApplicationList",
               "Get-QBUSConversationList",
               "Get-QBUSDataSourceList",
               "Get-QBUSDataSourceSyncJobList",
               "Get-QBUSDocumentList",
               "Get-QBUSGroupList",
               "Get-QBUSIndexList",
               "Get-QBUSMessageList",
               "Get-QBUSPluginList",
               "Get-QBUSRetrieverList",
               "Get-QBUSResourceTag",
               "Get-QBUSWebExperienceList",
               "Write-QBUSFeedback",
               "Write-QBUSGroup",
               "Start-QBUSDataSourceSyncJob",
               "Stop-QBUSDataSourceSyncJob",
               "Add-QBUSResourceTag",
               "Remove-QBUSResourceTag",
               "Update-QBUSApplication",
               "Update-QBUSChatControlsConfiguration",
               "Update-QBUSDataSource",
               "Update-QBUSIndex",
               "Update-QBUSPlugin",
               "Update-QBUSRetriever",
               "Update-QBUSUser",
               "Update-QBUSWebExperience")
}

_awsArgumentCompleterRegistration $QBUS_SelectCompleters $QBUS_SelectMap
# Argument completions for service Amazon Q Connect


$QC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.QConnect.AIAgentType
        {
            ($_ -eq "Remove-QCAssistantAIAgent/AiAgentType") -Or
            ($_ -eq "Update-QCAssistantAIAgent/AiAgentType") -Or
            ($_ -eq "New-QCAIAgent/Type")
        }
        {
            $v = "ANSWER_RECOMMENDATION","MANUAL_SEARCH"
            break
        }

        # Amazon.QConnect.AIPromptAPIFormat
        "New-QCAIPrompt/ApiFormat"
        {
            $v = "ANTHROPIC_CLAUDE_MESSAGES","ANTHROPIC_CLAUDE_TEXT_COMPLETIONS"
            break
        }

        # Amazon.QConnect.AIPromptTemplateType
        "New-QCAIPrompt/TemplateType"
        {
            $v = "TEXT"
            break
        }

        # Amazon.QConnect.AIPromptType
        "New-QCAIPrompt/Type"
        {
            $v = "ANSWER_GENERATION","INTENT_LABELING_GENERATION","QUERY_REFORMULATION"
            break
        }

        # Amazon.QConnect.AssistantType
        "New-QCAssistant/Type"
        {
            $v = "AGENT"
            break
        }

        # Amazon.QConnect.AssociationType
        "New-QCAssistantAssociation/AssociationType"
        {
            $v = "KNOWLEDGE_BASE"
            break
        }

        # Amazon.QConnect.ChunkingStrategy
        "New-QCKnowledgeBase/ChunkingConfiguration_ChunkingStrategy"
        {
            $v = "FIXED_SIZE","HIERARCHICAL","NONE","SEMANTIC"
            break
        }

        # Amazon.QConnect.ContentAssociationType
        "New-QCContentAssociation/AssociationType"
        {
            $v = "AMAZON_CONNECT_GUIDE"
            break
        }

        # Amazon.QConnect.ExternalSource
        "Start-QCImportJob/ExternalSourceConfiguration_Source"
        {
            $v = "AMAZON_CONNECT"
            break
        }

        # Amazon.QConnect.ImportJobType
        "Start-QCImportJob/ImportJobType"
        {
            $v = "QUICK_RESPONSES"
            break
        }

        # Amazon.QConnect.KnowledgeBaseSearchType
        "Search-QCAssistant/OverrideKnowledgeBaseSearchType"
        {
            $v = "HYBRID","SEMANTIC"
            break
        }

        # Amazon.QConnect.KnowledgeBaseType
        "New-QCKnowledgeBase/KnowledgeBaseType"
        {
            $v = "CUSTOM","EXTERNAL","MANAGED","MESSAGE_TEMPLATES","QUICK_RESPONSES"
            break
        }

        # Amazon.QConnect.Order
        "Search-QCQuickResponse/OrderOnField_Order"
        {
            $v = "ASC","DESC"
            break
        }

        # Amazon.QConnect.Origin
        {
            ($_ -eq "Get-QCAIAgentList/Origin") -Or
            ($_ -eq "Get-QCAIAgentVersionList/Origin") -Or
            ($_ -eq "Get-QCAIPromptList/Origin") -Or
            ($_ -eq "Get-QCAIPromptVersionList/Origin")
        }
        {
            $v = "CUSTOMER","SYSTEM"
            break
        }

        # Amazon.QConnect.ParsingStrategy
        "New-QCKnowledgeBase/ParsingConfiguration_ParsingStrategy"
        {
            $v = "BEDROCK_FOUNDATION_MODEL"
            break
        }

        # Amazon.QConnect.Relevance
        "Write-QCFeedback/GenerativeContentFeedbackData_Relevance"
        {
            $v = "HELPFUL","NOT_HELPFUL"
            break
        }

        # Amazon.QConnect.SessionDataNamespace
        "Update-QCSessionData/Namespace"
        {
            $v = "Custom"
            break
        }

        # Amazon.QConnect.TargetType
        "Write-QCFeedback/TargetType"
        {
            $v = "RECOMMENDATION","RESULT"
            break
        }

        # Amazon.QConnect.VisibilityStatus
        {
            ($_ -eq "New-QCAIAgent/VisibilityStatus") -Or
            ($_ -eq "New-QCAIPrompt/VisibilityStatus") -Or
            ($_ -eq "Update-QCAIAgent/VisibilityStatus") -Or
            ($_ -eq "Update-QCAIPrompt/VisibilityStatus")
        }
        {
            $v = "PUBLISHED","SAVED"
            break
        }

        # Amazon.QConnect.WebScopeType
        "New-QCKnowledgeBase/WebCrawlerConfiguration_Scope"
        {
            $v = "HOST_ONLY","SUBDOMAINS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$QC_map = @{
    "AiAgentType"=@("Remove-QCAssistantAIAgent","Update-QCAssistantAIAgent")
    "ApiFormat"=@("New-QCAIPrompt")
    "AssociationType"=@("New-QCAssistantAssociation","New-QCContentAssociation")
    "ChunkingConfiguration_ChunkingStrategy"=@("New-QCKnowledgeBase")
    "ExternalSourceConfiguration_Source"=@("Start-QCImportJob")
    "GenerativeContentFeedbackData_Relevance"=@("Write-QCFeedback")
    "ImportJobType"=@("Start-QCImportJob")
    "KnowledgeBaseType"=@("New-QCKnowledgeBase")
    "Namespace"=@("Update-QCSessionData")
    "OrderOnField_Order"=@("Search-QCQuickResponse")
    "Origin"=@("Get-QCAIAgentList","Get-QCAIAgentVersionList","Get-QCAIPromptList","Get-QCAIPromptVersionList")
    "OverrideKnowledgeBaseSearchType"=@("Search-QCAssistant")
    "ParsingConfiguration_ParsingStrategy"=@("New-QCKnowledgeBase")
    "TargetType"=@("Write-QCFeedback")
    "TemplateType"=@("New-QCAIPrompt")
    "Type"=@("New-QCAIAgent","New-QCAIPrompt","New-QCAssistant")
    "VisibilityStatus"=@("New-QCAIAgent","New-QCAIPrompt","Update-QCAIAgent","Update-QCAIPrompt")
    "WebCrawlerConfiguration_Scope"=@("New-QCKnowledgeBase")
}

_awsArgumentCompleterRegistration $QC_Completers $QC_map

$QC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.QC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$QC_SelectMap = @{
    "Select"=@("New-QCAIAgent",
               "New-QCAIAgentVersion",
               "New-QCAIPrompt",
               "New-QCAIPromptVersion",
               "New-QCAssistant",
               "New-QCAssistantAssociation",
               "New-QCContent",
               "New-QCContentAssociation",
               "New-QCKnowledgeBase",
               "New-QCQuickResponse",
               "New-QCSession",
               "Remove-QCAIAgent",
               "Remove-QCAIAgentVersion",
               "Remove-QCAIPrompt",
               "Remove-QCAIPromptVersion",
               "Remove-QCAssistant",
               "Remove-QCAssistantAssociation",
               "Remove-QCContent",
               "Remove-QCContentAssociation",
               "Remove-QCImportJob",
               "Remove-QCKnowledgeBase",
               "Remove-QCQuickResponse",
               "Get-QCAIAgent",
               "Get-QCAIPrompt",
               "Get-QCAssistant",
               "Get-QCAssistantAssociation",
               "Get-QCContent",
               "Get-QCContentAssociation",
               "Get-QCContentSummary",
               "Get-QCImportJob",
               "Get-QCKnowledgeBase",
               "Get-QCQuickResponse",
               "Get-QCRecommendation",
               "Get-QCSession",
               "Get-QCAIAgentList",
               "Get-QCAIAgentVersionList",
               "Get-QCAIPromptList",
               "Get-QCAIPromptVersionList",
               "Get-QCAssistantAssociationList",
               "Get-QCAssistantList",
               "Get-QCContentAssociationList",
               "Get-QCContentList",
               "Get-QCImportJobList",
               "Get-QCKnowledgeBasisList",
               "Get-QCQuickResponseList",
               "Get-QCResourceTag",
               "Remove-QCRecommendationsReceived",
               "Write-QCFeedback",
               "Search-QCAssistant",
               "Remove-QCAssistantAIAgent",
               "Remove-QCKnowledgeBaseTemplateUri",
               "Search-QCContent",
               "Search-QCQuickResponse",
               "Search-QCSession",
               "Start-QCContentUpload",
               "Start-QCImportJob",
               "Add-QCResourceTag",
               "Remove-QCResourceTag",
               "Update-QCAIAgent",
               "Update-QCAIPrompt",
               "Update-QCAssistantAIAgent",
               "Update-QCContent",
               "Update-QCKnowledgeBaseTemplateUri",
               "Update-QCQuickResponse",
               "Update-QCSession",
               "Update-QCSessionData")
}

_awsArgumentCompleterRegistration $QC_SelectCompleters $QC_SelectMap
# Argument completions for service Amazon QLDB


$QLDB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.QLDB.OutputFormat
        "Export-QLDBJournalToS3/OutputFormat"
        {
            $v = "ION_BINARY","ION_TEXT","JSON"
            break
        }

        # Amazon.QLDB.PermissionsMode
        {
            ($_ -eq "New-QLDBLedger/PermissionsMode") -Or
            ($_ -eq "Update-QLDBLedgerPermissionsMode/PermissionsMode")
        }
        {
            $v = "ALLOW_ALL","STANDARD"
            break
        }

        # Amazon.QLDB.S3ObjectEncryptionType
        "Export-QLDBJournalToS3/EncryptionConfiguration_ObjectEncryptionType"
        {
            $v = "NO_ENCRYPTION","SSE_KMS","SSE_S3"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$QLDB_map = @{
    "EncryptionConfiguration_ObjectEncryptionType"=@("Export-QLDBJournalToS3")
    "OutputFormat"=@("Export-QLDBJournalToS3")
    "PermissionsMode"=@("New-QLDBLedger","Update-QLDBLedgerPermissionsMode")
}

_awsArgumentCompleterRegistration $QLDB_Completers $QLDB_map

$QLDB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.QLDB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$QLDB_SelectMap = @{
    "Select"=@("Stop-QLDBJournalKinesisStream",
               "New-QLDBLedger",
               "Remove-QLDBLedger",
               "Get-QLDBJournalKinesisStream",
               "Get-QLDBJournalS3Export",
               "Get-QLDBLedger",
               "Export-QLDBJournalToS3",
               "Get-QLDBBlock",
               "Get-QLDBDigest",
               "Get-QLDBRevision",
               "Get-QLDBJournalKinesisStreamsForLedgerList",
               "Get-QLDBJournalS3ExportList",
               "Get-QLDBJournalS3ExportsForLedgerList",
               "Get-QLDBLedgerList",
               "Get-QLDBResourceTag",
               "Start-QLDBStreamJournalToKinesi",
               "Add-QLDBResourceTag",
               "Remove-QLDBResourceTag",
               "Update-QLDBLedger",
               "Update-QLDBLedgerPermissionsMode")
}

_awsArgumentCompleterRegistration $QLDB_SelectCompleters $QLDB_SelectMap
# Argument completions for service Amazon QLDB Session


$QLDBS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.QLDBS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$QLDBS_SelectMap = @{
    "Select"=@("Send-QLDBSCommand")
}

_awsArgumentCompleterRegistration $QLDBS_SelectCompleters $QLDBS_SelectMap
# Argument completions for service Amazon QuickSight


$QS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.QuickSight.AssetBundleExportFormat
        "Start-QSAssetBundleExportJob/ExportFormat"
        {
            $v = "CLOUDFORMATION_JSON","QUICKSIGHT_JSON"
            break
        }

        # Amazon.QuickSight.AssetBundleImportFailureAction
        "Start-QSAssetBundleImportJob/FailureAction"
        {
            $v = "DO_NOTHING","ROLLBACK"
            break
        }

        # Amazon.QuickSight.AssignmentStatus
        {
            ($_ -eq "Get-QSIAMPolicyAssignmentList/AssignmentStatus") -Or
            ($_ -eq "New-QSIAMPolicyAssignment/AssignmentStatus") -Or
            ($_ -eq "Update-QSIAMPolicyAssignment/AssignmentStatus")
        }
        {
            $v = "DISABLED","DRAFT","ENABLED"
            break
        }

        # Amazon.QuickSight.AuthenticationMethodOption
        "New-QSAccountSubscription/AuthenticationMethod"
        {
            $v = "ACTIVE_DIRECTORY","IAM_AND_QUICKSIGHT","IAM_IDENTITY_CENTER","IAM_ONLY"
            break
        }

        # Amazon.QuickSight.DashboardBehavior
        {
            ($_ -eq "New-QSDashboard/AdHocFilteringOption_AvailabilityStatus") -Or
            ($_ -eq "Update-QSDashboard/AdHocFilteringOption_AvailabilityStatus") -Or
            ($_ -eq "New-QSDashboard/DataPointDrillUpDownOption_AvailabilityStatus") -Or
            ($_ -eq "Update-QSDashboard/DataPointDrillUpDownOption_AvailabilityStatus") -Or
            ($_ -eq "New-QSDashboard/DataPointMenuLabelOption_AvailabilityStatus") -Or
            ($_ -eq "Update-QSDashboard/DataPointMenuLabelOption_AvailabilityStatus") -Or
            ($_ -eq "New-QSDashboard/DataPointTooltipOption_AvailabilityStatus") -Or
            ($_ -eq "Update-QSDashboard/DataPointTooltipOption_AvailabilityStatus") -Or
            ($_ -eq "New-QSDashboard/ExportHiddenFieldsOption_AvailabilityStatus") -Or
            ($_ -eq "Update-QSDashboard/ExportHiddenFieldsOption_AvailabilityStatus") -Or
            ($_ -eq "New-QSDashboard/ExportToCSVOption_AvailabilityStatus") -Or
            ($_ -eq "Update-QSDashboard/ExportToCSVOption_AvailabilityStatus") -Or
            ($_ -eq "New-QSDashboard/ExportWithHiddenFieldsOption_AvailabilityStatus") -Or
            ($_ -eq "Update-QSDashboard/ExportWithHiddenFieldsOption_AvailabilityStatus") -Or
            ($_ -eq "New-QSDashboard/SheetLayoutElementMaximizationOption_AvailabilityStatus") -Or
            ($_ -eq "Update-QSDashboard/SheetLayoutElementMaximizationOption_AvailabilityStatus") -Or
            ($_ -eq "New-QSDashboard/VisualAxisSortOption_AvailabilityStatus") -Or
            ($_ -eq "Update-QSDashboard/VisualAxisSortOption_AvailabilityStatus") -Or
            ($_ -eq "New-QSDashboard/VisualMenuOption_AvailabilityStatus") -Or
            ($_ -eq "Update-QSDashboard/VisualMenuOption_AvailabilityStatus")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.QuickSight.DashboardUIState
        {
            ($_ -eq "New-QSDashboard/SheetControlsOption_VisibilityState") -Or
            ($_ -eq "Update-QSDashboard/SheetControlsOption_VisibilityState")
        }
        {
            $v = "COLLAPSED","EXPANDED"
            break
        }

        # Amazon.QuickSight.DataSetImportMode
        {
            ($_ -eq "New-QSDataSet/ImportMode") -Or
            ($_ -eq "Update-QSDataSet/ImportMode")
        }
        {
            $v = "DIRECT_QUERY","SPICE"
            break
        }

        # Amazon.QuickSight.DataSourceType
        "New-QSDataSource/Type"
        {
            $v = "ADOBE_ANALYTICS","AMAZON_ELASTICSEARCH","AMAZON_OPENSEARCH","ATHENA","AURORA","AURORA_POSTGRESQL","AWS_IOT_ANALYTICS","BIGQUERY","DATABRICKS","EXASOL","GITHUB","JIRA","MARIADB","MYSQL","ORACLE","POSTGRESQL","PRESTO","REDSHIFT","S3","SALESFORCE","SERVICENOW","SNOWFLAKE","SPARK","SQLSERVER","STARBURST","TERADATA","TIMESTREAM","TRINO","TWITTER"
            break
        }

        # Amazon.QuickSight.DayOfTheWeek
        {
            ($_ -eq "New-QSAnalysis/Options_WeekStart") -Or
            ($_ -eq "New-QSDashboard/Options_WeekStart") -Or
            ($_ -eq "New-QSTemplate/Options_WeekStart") -Or
            ($_ -eq "Update-QSAnalysis/Options_WeekStart") -Or
            ($_ -eq "Update-QSDashboard/Options_WeekStart") -Or
            ($_ -eq "Update-QSTemplate/Options_WeekStart")
        }
        {
            $v = "FRIDAY","MONDAY","SATURDAY","SUNDAY","THURSDAY","TUESDAY","WEDNESDAY"
            break
        }

        # Amazon.QuickSight.DayOfWeek
        {
            ($_ -eq "New-QSRefreshSchedule/RefreshOnDay_DayOfWeek") -Or
            ($_ -eq "Update-QSRefreshSchedule/RefreshOnDay_DayOfWeek")
        }
        {
            $v = "FRIDAY","MONDAY","SATURDAY","SUNDAY","THURSDAY","TUESDAY","WEDNESDAY"
            break
        }

        # Amazon.QuickSight.Edition
        "New-QSAccountSubscription/Edition"
        {
            $v = "ENTERPRISE","ENTERPRISE_AND_Q","STANDARD"
            break
        }

        # Amazon.QuickSight.EmbeddingIdentityType
        "Get-QSDashboardEmbedUrl/IdentityType"
        {
            $v = "ANONYMOUS","IAM","QUICKSIGHT"
            break
        }

        # Amazon.QuickSight.FolderType
        "New-QSFolder/FolderType"
        {
            $v = "RESTRICTED","SHARED"
            break
        }

        # Amazon.QuickSight.IdentityStore
        "New-QSNamespace/IdentityStore"
        {
            $v = "QUICKSIGHT"
            break
        }

        # Amazon.QuickSight.IdentityType
        "Register-QSUser/IdentityType"
        {
            $v = "IAM","IAM_IDENTITY_CENTER","QUICKSIGHT"
            break
        }

        # Amazon.QuickSight.IncludeFolderMembers
        "Start-QSAssetBundleExportJob/IncludeFolderMember"
        {
            $v = "NONE","ONE_LEVEL","RECURSE"
            break
        }

        # Amazon.QuickSight.IngestionType
        {
            ($_ -eq "New-QSIngestion/IngestionType") -Or
            ($_ -eq "New-QSRefreshSchedule/Schedule_RefreshType") -Or
            ($_ -eq "Update-QSRefreshSchedule/Schedule_RefreshType")
        }
        {
            $v = "FULL_REFRESH","INCREMENTAL_REFRESH"
            break
        }

        # Amazon.QuickSight.LookbackWindowSizeUnit
        "Write-QSDataSetRefreshProperty/LookbackWindow_SizeUnit"
        {
            $v = "DAY","HOUR","WEEK"
            break
        }

        # Amazon.QuickSight.MemberType
        {
            ($_ -eq "New-QSFolderMembership/MemberType") -Or
            ($_ -eq "Remove-QSFolderMembership/MemberType")
        }
        {
            $v = "ANALYSIS","DASHBOARD","DATASET","DATASOURCE","TOPIC"
            break
        }

        # Amazon.QuickSight.PaperOrientation
        {
            ($_ -eq "New-QSAnalysis/PaperCanvasSizeOptions_PaperOrientation") -Or
            ($_ -eq "New-QSDashboard/PaperCanvasSizeOptions_PaperOrientation") -Or
            ($_ -eq "New-QSTemplate/PaperCanvasSizeOptions_PaperOrientation") -Or
            ($_ -eq "Update-QSAnalysis/PaperCanvasSizeOptions_PaperOrientation") -Or
            ($_ -eq "Update-QSDashboard/PaperCanvasSizeOptions_PaperOrientation") -Or
            ($_ -eq "Update-QSTemplate/PaperCanvasSizeOptions_PaperOrientation")
        }
        {
            $v = "LANDSCAPE","PORTRAIT"
            break
        }

        # Amazon.QuickSight.PaperSize
        {
            ($_ -eq "New-QSAnalysis/PaperCanvasSizeOptions_PaperSize") -Or
            ($_ -eq "New-QSDashboard/PaperCanvasSizeOptions_PaperSize") -Or
            ($_ -eq "New-QSTemplate/PaperCanvasSizeOptions_PaperSize") -Or
            ($_ -eq "Update-QSAnalysis/PaperCanvasSizeOptions_PaperSize") -Or
            ($_ -eq "Update-QSDashboard/PaperCanvasSizeOptions_PaperSize") -Or
            ($_ -eq "Update-QSTemplate/PaperCanvasSizeOptions_PaperSize")
        }
        {
            $v = "A0","A1","A2","A3","A4","A5","JIS_B4","JIS_B5","US_LEGAL","US_LETTER","US_TABLOID_LEDGER"
            break
        }

        # Amazon.QuickSight.PersonalizationMode
        "Update-QSQPersonalizationConfiguration/PersonalizationMode"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.QuickSight.PurchaseMode
        "Update-QSSPICECapacityConfiguration/PurchaseMode"
        {
            $v = "AUTO_PURCHASE","MANUAL"
            break
        }

        # Amazon.QuickSight.QueryExecutionMode
        {
            ($_ -eq "New-QSAnalysis/QueryExecutionOptions_QueryExecutionMode") -Or
            ($_ -eq "New-QSTemplate/QueryExecutionOptions_QueryExecutionMode") -Or
            ($_ -eq "Update-QSAnalysis/QueryExecutionOptions_QueryExecutionMode") -Or
            ($_ -eq "Update-QSTemplate/QueryExecutionOptions_QueryExecutionMode")
        }
        {
            $v = "AUTO","MANUAL"
            break
        }

        # Amazon.QuickSight.RefreshInterval
        {
            ($_ -eq "New-QSRefreshSchedule/ScheduleFrequency_Interval") -Or
            ($_ -eq "Update-QSRefreshSchedule/ScheduleFrequency_Interval")
        }
        {
            $v = "DAILY","HOURLY","MINUTE15","MINUTE30","MONTHLY","WEEKLY"
            break
        }

        # Amazon.QuickSight.ResizeOption
        {
            ($_ -eq "New-QSAnalysis/ScreenCanvasSizeOptions_ResizeOption") -Or
            ($_ -eq "New-QSDashboard/ScreenCanvasSizeOptions_ResizeOption") -Or
            ($_ -eq "New-QSTemplate/ScreenCanvasSizeOptions_ResizeOption") -Or
            ($_ -eq "Update-QSAnalysis/ScreenCanvasSizeOptions_ResizeOption") -Or
            ($_ -eq "Update-QSDashboard/ScreenCanvasSizeOptions_ResizeOption") -Or
            ($_ -eq "Update-QSTemplate/ScreenCanvasSizeOptions_ResizeOption")
        }
        {
            $v = "FIXED","RESPONSIVE"
            break
        }

        # Amazon.QuickSight.Role
        {
            ($_ -eq "Get-QSRoleCustomPermission/Role") -Or
            ($_ -eq "Get-QSRoleMembershipList/Role") -Or
            ($_ -eq "New-QSRoleMembership/Role") -Or
            ($_ -eq "Remove-QSRoleCustomPermission/Role") -Or
            ($_ -eq "Remove-QSRoleMembership/Role") -Or
            ($_ -eq "Update-QSRoleCustomPermission/Role")
        }
        {
            $v = "ADMIN","ADMIN_PRO","AUTHOR","AUTHOR_PRO","READER","READER_PRO"
            break
        }

        # Amazon.QuickSight.RowLevelPermissionFormatVersion
        {
            ($_ -eq "New-QSDataSet/RowLevelPermissionDataSet_FormatVersion") -Or
            ($_ -eq "Update-QSDataSet/RowLevelPermissionDataSet_FormatVersion")
        }
        {
            $v = "VERSION_1","VERSION_2"
            break
        }

        # Amazon.QuickSight.RowLevelPermissionPolicy
        {
            ($_ -eq "New-QSDataSet/RowLevelPermissionDataSet_PermissionPolicy") -Or
            ($_ -eq "Update-QSDataSet/RowLevelPermissionDataSet_PermissionPolicy")
        }
        {
            $v = "DENY_ACCESS","GRANT_ACCESS"
            break
        }

        # Amazon.QuickSight.ServiceType
        {
            ($_ -eq "Remove-QSIdentityPropagationConfig/Service") -Or
            ($_ -eq "Update-QSIdentityPropagationConfig/Service")
        }
        {
            $v = "REDSHIFT"
            break
        }

        # Amazon.QuickSight.SharingModel
        "New-QSFolder/SharingModel"
        {
            $v = "ACCOUNT","NAMESPACE"
            break
        }

        # Amazon.QuickSight.SheetContentType
        {
            ($_ -eq "New-QSAnalysis/DefaultNewSheetConfiguration_SheetContentType") -Or
            ($_ -eq "New-QSDashboard/DefaultNewSheetConfiguration_SheetContentType") -Or
            ($_ -eq "New-QSTemplate/DefaultNewSheetConfiguration_SheetContentType") -Or
            ($_ -eq "Update-QSAnalysis/DefaultNewSheetConfiguration_SheetContentType") -Or
            ($_ -eq "Update-QSDashboard/DefaultNewSheetConfiguration_SheetContentType") -Or
            ($_ -eq "Update-QSTemplate/DefaultNewSheetConfiguration_SheetContentType")
        }
        {
            $v = "INTERACTIVE","PAGINATED"
            break
        }

        # Amazon.QuickSight.StarburstProductType
        {
            ($_ -eq "New-QSDataSource/StarburstParameters_ProductType") -Or
            ($_ -eq "Update-QSDataSource/StarburstParameters_ProductType")
        }
        {
            $v = "ENTERPRISE","GALAXY"
            break
        }

        # Amazon.QuickSight.Status
        {
            ($_ -eq "New-QSDataSet/RowLevelPermissionDataSet_Status") -Or
            ($_ -eq "Update-QSDataSet/RowLevelPermissionDataSet_Status") -Or
            ($_ -eq "New-QSDataSet/RowLevelPermissionTagConfiguration_Status") -Or
            ($_ -eq "Update-QSDataSet/RowLevelPermissionTagConfiguration_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.QuickSight.ThemeType
        "Get-QSThemeList/Type"
        {
            $v = "ALL","CUSTOM","QUICKSIGHT"
            break
        }

        # Amazon.QuickSight.TopicScheduleType
        {
            ($_ -eq "New-QSTopicRefreshSchedule/RefreshSchedule_TopicScheduleType") -Or
            ($_ -eq "Update-QSTopicRefreshSchedule/RefreshSchedule_TopicScheduleType")
        }
        {
            $v = "DAILY","HOURLY","MONTHLY","WEEKLY"
            break
        }

        # Amazon.QuickSight.TopicUserExperienceVersion
        {
            ($_ -eq "New-QSTopic/Topic_UserExperienceVersion") -Or
            ($_ -eq "Update-QSTopic/Topic_UserExperienceVersion")
        }
        {
            $v = "LEGACY","NEW_READER_EXPERIENCE"
            break
        }

        # Amazon.QuickSight.UserRole
        {
            ($_ -eq "Update-QSUser/Role") -Or
            ($_ -eq "Register-QSUser/UserRole")
        }
        {
            $v = "ADMIN","ADMIN_PRO","AUTHOR","AUTHOR_PRO","READER","READER_PRO","RESTRICTED_AUTHOR","RESTRICTED_READER"
            break
        }

        # Amazon.QuickSight.ValidationStrategyMode
        {
            ($_ -eq "New-QSAnalysis/ValidationStrategy_Mode") -Or
            ($_ -eq "New-QSDashboard/ValidationStrategy_Mode") -Or
            ($_ -eq "New-QSTemplate/ValidationStrategy_Mode") -Or
            ($_ -eq "Update-QSAnalysis/ValidationStrategy_Mode") -Or
            ($_ -eq "Update-QSDashboard/ValidationStrategy_Mode") -Or
            ($_ -eq "Update-QSTemplate/ValidationStrategy_Mode")
        }
        {
            $v = "LENIENT","STRICT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$QS_map = @{
    "AdHocFilteringOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard")
    "AssignmentStatus"=@("Get-QSIAMPolicyAssignmentList","New-QSIAMPolicyAssignment","Update-QSIAMPolicyAssignment")
    "AuthenticationMethod"=@("New-QSAccountSubscription")
    "DataPointDrillUpDownOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard")
    "DataPointMenuLabelOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard")
    "DataPointTooltipOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard")
    "DefaultNewSheetConfiguration_SheetContentType"=@("New-QSAnalysis","New-QSDashboard","New-QSTemplate","Update-QSAnalysis","Update-QSDashboard","Update-QSTemplate")
    "Edition"=@("New-QSAccountSubscription")
    "ExportFormat"=@("Start-QSAssetBundleExportJob")
    "ExportHiddenFieldsOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard")
    "ExportToCSVOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard")
    "ExportWithHiddenFieldsOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard")
    "FailureAction"=@("Start-QSAssetBundleImportJob")
    "FolderType"=@("New-QSFolder")
    "IdentityStore"=@("New-QSNamespace")
    "IdentityType"=@("Get-QSDashboardEmbedUrl","Register-QSUser")
    "ImportMode"=@("New-QSDataSet","Update-QSDataSet")
    "IncludeFolderMember"=@("Start-QSAssetBundleExportJob")
    "IngestionType"=@("New-QSIngestion")
    "LookbackWindow_SizeUnit"=@("Write-QSDataSetRefreshProperty")
    "MemberType"=@("New-QSFolderMembership","Remove-QSFolderMembership")
    "Options_WeekStart"=@("New-QSAnalysis","New-QSDashboard","New-QSTemplate","Update-QSAnalysis","Update-QSDashboard","Update-QSTemplate")
    "PaperCanvasSizeOptions_PaperOrientation"=@("New-QSAnalysis","New-QSDashboard","New-QSTemplate","Update-QSAnalysis","Update-QSDashboard","Update-QSTemplate")
    "PaperCanvasSizeOptions_PaperSize"=@("New-QSAnalysis","New-QSDashboard","New-QSTemplate","Update-QSAnalysis","Update-QSDashboard","Update-QSTemplate")
    "PersonalizationMode"=@("Update-QSQPersonalizationConfiguration")
    "PurchaseMode"=@("Update-QSSPICECapacityConfiguration")
    "QueryExecutionOptions_QueryExecutionMode"=@("New-QSAnalysis","New-QSTemplate","Update-QSAnalysis","Update-QSTemplate")
    "RefreshOnDay_DayOfWeek"=@("New-QSRefreshSchedule","Update-QSRefreshSchedule")
    "RefreshSchedule_TopicScheduleType"=@("New-QSTopicRefreshSchedule","Update-QSTopicRefreshSchedule")
    "Role"=@("Get-QSRoleCustomPermission","Get-QSRoleMembershipList","New-QSRoleMembership","Remove-QSRoleCustomPermission","Remove-QSRoleMembership","Update-QSRoleCustomPermission","Update-QSUser")
    "RowLevelPermissionDataSet_FormatVersion"=@("New-QSDataSet","Update-QSDataSet")
    "RowLevelPermissionDataSet_PermissionPolicy"=@("New-QSDataSet","Update-QSDataSet")
    "RowLevelPermissionDataSet_Status"=@("New-QSDataSet","Update-QSDataSet")
    "RowLevelPermissionTagConfiguration_Status"=@("New-QSDataSet","Update-QSDataSet")
    "Schedule_RefreshType"=@("New-QSRefreshSchedule","Update-QSRefreshSchedule")
    "ScheduleFrequency_Interval"=@("New-QSRefreshSchedule","Update-QSRefreshSchedule")
    "ScreenCanvasSizeOptions_ResizeOption"=@("New-QSAnalysis","New-QSDashboard","New-QSTemplate","Update-QSAnalysis","Update-QSDashboard","Update-QSTemplate")
    "Service"=@("Remove-QSIdentityPropagationConfig","Update-QSIdentityPropagationConfig")
    "SharingModel"=@("New-QSFolder")
    "SheetControlsOption_VisibilityState"=@("New-QSDashboard","Update-QSDashboard")
    "SheetLayoutElementMaximizationOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard")
    "StarburstParameters_ProductType"=@("New-QSDataSource","Update-QSDataSource")
    "Topic_UserExperienceVersion"=@("New-QSTopic","Update-QSTopic")
    "Type"=@("Get-QSThemeList","New-QSDataSource")
    "UserRole"=@("Register-QSUser")
    "ValidationStrategy_Mode"=@("New-QSAnalysis","New-QSDashboard","New-QSTemplate","Update-QSAnalysis","Update-QSDashboard","Update-QSTemplate")
    "VisualAxisSortOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard")
    "VisualMenuOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard")
}

_awsArgumentCompleterRegistration $QS_Completers $QS_map

$QS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.QS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$QS_SelectMap = @{
    "Select"=@("Set-QSBatchCreateTopicReviewedAnswer",
               "Set-QSBatchDeleteTopicReviewedAnswer",
               "Stop-QSIngestion",
               "New-QSAccountCustomization",
               "New-QSAccountSubscription",
               "New-QSAnalysis",
               "New-QSDashboard",
               "New-QSDataSet",
               "New-QSDataSource",
               "New-QSFolder",
               "New-QSFolderMembership",
               "New-QSGroup",
               "New-QSGroupMembership",
               "New-QSIAMPolicyAssignment",
               "New-QSIngestion",
               "New-QSNamespace",
               "New-QSRefreshSchedule",
               "New-QSRoleMembership",
               "New-QSTemplate",
               "New-QSTemplateAlias",
               "New-QSTheme",
               "New-QSThemeAlias",
               "New-QSTopic",
               "New-QSTopicRefreshSchedule",
               "New-QSVPCConnection",
               "Remove-QSAccountCustomization",
               "Remove-QSAccountSubscription",
               "Remove-QSAnalysis",
               "Remove-QSDashboard",
               "Remove-QSDataSet",
               "Remove-QSDataSetRefreshProperty",
               "Remove-QSDataSource",
               "Remove-QSFolder",
               "Remove-QSFolderMembership",
               "Remove-QSGroup",
               "Remove-QSGroupMembership",
               "Remove-QSIAMPolicyAssignment",
               "Remove-QSIdentityPropagationConfig",
               "Remove-QSNamespace",
               "Remove-QSRefreshSchedule",
               "Remove-QSRoleCustomPermission",
               "Remove-QSRoleMembership",
               "Remove-QSTemplate",
               "Remove-QSTemplateAlias",
               "Remove-QSTheme",
               "Remove-QSThemeAlias",
               "Remove-QSTopic",
               "Remove-QSTopicRefreshSchedule",
               "Remove-QSUser",
               "Remove-QSUserByPrincipalId",
               "Remove-QSVPCConnection",
               "Get-QSAccountCustomization",
               "Get-QSAccountSetting",
               "Get-QSAccountSubscription",
               "Get-QSAnalysis",
               "Get-QSAnalysisDefinition",
               "Get-QSAnalysisPermission",
               "Get-QSAssetBundleExportJob",
               "Get-QSAssetBundleImportJob",
               "Get-QSDashboard",
               "Get-QSDashboardDefinition",
               "Get-QSDashboardPermission",
               "Get-QSDashboardSnapshotJob",
               "Get-QSDashboardSnapshotJobResult",
               "Get-QSDataSet",
               "Get-QSDataSetPermission",
               "Get-QSDataSetRefreshProperty",
               "Get-QSDataSource",
               "Get-QSDataSourcePermission",
               "Get-QSFolder",
               "Get-QSFolderPermission",
               "Get-QSFolderResolvedPermission",
               "Get-QSGroup",
               "Get-QSGroupMembership",
               "Get-QSIAMPolicyAssignment",
               "Get-QSIngestion",
               "Get-QSIpRestriction",
               "Get-QSKeyRegistration",
               "Get-QSNamespace",
               "Get-QSQPersonalizationConfiguration",
               "Get-QSRefreshSchedule",
               "Get-QSRoleCustomPermission",
               "Get-QSTemplate",
               "Get-QSTemplateAlias",
               "Get-QSTemplateDefinition",
               "Get-QSTemplatePermission",
               "Get-QSTheme",
               "Get-QSThemeAlias",
               "Get-QSThemePermission",
               "Get-QSTopic",
               "Get-QSTopicPermission",
               "Get-QSTopicRefresh",
               "Get-QSTopicRefreshSchedule",
               "Get-QSUser",
               "Get-QSVPCConnection",
               "New-QSEmbedUrlForAnonymousUser",
               "New-QSEmbedUrlForRegisteredUser",
               "Get-QSDashboardEmbedUrl",
               "Get-QSSessionEmbedUrl",
               "Get-QSAnalysisList",
               "Get-QSAssetBundleExportJobList",
               "Get-QSAssetBundleImportJobList",
               "Get-QSDashboardList",
               "Get-QSDashboardVersionList",
               "Get-QSDataSetList",
               "Get-QSDataSourceList",
               "Get-QSFolderMemberList",
               "Get-QSFolderList",
               "Get-QSFoldersForResourceList",
               "Get-QSGroupMembershipList",
               "Get-QSGroupList",
               "Get-QSIAMPolicyAssignmentList",
               "Get-QSIAMPolicyAssignmentsForUserList",
               "Get-QSIdentityPropagationConfigList",
               "Get-QSIngestionList",
               "Get-QSNamespaceList",
               "Get-QSRefreshScheduleList",
               "Get-QSRoleMembershipList",
               "Get-QSResourceTag",
               "Get-QSTemplateAliasList",
               "Get-QSTemplateList",
               "Get-QSTemplateVersionList",
               "Get-QSThemeAliasList",
               "Get-QSThemeList",
               "Get-QSThemeVersionList",
               "Get-QSTopicRefreshScheduleList",
               "Get-QSTopicReviewedAnswerList",
               "Get-QSTopicList",
               "Get-QSUserGroupList",
               "Get-QSUserList",
               "Get-QSVPCConnectionList",
               "Write-QSDataSetRefreshProperty",
               "Register-QSUser",
               "Restore-QSAnalysis",
               "Search-QSAnalysis",
               "Search-QSDashboard",
               "Search-QSDataSet",
               "Search-QSDataSource",
               "Search-QSFolder",
               "Find-QSGroup",
               "Start-QSAssetBundleExportJob",
               "Start-QSAssetBundleImportJob",
               "Start-QSDashboardSnapshotJob",
               "Start-QSDashboardSnapshotJobSchedule",
               "Add-QSResourceTag",
               "Remove-QSResourceTag",
               "Update-QSAccountCustomization",
               "Update-QSAccountSetting",
               "Update-QSAnalysis",
               "Update-QSAnalysisPermission",
               "Update-QSDashboard",
               "Update-QSDashboardLink",
               "Update-QSDashboardPermission",
               "Update-QSDashboardPublishedVersion",
               "Update-QSDataSet",
               "Update-QSDataSetPermission",
               "Update-QSDataSource",
               "Update-QSDataSourcePermission",
               "Update-QSFolder",
               "Update-QSFolderPermission",
               "Update-QSGroup",
               "Update-QSIAMPolicyAssignment",
               "Update-QSIdentityPropagationConfig",
               "Update-QSIpRestriction",
               "Update-QSKeyRegistration",
               "Update-QSPublicSharingSetting",
               "Update-QSQPersonalizationConfiguration",
               "Update-QSRefreshSchedule",
               "Update-QSRoleCustomPermission",
               "Update-QSSPICECapacityConfiguration",
               "Update-QSTemplate",
               "Update-QSTemplateAlias",
               "Update-QSTemplatePermission",
               "Update-QSTheme",
               "Update-QSThemeAlias",
               "Update-QSThemePermission",
               "Update-QSTopic",
               "Update-QSTopicPermission",
               "Update-QSTopicRefreshSchedule",
               "Update-QSUser",
               "Update-QSVPCConnection")
}

_awsArgumentCompleterRegistration $QS_SelectCompleters $QS_SelectMap
# Argument completions for service AWS Resource Access Manager (RAM)


$RAM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.RAM.PermissionFeatureSet
        "Get-RAMPermissionAssociationList/FeatureSet"
        {
            $v = "CREATED_FROM_POLICY","PROMOTING_TO_STANDARD","STANDARD"
            break
        }

        # Amazon.RAM.PermissionTypeFilter
        "Get-RAMPermissionList/PermissionType"
        {
            $v = "ALL","AWS_MANAGED","CUSTOMER_MANAGED"
            break
        }

        # Amazon.RAM.ReplacePermissionAssociationsWorkStatus
        "Get-RAMReplacePermissionAssociationsWorkList/Status"
        {
            $v = "COMPLETED","FAILED","IN_PROGRESS"
            break
        }

        # Amazon.RAM.ResourceOwner
        {
            ($_ -eq "Get-RAMPrincipalList/ResourceOwner") -Or
            ($_ -eq "Get-RAMResourceList/ResourceOwner") -Or
            ($_ -eq "Get-RAMResourceShare/ResourceOwner")
        }
        {
            $v = "OTHER-ACCOUNTS","SELF"
            break
        }

        # Amazon.RAM.ResourceRegionScopeFilter
        {
            ($_ -eq "Get-RAMPendingInvitationResourceList/ResourceRegionScope") -Or
            ($_ -eq "Get-RAMResourceList/ResourceRegionScope") -Or
            ($_ -eq "Get-RAMResourceTypeList/ResourceRegionScope")
        }
        {
            $v = "ALL","GLOBAL","REGIONAL"
            break
        }

        # Amazon.RAM.ResourceShareAssociationStatus
        {
            ($_ -eq "Get-RAMPermissionAssociationList/AssociationStatus") -Or
            ($_ -eq "Get-RAMResourceShareAssociation/AssociationStatus")
        }
        {
            $v = "ASSOCIATED","ASSOCIATING","DISASSOCIATED","DISASSOCIATING","FAILED"
            break
        }

        # Amazon.RAM.ResourceShareAssociationType
        "Get-RAMResourceShareAssociation/AssociationType"
        {
            $v = "PRINCIPAL","RESOURCE"
            break
        }

        # Amazon.RAM.ResourceShareStatus
        "Get-RAMResourceShare/ResourceShareStatus"
        {
            $v = "ACTIVE","DELETED","DELETING","FAILED","PENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RAM_map = @{
    "AssociationStatus"=@("Get-RAMPermissionAssociationList","Get-RAMResourceShareAssociation")
    "AssociationType"=@("Get-RAMResourceShareAssociation")
    "FeatureSet"=@("Get-RAMPermissionAssociationList")
    "PermissionType"=@("Get-RAMPermissionList")
    "ResourceOwner"=@("Get-RAMPrincipalList","Get-RAMResourceList","Get-RAMResourceShare")
    "ResourceRegionScope"=@("Get-RAMPendingInvitationResourceList","Get-RAMResourceList","Get-RAMResourceTypeList")
    "ResourceShareStatus"=@("Get-RAMResourceShare")
    "Status"=@("Get-RAMReplacePermissionAssociationsWorkList")
}

_awsArgumentCompleterRegistration $RAM_Completers $RAM_map

$RAM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RAM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RAM_SelectMap = @{
    "Select"=@("Confirm-RAMResourceShareInvitation",
               "Connect-RAMResourceShare",
               "Add-RAMPermissionToResourceShare",
               "New-RAMPermission",
               "New-RAMPermissionVersion",
               "New-RAMResourceShare",
               "Remove-RAMPermission",
               "Remove-RAMPermissionVersion",
               "Remove-RAMResourceShare",
               "Disconnect-RAMResourceShare",
               "Remove-RAMPermissionFromResourceShare",
               "Enable-RAMSharingWithAwsOrganization",
               "Get-RAMPermission",
               "Get-RAMResourcePolicy",
               "Get-RAMResourceShareAssociation",
               "Get-RAMResourceShareInvitation",
               "Get-RAMResourceShare",
               "Get-RAMPendingInvitationResourceList",
               "Get-RAMPermissionAssociationList",
               "Get-RAMPermissionList",
               "Get-RAMPermissionVersionList",
               "Get-RAMPrincipalList",
               "Get-RAMReplacePermissionAssociationsWorkList",
               "Get-RAMResourceList",
               "Get-RAMResourceSharePermissionList",
               "Get-RAMResourceTypeList",
               "Convert-RAMPermissionCreatedFromPolicy",
               "Convert-RAMPolicyBasedResourceShareToPromoted",
               "Deny-RAMResourceShareInvitation",
               "Edit-RAMPermissionAssociation",
               "Set-RAMDefaultPermissionVersion",
               "Add-RAMResourceTag",
               "Remove-RAMResourceTag",
               "Update-RAMResourceShare")
}

_awsArgumentCompleterRegistration $RAM_SelectCompleters $RAM_SelectMap
# Argument completions for service Amazon Recycle Bin


$RBIN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.RecycleBin.LockState
        "Get-RBINRuleList/LockState"
        {
            $v = "locked","pending_unlock","unlocked"
            break
        }

        # Amazon.RecycleBin.ResourceType
        {
            ($_ -eq "Get-RBINRuleList/ResourceType") -Or
            ($_ -eq "New-RBINRule/ResourceType") -Or
            ($_ -eq "Update-RBINRule/ResourceType")
        }
        {
            $v = "EBS_SNAPSHOT","EC2_IMAGE"
            break
        }

        # Amazon.RecycleBin.RetentionPeriodUnit
        {
            ($_ -eq "New-RBINRule/RetentionPeriod_RetentionPeriodUnit") -Or
            ($_ -eq "Update-RBINRule/RetentionPeriod_RetentionPeriodUnit")
        }
        {
            $v = "DAYS"
            break
        }

        # Amazon.RecycleBin.UnlockDelayUnit
        {
            ($_ -eq "Lock-RBINRule/UnlockDelay_UnlockDelayUnit") -Or
            ($_ -eq "New-RBINRule/UnlockDelay_UnlockDelayUnit")
        }
        {
            $v = "DAYS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RBIN_map = @{
    "LockState"=@("Get-RBINRuleList")
    "ResourceType"=@("Get-RBINRuleList","New-RBINRule","Update-RBINRule")
    "RetentionPeriod_RetentionPeriodUnit"=@("New-RBINRule","Update-RBINRule")
    "UnlockDelay_UnlockDelayUnit"=@("Lock-RBINRule","New-RBINRule")
}

_awsArgumentCompleterRegistration $RBIN_Completers $RBIN_map

$RBIN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RBIN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RBIN_SelectMap = @{
    "Select"=@("New-RBINRule",
               "Remove-RBINRule",
               "Get-RBINRule",
               "Get-RBINRuleList",
               "Get-RBINResourceTag",
               "Lock-RBINRule",
               "Add-RBINResourceTag",
               "Unlock-RBINRule",
               "Remove-RBINResourceTag",
               "Update-RBINRule")
}

_awsArgumentCompleterRegistration $RBIN_SelectCompleters $RBIN_SelectMap
# Argument completions for service Amazon Relational Database Service


$RDS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.RDS.ActivityStreamMode
        "Start-RDSActivityStream/Mode"
        {
            $v = "async","sync"
            break
        }

        # Amazon.RDS.AuditPolicyState
        "Edit-RDSActivityStream/AuditPolicyState"
        {
            $v = "locked","unlocked"
            break
        }

        # Amazon.RDS.AutomationMode
        "Edit-RDSDBInstance/AutomationMode"
        {
            $v = "all-paused","full"
            break
        }

        # Amazon.RDS.ClusterScalabilityType
        "New-RDSDBCluster/ClusterScalabilityType"
        {
            $v = "limitless","standard"
            break
        }

        # Amazon.RDS.CustomEngineVersionStatus
        "Edit-RDSCustomDBEngineVersion/Status"
        {
            $v = "available","inactive","inactive-except-restore"
            break
        }

        # Amazon.RDS.DBProxyEndpointTargetRole
        "New-RDSDBProxyEndpoint/TargetRole"
        {
            $v = "READ_ONLY","READ_WRITE"
            break
        }

        # Amazon.RDS.EngineFamily
        "New-RDSDBProxy/EngineFamily"
        {
            $v = "MYSQL","POSTGRESQL","SQLSERVER"
            break
        }

        # Amazon.RDS.ExportSourceType
        "Get-RDSExportTask/SourceType"
        {
            $v = "CLUSTER","SNAPSHOT"
            break
        }

        # Amazon.RDS.ReplicaMode
        {
            ($_ -eq "New-RDSDBCluster/RdsCustomClusterConfiguration_ReplicaMode") -Or
            ($_ -eq "Restore-RDSDBClusterFromSnapshot/RdsCustomClusterConfiguration_ReplicaMode") -Or
            ($_ -eq "Restore-RDSDBClusterToPointInTime/RdsCustomClusterConfiguration_ReplicaMode") -Or
            ($_ -eq "Edit-RDSDBInstance/ReplicaMode") -Or
            ($_ -eq "New-RDSDBInstanceReadReplica/ReplicaMode")
        }
        {
            $v = "mounted","open-read-only"
            break
        }

        # Amazon.RDS.SourceType
        "Get-RDSEvent/SourceType"
        {
            $v = "blue-green-deployment","custom-engine-version","db-cluster","db-cluster-snapshot","db-instance","db-parameter-group","db-proxy","db-security-group","db-snapshot"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RDS_map = @{
    "AuditPolicyState"=@("Edit-RDSActivityStream")
    "AutomationMode"=@("Edit-RDSDBInstance")
    "ClusterScalabilityType"=@("New-RDSDBCluster")
    "EngineFamily"=@("New-RDSDBProxy")
    "Mode"=@("Start-RDSActivityStream")
    "RdsCustomClusterConfiguration_ReplicaMode"=@("New-RDSDBCluster","Restore-RDSDBClusterFromSnapshot","Restore-RDSDBClusterToPointInTime")
    "ReplicaMode"=@("Edit-RDSDBInstance","New-RDSDBInstanceReadReplica")
    "SourceType"=@("Get-RDSEvent","Get-RDSExportTask")
    "Status"=@("Edit-RDSCustomDBEngineVersion")
    "TargetRole"=@("New-RDSDBProxyEndpoint")
}

_awsArgumentCompleterRegistration $RDS_Completers $RDS_map

$RDS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RDS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RDS_SelectMap = @{
    "Select"=@("Add-RDSRoleToDBCluster",
               "Add-RDSRoleToDBInstance",
               "Add-RDSSourceIdentifierToSubscription",
               "Add-RDSTagsToResource",
               "Submit-RDSPendingMaintenanceAction",
               "Enable-RDSDBSecurityGroupIngress",
               "Reset-RDSDBCluster",
               "Stop-RDSExportTask",
               "Copy-RDSDBClusterParameterGroup",
               "Copy-RDSDBClusterSnapshot",
               "Copy-RDSDBParameterGroup",
               "Copy-RDSDBSnapshot",
               "Copy-RDSOptionGroup",
               "New-RDSBlueGreenDeployment",
               "New-RDSCustomDBEngineVersion",
               "New-RDSDBCluster",
               "New-RDSDBClusterEndpoint",
               "New-RDSDBClusterParameterGroup",
               "New-RDSDBClusterSnapshot",
               "New-RDSDBInstance",
               "New-RDSDBInstanceReadReplica",
               "New-RDSDBParameterGroup",
               "New-RDSDBProxy",
               "New-RDSDBProxyEndpoint",
               "New-RDSDBSecurityGroup",
               "New-RDSDBShardGroup",
               "New-RDSDBSnapshot",
               "New-RDSDBSubnetGroup",
               "New-RDSEventSubscription",
               "New-RDSGlobalCluster",
               "New-RDSIntegration",
               "New-RDSOptionGroup",
               "New-RDSTenantDatabase",
               "Remove-RDSBlueGreenDeployment",
               "Remove-RDSCustomDBEngineVersion",
               "Remove-RDSDBCluster",
               "Remove-RDSDBClusterAutomatedBackup",
               "Remove-RDSDBClusterEndpoint",
               "Remove-RDSDBClusterParameterGroup",
               "Remove-RDSDBClusterSnapshot",
               "Remove-RDSDBInstance",
               "Remove-RDSDBInstanceAutomatedBackup",
               "Remove-RDSDBParameterGroup",
               "Remove-RDSDBProxy",
               "Remove-RDSDBProxyEndpoint",
               "Remove-RDSDBSecurityGroup",
               "Remove-RDSDBShardGroup",
               "Remove-RDSDBSnapshot",
               "Remove-RDSDBSubnetGroup",
               "Remove-RDSEventSubscription",
               "Remove-RDSGlobalCluster",
               "Remove-RDSIntegration",
               "Remove-RDSOptionGroup",
               "Remove-RDSTenantDatabase",
               "Unregister-RDSDBProxyTarget",
               "Get-RDSAccountAttribute",
               "Get-RDSBlueGreenDeployment",
               "Get-RDSCertificate",
               "Get-RDSDBClusterAutomatedBackup",
               "Get-RDSDBClusterBacktrackList",
               "Get-RDSDBClusterEndpoint",
               "Get-RDSDBClusterParameterGroup",
               "Get-RDSDBClusterParameter",
               "Get-RDSDBCluster",
               "Get-RDSDBClusterSnapshotAttribute",
               "Get-RDSDBClusterSnapshot",
               "Get-RDSDBEngineVersion",
               "Get-RDSDBInstanceAutomatedBackup",
               "Get-RDSDBInstance",
               "Get-RDSDBLogFile",
               "Get-RDSDBParameterGroup",
               "Get-RDSDBParameter",
               "Get-RDSDBProxy",
               "Get-RDSDBProxyEndpoint",
               "Get-RDSDBProxyTargetGroup",
               "Get-RDSDBProxyTarget",
               "Get-RDSDBRecommendation",
               "Get-RDSDBSecurityGroup",
               "Get-RDSDBShardGroup",
               "Get-RDSDBSnapshotAttribute",
               "Get-RDSDBSnapshot",
               "Get-RDSDBSnapshotTenantDatabasis",
               "Get-RDSDBSubnetGroup",
               "Get-RDSEngineDefaultClusterParameter",
               "Get-RDSEngineDefaultParameter",
               "Get-RDSEventCategory",
               "Get-RDSEvent",
               "Get-RDSEventSubscription",
               "Get-RDSExportTask",
               "Get-RDSGlobalCluster",
               "Get-RDSIntegration",
               "Get-RDSOptionGroupOption",
               "Get-RDSOptionGroup",
               "Get-RDSOrderableDBInstanceOption",
               "Get-RDSPendingMaintenanceAction",
               "Get-RDSReservedDBInstance",
               "Get-RDSReservedDBInstancesOfferingList",
               "Get-RDSSourceRegion",
               "Get-RDSTenantDatabasis",
               "Get-RDSValidDBInstanceModification",
               "Disable-RDSHttpEndpoint",
               "Get-RDSDBLogFilePortion",
               "Enable-RDSHttpEndpoint",
               "Start-RDSDBClusterFailover",
               "Start-RDSFailoverGlobalCluster",
               "Get-RDSTagForResource",
               "Edit-RDSActivityStream",
               "Edit-RDSCertificate",
               "Edit-RDSCurrentDBClusterCapacity",
               "Edit-RDSCustomDBEngineVersion",
               "Edit-RDSDBCluster",
               "Edit-RDSDBClusterEndpoint",
               "Edit-RDSDBClusterParameterGroup",
               "Edit-RDSDBClusterSnapshotAttribute",
               "Edit-RDSDBInstance",
               "Edit-RDSDBParameterGroup",
               "Edit-RDSDBProxy",
               "Edit-RDSDBProxyEndpoint",
               "Edit-RDSDBProxyTargetGroup",
               "Edit-RDSDBRecommendation",
               "Edit-RDSDBShardGroup",
               "Edit-RDSDBSnapshot",
               "Edit-RDSDBSnapshotAttribute",
               "Edit-RDSDBSubnetGroup",
               "Edit-RDSEventSubscription",
               "Edit-RDSGlobalCluster",
               "Edit-RDSIntegration",
               "Edit-RDSOptionGroup",
               "Edit-RDSTenantDatabase",
               "Convert-RDSReadReplicaToStandalone",
               "Convert-RDSReadReplicaDBCluster",
               "New-RDSReservedDBInstancesOfferingPurchase",
               "Restart-RDSDBCluster",
               "Restart-RDSDBInstance",
               "Restart-RDSDBShardGroup",
               "Register-RDSDBProxyTarget",
               "Remove-RDSFromGlobalCluster",
               "Remove-RDSRoleFromDBCluster",
               "Remove-RDSRoleFromDBInstance",
               "Remove-RDSSourceIdentifierFromSubscription",
               "Remove-RDSTagFromResource",
               "Reset-RDSDBClusterParameterGroup",
               "Reset-RDSDBParameterGroup",
               "Restore-RDSDBClusterFromS3",
               "Restore-RDSDBClusterFromSnapshot",
               "Restore-RDSDBClusterToPointInTime",
               "Restore-RDSDBInstanceFromDBSnapshot",
               "Restore-RDSDBInstanceFromS3",
               "Restore-RDSDBInstanceToPointInTime",
               "Revoke-RDSDBSecurityGroupIngress",
               "Start-RDSActivityStream",
               "Start-RDSDBCluster",
               "Start-RDSDBInstance",
               "Start-RDSDBInstanceAutomatedBackupsReplication",
               "Start-RDSExportTask",
               "Stop-RDSActivityStream",
               "Stop-RDSDBCluster",
               "Stop-RDSDBInstance",
               "Stop-RDSDBInstanceAutomatedBackupsReplication",
               "Switch-RDSBlueGreenDeployment",
               "Request-RDSSwitchoverGlobalCluster",
               "Convert-RDSReadReplicaToNewPrimary")
}

_awsArgumentCompleterRegistration $RDS_SelectCompleters $RDS_SelectMap
# Argument completions for service AWS RDS DataService


$RDSD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.RDSDataService.DecimalReturnType
        "Invoke-RDSDStatement/ResultSetOptions_DecimalReturnType"
        {
            $v = "DOUBLE_OR_LONG","STRING"
            break
        }

        # Amazon.RDSDataService.LongReturnType
        "Invoke-RDSDStatement/ResultSetOptions_LongReturnType"
        {
            $v = "LONG","STRING"
            break
        }

        # Amazon.RDSDataService.RecordsFormatType
        "Invoke-RDSDStatement/FormatRecordsAs"
        {
            $v = "JSON","NONE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RDSD_map = @{
    "FormatRecordsAs"=@("Invoke-RDSDStatement")
    "ResultSetOptions_DecimalReturnType"=@("Invoke-RDSDStatement")
    "ResultSetOptions_LongReturnType"=@("Invoke-RDSDStatement")
}

_awsArgumentCompleterRegistration $RDSD_Completers $RDSD_map

$RDSD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RDSD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RDSD_SelectMap = @{
    "Select"=@("Invoke-RDSDStatementBatch",
               "Start-RDSDTransaction",
               "Confirm-RDSDTransaction",
               "Invoke-RDSDSqlStatement",
               "Invoke-RDSDStatement",
               "Reset-RDSDTransaction")
}

_awsArgumentCompleterRegistration $RDSD_SelectCompleters $RDSD_SelectMap
# Argument completions for service Amazon Redshift


$RS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Redshift.ActionType
        "Get-RSNodeConfigurationOption/ActionType"
        {
            $v = "recommend-node-config","resize-cluster","restore-cluster"
            break
        }

        # Amazon.Redshift.AquaConfigurationStatus
        {
            ($_ -eq "Edit-RSAquaConfiguration/AquaConfigurationStatus") -Or
            ($_ -eq "New-RSCluster/AquaConfigurationStatus") -Or
            ($_ -eq "Restore-RSFromClusterSnapshot/AquaConfigurationStatus")
        }
        {
            $v = "auto","disabled","enabled"
            break
        }

        # Amazon.Redshift.DataShareStatusForConsumer
        "Get-RSDataSharesForConsumer/Status"
        {
            $v = "ACTIVE","AVAILABLE"
            break
        }

        # Amazon.Redshift.DataShareStatusForProducer
        "Get-RSDataSharesForProducer/Status"
        {
            $v = "ACTIVE","AUTHORIZED","DEAUTHORIZED","PENDING_AUTHORIZATION","REJECTED"
            break
        }

        # Amazon.Redshift.LogDestinationType
        "Enable-RSLogging/LogDestinationType"
        {
            $v = "cloudwatch","s3"
            break
        }

        # Amazon.Redshift.PartnerIntegrationStatus
        "Update-RSPartnerStatus/Status"
        {
            $v = "Active","ConnectionFailure","Inactive","RuntimeFailure"
            break
        }

        # Amazon.Redshift.ReservedNodeExchangeActionType
        "Get-RSReservedNodeExchangeConfigurationOption/ActionType"
        {
            $v = "resize-cluster","restore-cluster"
            break
        }

        # Amazon.Redshift.ScheduledActionTypeValues
        "Get-RSScheduledAction/TargetActionType"
        {
            $v = "PauseCluster","ResizeCluster","ResumeCluster"
            break
        }

        # Amazon.Redshift.SourceType
        "Get-RSEvent/SourceType"
        {
            $v = "cluster","cluster-parameter-group","cluster-security-group","cluster-snapshot","scheduled-action"
            break
        }

        # Amazon.Redshift.UsageLimitBreachAction
        {
            ($_ -eq "Edit-RSUsageLimit/BreachAction") -Or
            ($_ -eq "New-RSUsageLimit/BreachAction")
        }
        {
            $v = "disable","emit-metric","log"
            break
        }

        # Amazon.Redshift.UsageLimitFeatureType
        {
            ($_ -eq "Get-RSUsageLimit/FeatureType") -Or
            ($_ -eq "New-RSUsageLimit/FeatureType")
        }
        {
            $v = "concurrency-scaling","cross-region-datasharing","spectrum"
            break
        }

        # Amazon.Redshift.UsageLimitLimitType
        "New-RSUsageLimit/LimitType"
        {
            $v = "data-scanned","time"
            break
        }

        # Amazon.Redshift.UsageLimitPeriod
        "New-RSUsageLimit/Period"
        {
            $v = "daily","monthly","weekly"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RS_map = @{
    "ActionType"=@("Get-RSNodeConfigurationOption","Get-RSReservedNodeExchangeConfigurationOption")
    "AquaConfigurationStatus"=@("Edit-RSAquaConfiguration","New-RSCluster","Restore-RSFromClusterSnapshot")
    "BreachAction"=@("Edit-RSUsageLimit","New-RSUsageLimit")
    "FeatureType"=@("Get-RSUsageLimit","New-RSUsageLimit")
    "LimitType"=@("New-RSUsageLimit")
    "LogDestinationType"=@("Enable-RSLogging")
    "Period"=@("New-RSUsageLimit")
    "SourceType"=@("Get-RSEvent")
    "Status"=@("Get-RSDataSharesForConsumer","Get-RSDataSharesForProducer","Update-RSPartnerStatus")
    "TargetActionType"=@("Get-RSScheduledAction")
}

_awsArgumentCompleterRegistration $RS_Completers $RS_map

$RS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RS_SelectMap = @{
    "Select"=@("Switch-RSReservedNode",
               "Add-RSPartner",
               "Add-RSDataShareConsumer",
               "Approve-RSClusterSecurityGroupIngress",
               "Approve-RSDataShare",
               "Approve-RSEndpointAccess",
               "Approve-RSSnapshotAccess",
               "Remove-RSClusterSnapshotBatch",
               "Edit-RSClusterSnapshotBatch",
               "Stop-RSResize",
               "Copy-RSClusterSnapshot",
               "New-RSAuthenticationProfile",
               "New-RSCluster",
               "New-RSClusterParameterGroup",
               "New-RSClusterSecurityGroup",
               "New-RSClusterSnapshot",
               "New-RSClusterSubnetGroup",
               "New-RSCustomDomainAssociation",
               "New-RSEndpointAccess",
               "New-RSEventSubscription",
               "New-RSHsmClientCertificate",
               "New-RSHsmConfiguration",
               "New-RSIntegration",
               "New-RSRedshiftIdcApplication",
               "New-RSScheduledAction",
               "New-RSSnapshotCopyGrant",
               "New-RSSnapshotSchedule",
               "New-RSResourceTag",
               "New-RSUsageLimit",
               "Revoke-RSDataShare",
               "Remove-RSAuthenticationProfile",
               "Remove-RSCluster",
               "Remove-RSClusterParameterGroup",
               "Remove-RSClusterSecurityGroup",
               "Remove-RSClusterSnapshot",
               "Remove-RSClusterSubnetGroup",
               "Remove-RSCustomDomainAssociation",
               "Remove-RSEndpointAccess",
               "Remove-RSEventSubscription",
               "Remove-RSHsmClientCertificate",
               "Remove-RSHsmConfiguration",
               "Remove-RSIntegration",
               "Remove-RSPartner",
               "Remove-RSRedshiftIdcApplication",
               "Remove-RSResourcePolicy",
               "Remove-RSScheduledAction",
               "Remove-RSSnapshotCopyGrant",
               "Remove-RSSnapshotSchedule",
               "Remove-RSResourceTag",
               "Remove-RSUsageLimit",
               "Get-RSAccountAttribute",
               "Get-RSAuthenticationProfile",
               "Get-RSClusterDbRevision",
               "Get-RSClusterParameterGroup",
               "Get-RSClusterParameter",
               "Get-RSCluster",
               "Get-RSClusterSecurityGroup",
               "Get-RSClusterSnapshot",
               "Get-RSClusterSubnetGroup",
               "Get-RSClusterTrack",
               "Get-RSClusterVersion",
               "Get-RSCustomDomainAssociation",
               "Get-RSDataShare",
               "Get-RSDataSharesForConsumer",
               "Get-RSDataSharesForProducer",
               "Get-RSDefaultClusterParameter",
               "Get-RSEndpointAccess",
               "Get-RSEndpointAuthorization",
               "Get-RSEventCategory",
               "Get-RSEvent",
               "Get-RSEventSubscription",
               "Get-RSHsmClientCertificate",
               "Get-RSHsmConfiguration",
               "Get-RSInboundIntegration",
               "Get-RSIntegration",
               "Get-RSLoggingStatus",
               "Get-RSNodeConfigurationOption",
               "Get-RSOrderableClusterOption",
               "Get-RSPartner",
               "Get-RSRedshiftIdcApplication",
               "Get-RSReservedNodeExchangeStatus",
               "Get-RSReservedNodeOffering",
               "Get-RSReservedNode",
               "Get-RSResize",
               "Get-RSScheduledAction",
               "Get-RSSnapshotCopyGrant",
               "Get-RSSnapshotSchedule",
               "Get-RSStorage",
               "Get-RSTableRestoreStatus",
               "Get-RSResourceTag",
               "Get-RSUsageLimit",
               "Disable-RSLogging",
               "Disable-RSSnapshotCopy",
               "Remove-RSDataShareConsumer",
               "Enable-RSLogging",
               "Enable-RSSnapshotCopy",
               "Start-RSFailoverPrimaryCompute",
               "Get-RSClusterCredential",
               "Get-RSClusterCredentialsWithIAM",
               "Get-RSReservedNodeExchangeConfigurationOption",
               "Get-RSReservedNodeExchangeOffering",
               "Get-RSResourcePolicy",
               "Get-RSRecommendationList",
               "Edit-RSAquaConfiguration",
               "Edit-RSAuthenticationProfile",
               "Edit-RSCluster",
               "Edit-RSClusterDbRevision",
               "Edit-RSClusterIamRole",
               "Edit-RSClusterMaintenance",
               "Edit-RSClusterParameterGroup",
               "Edit-RSClusterSnapshot",
               "Edit-RSClusterSnapshotSchedule",
               "Edit-RSClusterSubnetGroup",
               "Edit-RSCustomDomainAssociation",
               "Edit-RSEndpointAccess",
               "Edit-RSEventSubscription",
               "Edit-RSIntegration",
               "Edit-RSRedshiftIdcApplication",
               "Edit-RSScheduledAction",
               "Edit-RSSnapshotCopyRetentionPeriod",
               "Edit-RSSnapshotSchedule",
               "Edit-RSUsageLimit",
               "Stop-RSCluster",
               "Request-RSReservedNodeOffering",
               "Write-RSResourcePolicy",
               "Restart-RSCluster",
               "Deny-RSDataShare",
               "Reset-RSClusterParameterGroup",
               "Set-RSClusterSize",
               "Restore-RSFromClusterSnapshot",
               "Restore-RSTableFromClusterSnapshot",
               "Start-RSCluster",
               "Revoke-RSClusterSecurityGroupIngress",
               "Revoke-RSEndpointAccess",
               "Revoke-RSSnapshotAccess",
               "Switch-RSEncryptionKey",
               "Update-RSPartnerStatus")
}

_awsArgumentCompleterRegistration $RS_SelectCompleters $RS_SelectMap
# Argument completions for service Redshift Data API Service


$RSD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.RedshiftDataAPIService.ResultFormatString
        {
            ($_ -eq "Push-RSDBatchStatement/ResultFormat") -Or
            ($_ -eq "Send-RSDStatement/ResultFormat")
        }
        {
            $v = "CSV","JSON"
            break
        }

        # Amazon.RedshiftDataAPIService.StatusString
        "Get-RSDStatementList/Status"
        {
            $v = "ABORTED","ALL","FAILED","FINISHED","PICKED","STARTED","SUBMITTED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RSD_map = @{
    "ResultFormat"=@("Push-RSDBatchStatement","Send-RSDStatement")
    "Status"=@("Get-RSDStatementList")
}

_awsArgumentCompleterRegistration $RSD_Completers $RSD_map

$RSD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RSD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RSD_SelectMap = @{
    "Select"=@("Push-RSDBatchStatement",
               "Stop-RSDStatement",
               "Get-RSDStatement",
               "Get-RSDTable",
               "Send-RSDStatement",
               "Get-RSDStatementResult",
               "Get-RSDStatementResultV2",
               "Get-RSDDatabasisList",
               "Get-RSDSchemaList",
               "Get-RSDStatementList",
               "Get-RSDTableList")
}

_awsArgumentCompleterRegistration $RSD_SelectCompleters $RSD_SelectMap
# Argument completions for service Redshift Serverless


$RSS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.RedshiftServerless.PerformanceTargetStatus
        {
            ($_ -eq "New-RSSWorkgroup/PricePerformanceTarget_Status") -Or
            ($_ -eq "Update-RSSWorkgroup/PricePerformanceTarget_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.RedshiftServerless.UsageLimitBreachAction
        {
            ($_ -eq "New-RSSUsageLimit/BreachAction") -Or
            ($_ -eq "Update-RSSUsageLimit/BreachAction")
        }
        {
            $v = "deactivate","emit-metric","log"
            break
        }

        # Amazon.RedshiftServerless.UsageLimitPeriod
        "New-RSSUsageLimit/Period"
        {
            $v = "daily","monthly","weekly"
            break
        }

        # Amazon.RedshiftServerless.UsageLimitUsageType
        {
            ($_ -eq "Get-RSSUsageLimitList/UsageType") -Or
            ($_ -eq "New-RSSUsageLimit/UsageType")
        }
        {
            $v = "cross-region-datasharing","serverless-compute"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RSS_map = @{
    "BreachAction"=@("New-RSSUsageLimit","Update-RSSUsageLimit")
    "Period"=@("New-RSSUsageLimit")
    "PricePerformanceTarget_Status"=@("New-RSSWorkgroup","Update-RSSWorkgroup")
    "UsageType"=@("Get-RSSUsageLimitList","New-RSSUsageLimit")
}

_awsArgumentCompleterRegistration $RSS_Completers $RSS_map

$RSS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RSS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RSS_SelectMap = @{
    "Select"=@("Convert-RSSRecoveryPointToSnapshot",
               "New-RSSCustomDomainAssociation",
               "New-RSSEndpointAccess",
               "New-RSSNamespace",
               "New-RSSScheduledAction",
               "New-RSSSnapshot",
               "New-RSSSnapshotCopyConfiguration",
               "New-RSSUsageLimit",
               "New-RSSWorkgroup",
               "Remove-RSSCustomDomainAssociation",
               "Remove-RSSEndpointAccess",
               "Remove-RSSNamespace",
               "Remove-RSSResourcePolicy",
               "Remove-RSSScheduledAction",
               "Remove-RSSSnapshot",
               "Remove-RSSSnapshotCopyConfiguration",
               "Remove-RSSUsageLimit",
               "Remove-RSSWorkgroup",
               "Get-RSSCredential",
               "Get-RSSCustomDomainAssociation",
               "Get-RSSEndpointAccess",
               "Get-RSSNamespace",
               "Get-RSSRecoveryPoint",
               "Get-RSSResourcePolicy",
               "Get-RSSScheduledAction",
               "Get-RSSSnapshot",
               "Get-RSSTableRestoreStatus",
               "Get-RSSUsageLimit",
               "Get-RSSWorkgroup",
               "Get-RSSCustomDomainAssociationList",
               "Get-RSSEndpointAccessList",
               "Get-RSSNamespaceList",
               "Get-RSSRecoveryPointList",
               "Get-RSSScheduledActionList",
               "Get-RSSSnapshotCopyConfigurationList",
               "Get-RSSSnapshotList",
               "Get-RSSTableRestoreStatusList",
               "Get-RSSResourceTag",
               "Get-RSSUsageLimitList",
               "Get-RSSWorkgroupList",
               "Write-RSSResourcePolicy",
               "Restore-RSSFromRecoveryPoint",
               "Restore-RSSFromSnapshot",
               "Restore-RSSTableFromRecoveryPoint",
               "Restore-RSSTableFromSnapshot",
               "Add-RSSResourceTag",
               "Remove-RSSResourceTag",
               "Update-RSSCustomDomainAssociation",
               "Update-RSSEndpointAccess",
               "Update-RSSNamespace",
               "Update-RSSScheduledAction",
               "Update-RSSSnapshot",
               "Update-RSSSnapshotCopyConfiguration",
               "Update-RSSUsageLimit",
               "Update-RSSWorkgroup")
}

_awsArgumentCompleterRegistration $RSS_SelectCompleters $RSS_SelectMap
# Argument completions for service Amazon Rekognition


$REK_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Rekognition.CelebrityRecognitionSortBy
        "Get-REKCelebrityRecognition/SortBy"
        {
            $v = "ID","TIMESTAMP"
            break
        }

        # Amazon.Rekognition.ContentModerationAggregateBy
        "Get-REKContentModeration/AggregateBy"
        {
            $v = "SEGMENTS","TIMESTAMPS"
            break
        }

        # Amazon.Rekognition.ContentModerationSortBy
        "Get-REKContentModeration/SortBy"
        {
            $v = "NAME","TIMESTAMP"
            break
        }

        # Amazon.Rekognition.CustomizationFeature
        "New-REKProject/Feature"
        {
            $v = "CONTENT_MODERATION","CUSTOM_LABELS"
            break
        }

        # Amazon.Rekognition.DatasetType
        "New-REKDataset/DatasetType"
        {
            $v = "TEST","TRAIN"
            break
        }

        # Amazon.Rekognition.FaceAttributes
        "Start-REKFaceDetection/FaceAttribute"
        {
            $v = "ALL","DEFAULT"
            break
        }

        # Amazon.Rekognition.FaceSearchSortBy
        "Get-REKFaceSearch/SortBy"
        {
            $v = "INDEX","TIMESTAMP"
            break
        }

        # Amazon.Rekognition.LabelDetectionAggregateBy
        "Get-REKLabelDetection/AggregateBy"
        {
            $v = "SEGMENTS","TIMESTAMPS"
            break
        }

        # Amazon.Rekognition.LabelDetectionSortBy
        "Get-REKLabelDetection/SortBy"
        {
            $v = "NAME","TIMESTAMP"
            break
        }

        # Amazon.Rekognition.PersonTrackingSortBy
        "Get-REKPersonTracking/SortBy"
        {
            $v = "INDEX","TIMESTAMP"
            break
        }

        # Amazon.Rekognition.ProjectAutoUpdate
        "New-REKProject/AutoUpdate"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Rekognition.QualityFilter
        {
            ($_ -eq "Add-REKDetectedFacesToCollection/QualityFilter") -Or
            ($_ -eq "Compare-REKFace/QualityFilter") -Or
            ($_ -eq "Search-REKFacesByImage/QualityFilter") -Or
            ($_ -eq "Search-REKUsersByImage/QualityFilter")
        }
        {
            $v = "AUTO","HIGH","LOW","MEDIUM","NONE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$REK_map = @{
    "AggregateBy"=@("Get-REKContentModeration","Get-REKLabelDetection")
    "AutoUpdate"=@("New-REKProject")
    "DatasetType"=@("New-REKDataset")
    "FaceAttribute"=@("Start-REKFaceDetection")
    "Feature"=@("New-REKProject")
    "QualityFilter"=@("Add-REKDetectedFacesToCollection","Compare-REKFace","Search-REKFacesByImage","Search-REKUsersByImage")
    "SortBy"=@("Get-REKCelebrityRecognition","Get-REKContentModeration","Get-REKFaceSearch","Get-REKLabelDetection","Get-REKPersonTracking")
}

_awsArgumentCompleterRegistration $REK_Completers $REK_map

$REK_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.REK.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$REK_SelectMap = @{
    "Select"=@("Add-REKREKFacesToUser",
               "Compare-REKFace",
               "Copy-REKProjectVersion",
               "New-REKCollection",
               "New-REKDataset",
               "New-REKFaceLivenessSession",
               "New-REKProject",
               "New-REKProjectVersion",
               "New-REKStreamProcessor",
               "New-REKUser",
               "Remove-REKCollection",
               "Remove-REKDataset",
               "Remove-REKFace",
               "Remove-REKProject",
               "Remove-REKProjectPolicy",
               "Remove-REKProjectVersion",
               "Remove-REKStreamProcessor",
               "Remove-REKUser",
               "Get-REKCollection",
               "Get-REKDataset",
               "Get-REKProject",
               "Get-REKProjectVersion",
               "Get-REKStreamProcessor",
               "Find-REKCustomLabel",
               "Find-REKFace",
               "Find-REKLabel",
               "Find-REKModerationLabel",
               "Find-REKProtectiveEquipment",
               "Find-REKText",
               "Remove-REKREKFacesFromUser",
               "Invoke-REKDistributeDatasetEntry",
               "Get-REKCelebrityInfo",
               "Get-REKCelebrityRecognition",
               "Get-REKContentModeration",
               "Get-REKFaceDetection",
               "Get-REKFaceLivenessSessionResult",
               "Get-REKFaceSearch",
               "Get-REKLabelDetection",
               "Get-REKMediaAnalysisJob",
               "Get-REKPersonTracking",
               "Get-REKSegmentDetection",
               "Get-REKTextDetection",
               "Add-REKDetectedFacesToCollection",
               "Get-REKCollectionIdList",
               "Get-REKDatasetEntryList",
               "Get-REKDatasetLabelList",
               "Get-REKFaceList",
               "Get-REKMediaAnalysisJobList",
               "Get-REKProjectPolicyList",
               "Get-REKStreamProcessorList",
               "Get-REKResourceTag",
               "Get-REKUserList",
               "Write-REKProjectPolicy",
               "Find-REKCelebrity",
               "Search-REKFace",
               "Search-REKFacesByImage",
               "Search-REKUser",
               "Search-REKUsersByImage",
               "Start-REKCelebrityRecognition",
               "Start-REKContentModeration",
               "Start-REKFaceDetection",
               "Start-REKFaceSearch",
               "Start-REKLabelDetection",
               "Start-REKMediaAnalysisJob",
               "Start-REKPersonTracking",
               "Start-REKProjectVersion",
               "Start-REKSegmentDetection",
               "Start-REKStreamProcessor",
               "Start-REKTextDetection",
               "Stop-REKProjectVersion",
               "Stop-REKStreamProcessor",
               "Add-REKResourceTag",
               "Remove-REKResourceTag",
               "Update-REKDatasetEntry",
               "Update-REKStreamProcessor")
}

_awsArgumentCompleterRegistration $REK_SelectCompleters $REK_SelectMap
# Argument completions for service AWS re:Post Private


$RESP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Repostspace.Role
        {
            ($_ -eq "Add-RESPBatchRole/Role") -Or
            ($_ -eq "Remove-RESPBatchRole/Role")
        }
        {
            $v = "ADMINISTRATOR","EXPERT","MODERATOR","SUPPORTREQUESTOR"
            break
        }

        # Amazon.Repostspace.TierLevel
        {
            ($_ -eq "New-RESPSpace/Tier") -Or
            ($_ -eq "Update-RESPSpace/Tier")
        }
        {
            $v = "BASIC","STANDARD"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RESP_map = @{
    "Role"=@("Add-RESPBatchRole","Remove-RESPBatchRole")
    "Tier"=@("New-RESPSpace","Update-RESPSpace")
}

_awsArgumentCompleterRegistration $RESP_Completers $RESP_map

$RESP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RESP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RESP_SelectMap = @{
    "Select"=@("Add-RESPBatchRole",
               "Remove-RESPBatchRole",
               "New-RESPSpace",
               "Remove-RESPSpace",
               "Unregister-RESPAdmin",
               "Get-RESPSpace",
               "Get-RESPSpaceList",
               "Get-RESPResourceTag",
               "Register-RESPAdmin",
               "Send-RESPInvite",
               "Add-RESPResourceTag",
               "Remove-RESPResourceTag",
               "Update-RESPSpace")
}

_awsArgumentCompleterRegistration $RESP_SelectCompleters $RESP_SelectMap
# Argument completions for service AWS Resilience Hub


$RESH_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ResilienceHub.AppAssessmentScheduleType
        {
            ($_ -eq "New-RESHApp/AssessmentSchedule") -Or
            ($_ -eq "Update-RESHApp/AssessmentSchedule")
        }
        {
            $v = "Daily","Disabled"
            break
        }

        # Amazon.ResilienceHub.AssessmentInvoker
        "Get-RESHAppAssessmentList/Invoker"
        {
            $v = "System","User"
            break
        }

        # Amazon.ResilienceHub.ComplianceStatus
        "Get-RESHAppAssessmentList/ComplianceStatus"
        {
            $v = "MissingPolicy","NotApplicable","PolicyBreached","PolicyMet"
            break
        }

        # Amazon.ResilienceHub.DataLocationConstraint
        {
            ($_ -eq "New-RESHResiliencyPolicy/DataLocationConstraint") -Or
            ($_ -eq "Update-RESHResiliencyPolicy/DataLocationConstraint")
        }
        {
            $v = "AnyLocation","SameContinent","SameCountry"
            break
        }

        # Amazon.ResilienceHub.PermissionModelType
        {
            ($_ -eq "New-RESHApp/PermissionModel_Type") -Or
            ($_ -eq "Update-RESHApp/PermissionModel_Type")
        }
        {
            $v = "LegacyIAMUser","RoleBased"
            break
        }

        # Amazon.ResilienceHub.ResiliencyPolicyTier
        {
            ($_ -eq "New-RESHResiliencyPolicy/Tier") -Or
            ($_ -eq "Update-RESHResiliencyPolicy/Tier")
        }
        {
            $v = "CoreServices","Critical","Important","MissionCritical","NonCritical","NotApplicable"
            break
        }

        # Amazon.ResilienceHub.ResourceImportStrategyType
        "Import-RESHResourcesToDraftAppVersion/ImportStrategy"
        {
            $v = "AddOnly","ReplaceAll"
            break
        }

        # Amazon.ResilienceHub.TemplateFormat
        "New-RESHRecommendationTemplate/Format"
        {
            $v = "CfnJson","CfnYaml"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RESH_map = @{
    "AssessmentSchedule"=@("New-RESHApp","Update-RESHApp")
    "ComplianceStatus"=@("Get-RESHAppAssessmentList")
    "DataLocationConstraint"=@("New-RESHResiliencyPolicy","Update-RESHResiliencyPolicy")
    "Format"=@("New-RESHRecommendationTemplate")
    "ImportStrategy"=@("Import-RESHResourcesToDraftAppVersion")
    "Invoker"=@("Get-RESHAppAssessmentList")
    "PermissionModel_Type"=@("New-RESHApp","Update-RESHApp")
    "Tier"=@("New-RESHResiliencyPolicy","Update-RESHResiliencyPolicy")
}

_awsArgumentCompleterRegistration $RESH_Completers $RESH_map

$RESH_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RESH.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RESH_SelectMap = @{
    "Select"=@("Approve-RESHResourceGroupingRecommendation",
               "Add-RESHDraftAppVersionResourceMapping",
               "Set-RESHUpdateRecommendationStatus",
               "New-RESHApp",
               "New-RESHAppVersionAppComponent",
               "New-RESHAppVersionResource",
               "New-RESHRecommendationTemplate",
               "New-RESHResiliencyPolicy",
               "Remove-RESHApp",
               "Remove-RESHAppAssessment",
               "Remove-RESHAppInputSource",
               "Remove-RESHAppVersionAppComponent",
               "Remove-RESHAppVersionResource",
               "Remove-RESHRecommendationTemplate",
               "Remove-RESHResiliencyPolicy",
               "Get-RESHApp",
               "Get-RESHAppAssessment",
               "Get-RESHAppVersion",
               "Get-RESHAppVersionAppComponent",
               "Get-RESHAppVersionResource",
               "Get-RESHAppVersionResourcesResolutionStatus",
               "Get-RESHAppVersionTemplate",
               "Get-RESHDraftAppVersionResourcesImportStatus",
               "Get-RESHResiliencyPolicy",
               "Get-RESHResourceGroupingRecommendationTask",
               "Import-RESHResourcesToDraftAppVersion",
               "Get-RESHAlarmRecommendationList",
               "Get-RESHAppAssessmentComplianceDriftList",
               "Get-RESHAppAssessmentResourceDriftList",
               "Get-RESHAppAssessmentList",
               "Get-RESHAppComponentComplianceList",
               "Get-RESHAppComponentRecommendationList",
               "Get-RESHAppInputSourceList",
               "Get-RESHAppList",
               "Get-RESHAppVersionAppComponentList",
               "Get-RESHAppVersionResourceMappingList",
               "Get-RESHAppVersionResourceList",
               "Get-RESHAppVersionList",
               "Get-RESHRecommendationTemplateList",
               "Get-RESHResiliencyPolicyList",
               "Get-RESHResourceGroupingRecommendationList",
               "Get-RESHSopRecommendationList",
               "Get-RESHSuggestedResiliencyPolicyList",
               "Get-RESHResourceTag",
               "Get-RESHTestRecommendationList",
               "Get-RESHUnsupportedAppVersionResourceList",
               "Publish-RESHAppVersion",
               "Write-RESHDraftAppVersionTemplate",
               "Deny-RESHResourceGroupingRecommendation",
               "Remove-RESHDraftAppVersionResourceMapping",
               "Resolve-RESHAppVersionResource",
               "Start-RESHAppAssessment",
               "Start-RESHResourceGroupingRecommendationTask",
               "Add-RESHResourceTag",
               "Remove-RESHResourceTag",
               "Update-RESHApp",
               "Update-RESHAppVersion",
               "Update-RESHAppVersionAppComponent",
               "Update-RESHAppVersionResource",
               "Update-RESHResiliencyPolicy")
}

_awsArgumentCompleterRegistration $RESH_SelectCompleters $RESH_SelectMap
# Argument completions for service AWS Resource Explorer


$AREX_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ResourceExplorer2.IndexType
        {
            ($_ -eq "Get-AREXIndexList/Type") -Or
            ($_ -eq "Update-AREXIndexType/Type")
        }
        {
            $v = "AGGREGATOR","LOCAL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AREX_map = @{
    "Type"=@("Get-AREXIndexList","Update-AREXIndexType")
}

_awsArgumentCompleterRegistration $AREX_Completers $AREX_map

$AREX_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AREX.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AREX_SelectMap = @{
    "Select"=@("Register-AREXDefaultView",
               "Get-AREXViewBatch",
               "New-AREXIndex",
               "New-AREXView",
               "Remove-AREXIndex",
               "Remove-AREXView",
               "Unregister-AREXDefaultView",
               "Get-AREXAccountLevelServiceConfiguration",
               "Get-AREXDefaultView",
               "Get-AREXIndex",
               "Get-AREXView",
               "Get-AREXIndexList",
               "Get-AREXIndexesForMemberList",
               "Get-AREXResourceList",
               "Get-AREXSupportedResourceTypeList",
               "Get-AREXResourceTag",
               "Get-AREXViewArnList",
               "Search-AREXResource",
               "Add-AREXResourceTag",
               "Remove-AREXResourceTag",
               "Update-AREXIndexType",
               "Update-AREXView")
}

_awsArgumentCompleterRegistration $AREX_SelectCompleters $AREX_SelectMap
# Argument completions for service AWS Resource Groups


$RG_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ResourceGroups.GroupLifecycleEventsDesiredStatus
        "Update-RGAccountSetting/GroupLifecycleEventsDesiredStatus"
        {
            $v = "ACTIVE","INACTIVE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RG_map = @{
    "GroupLifecycleEventsDesiredStatus"=@("Update-RGAccountSetting")
}

_awsArgumentCompleterRegistration $RG_Completers $RG_map

$RG_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RG.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RG_SelectMap = @{
    "Select"=@("Stop-RGTagSyncTask",
               "New-RGGroup",
               "Remove-RGGroup",
               "Get-RGAccountSetting",
               "Get-RGGroup",
               "Get-RGGroupConfiguration",
               "Get-RGGroupQuery",
               "Get-RGResourceTag",
               "Get-RGTagSyncTask",
               "Add-RGResource",
               "Get-RGGroupingStatusList",
               "Get-RGGroupResourceList",
               "Get-RGGroupList",
               "Get-RGTagSyncTaskList",
               "Write-RGGroupConfiguration",
               "Find-RGResource",
               "Start-RGTagSyncTask",
               "Add-RGResourceTag",
               "Remove-RGResource",
               "Remove-RGResourceTag",
               "Update-RGAccountSetting",
               "Update-RGGroup",
               "Update-RGGroupQuery")
}

_awsArgumentCompleterRegistration $RG_SelectCompleters $RG_SelectMap
# Argument completions for service AWS Resource Groups Tagging API


$RGT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RGT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RGT_SelectMap = @{
    "Select"=@("Get-RGTReportCreation",
               "Get-RGTComplianceSummary",
               "Get-RGTResource",
               "Get-RGTTagKey",
               "Get-RGTTagValue",
               "Start-RGTReportCreation",
               "Add-RGTResourceTag",
               "Remove-RGTResourceTag")
}

_awsArgumentCompleterRegistration $RGT_SelectCompleters $RGT_SelectMap
# Argument completions for service AWS RoboMaker


$ROBO_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.RoboMaker.Architecture
        "New-ROBORobot/Architecture"
        {
            $v = "ARM64","ARMHF","X86_64"
            break
        }

        # Amazon.RoboMaker.ComputeType
        "New-ROBOSimulationJob/Compute_ComputeType"
        {
            $v = "CPU","GPU_AND_CPU"
            break
        }

        # Amazon.RoboMaker.FailureBehavior
        "New-ROBOSimulationJob/FailureBehavior"
        {
            $v = "Continue","Fail"
            break
        }

        # Amazon.RoboMaker.RenderingEngineType
        {
            ($_ -eq "New-ROBOSimulationApplication/RenderingEngine_Name") -Or
            ($_ -eq "Update-ROBOSimulationApplication/RenderingEngine_Name")
        }
        {
            $v = "OGRE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ROBO_map = @{
    "Architecture"=@("New-ROBORobot")
    "Compute_ComputeType"=@("New-ROBOSimulationJob")
    "FailureBehavior"=@("New-ROBOSimulationJob")
    "RenderingEngine_Name"=@("New-ROBOSimulationApplication","Update-ROBOSimulationApplication")
}

_awsArgumentCompleterRegistration $ROBO_Completers $ROBO_map

$ROBO_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ROBO.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ROBO_SelectMap = @{
    "Select"=@("Remove-ROBODeleteWorld",
               "Get-ROBOSimulationJobList",
               "Stop-ROBODeploymentJob",
               "Stop-ROBOSimulationJob",
               "Stop-ROBOSimulationJobBatch",
               "Stop-ROBOWorldExportJob",
               "Stop-ROBOWorldGenerationJob",
               "New-ROBODeploymentJob",
               "New-ROBOFleet",
               "New-ROBORobot",
               "New-ROBORobotApplication",
               "New-ROBORobotApplicationVersion",
               "New-ROBOSimulationApplication",
               "New-ROBOSimulationApplicationVersion",
               "New-ROBOSimulationJob",
               "New-ROBOWorldExportJob",
               "New-ROBOWorldGenerationJob",
               "New-ROBOWorldTemplate",
               "Remove-ROBOFleet",
               "Remove-ROBORobot",
               "Remove-ROBORobotApplication",
               "Remove-ROBOSimulationApplication",
               "Remove-ROBOWorldTemplate",
               "Unregister-ROBORobot",
               "Get-ROBODeploymentJob",
               "Get-ROBOFleet",
               "Get-ROBORobot",
               "Get-ROBORobotApplication",
               "Get-ROBOSimulationApplication",
               "Get-ROBOSimulationJob",
               "Get-ROBOSimulationJobBatch",
               "Get-ROBOWorld",
               "Get-ROBOWorldExportJob",
               "Get-ROBOWorldGenerationJob",
               "Get-ROBOWorldTemplate",
               "Get-ROBOWorldTemplateBody",
               "Get-ROBODeploymentJobList",
               "Get-ROBOFleetList",
               "Get-ROBORobotApplicationList",
               "Get-ROBORobotList",
               "Get-ROBOSimulationApplicationList",
               "Get-ROBOSimulationJobBatchList",
               "Get-ROBOSimulationJobSummary",
               "Get-ROBOResourceTag",
               "Get-ROBOWorldExportJobList",
               "Get-ROBOWorldGenerationJobList",
               "Get-ROBOWorldList",
               "Get-ROBOWorldTemplateList",
               "Register-ROBORobot",
               "Restart-ROBOSimulationJob",
               "Start-ROBOSimulationJobBatch",
               "Sync-ROBODeploymentJob",
               "Add-ROBOResourceTag",
               "Remove-ROBOResourceTag",
               "Update-ROBORobotApplication",
               "Update-ROBOSimulationApplication",
               "Update-ROBOWorldTemplate")
}

_awsArgumentCompleterRegistration $ROBO_SelectCompleters $ROBO_SelectMap
# Argument completions for service IAM Roles Anywhere


$IAMRA_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.IAMRolesAnywhere.CertificateField
        {
            ($_ -eq "Remove-IAMRAAttributeMapping/CertificateField") -Or
            ($_ -eq "Write-IAMRAAttributeMapping/CertificateField")
        }
        {
            $v = "x509Issuer","x509SAN","x509Subject"
            break
        }

        # Amazon.IAMRolesAnywhere.TrustAnchorType
        {
            ($_ -eq "New-IAMRATrustAnchor/Source_SourceType") -Or
            ($_ -eq "Update-IAMRATrustAnchor/Source_SourceType")
        }
        {
            $v = "AWS_ACM_PCA","CERTIFICATE_BUNDLE","SELF_SIGNED_REPOSITORY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IAMRA_map = @{
    "CertificateField"=@("Remove-IAMRAAttributeMapping","Write-IAMRAAttributeMapping")
    "Source_SourceType"=@("New-IAMRATrustAnchor","Update-IAMRATrustAnchor")
}

_awsArgumentCompleterRegistration $IAMRA_Completers $IAMRA_map

$IAMRA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.IAMRA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$IAMRA_SelectMap = @{
    "Select"=@("New-IAMRAProfile",
               "New-IAMRATrustAnchor",
               "Remove-IAMRAAttributeMapping",
               "Remove-IAMRACrl",
               "Remove-IAMRAProfile",
               "Remove-IAMRATrustAnchor",
               "Disable-IAMRACrl",
               "Disable-IAMRAProfile",
               "Disable-IAMRATrustAnchor",
               "Enable-IAMRACrl",
               "Enable-IAMRAProfile",
               "Enable-IAMRATrustAnchor",
               "Get-IAMRACrl",
               "Get-IAMRAProfile",
               "Get-IAMRASubject",
               "Get-IAMRATrustAnchor",
               "Import-IAMRACrl",
               "Get-IAMRACrlList",
               "Get-IAMRAProfileList",
               "Get-IAMRASubjectList",
               "Get-IAMRAResourceTag",
               "Get-IAMRATrustAnchorList",
               "Write-IAMRAAttributeMapping",
               "Write-IAMRANotificationSetting",
               "Reset-IAMRANotificationSetting",
               "Add-IAMRAResourceTag",
               "Remove-IAMRAResourceTag",
               "Update-IAMRACrl",
               "Update-IAMRAProfile",
               "Update-IAMRATrustAnchor")
}

_awsArgumentCompleterRegistration $IAMRA_SelectCompleters $IAMRA_SelectMap
# Argument completions for service Amazon Route 53


$R53_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Route53.AccountLimitType
        "Get-R53AccountLimit/Type"
        {
            $v = "MAX_HEALTH_CHECKS_BY_OWNER","MAX_HOSTED_ZONES_BY_OWNER","MAX_REUSABLE_DELEGATION_SETS_BY_OWNER","MAX_TRAFFIC_POLICIES_BY_OWNER","MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER"
            break
        }

        # Amazon.Route53.CloudWatchRegion
        {
            ($_ -eq "New-R53HealthCheck/AlarmIdentifier_Region") -Or
            ($_ -eq "Update-R53HealthCheck/AlarmIdentifier_Region")
        }
        {
            $v = "af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-south-2","ap-southeast-1","ap-southeast-2","ap-southeast-3","ap-southeast-4","ap-southeast-5","ca-central-1","ca-west-1","cn-north-1","cn-northwest-1","eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3","il-central-1","me-central-1","me-south-1","sa-east-1","us-east-1","us-east-2","us-gov-east-1","us-gov-west-1","us-iso-east-1","us-iso-west-1","us-isob-east-1","us-west-1","us-west-2"
            break
        }

        # Amazon.Route53.HealthCheckType
        "New-R53HealthCheck/HealthCheckConfig_Type"
        {
            $v = "CALCULATED","CLOUDWATCH_METRIC","HTTP","HTTPS","HTTPS_STR_MATCH","HTTP_STR_MATCH","RECOVERY_CONTROL","TCP"
            break
        }

        # Amazon.Route53.HostedZoneLimitType
        "Get-R53HostedZoneLimit/Type"
        {
            $v = "MAX_RRSETS_BY_ZONE","MAX_VPCS_ASSOCIATED_BY_ZONE"
            break
        }

        # Amazon.Route53.HostedZoneType
        "Get-R53HostedZoneList/HostedZoneType"
        {
            $v = "PrivateHostedZone"
            break
        }

        # Amazon.Route53.InsufficientDataHealthStatus
        {
            ($_ -eq "New-R53HealthCheck/HealthCheckConfig_InsufficientDataHealthStatus") -Or
            ($_ -eq "Update-R53HealthCheck/InsufficientDataHealthStatus")
        }
        {
            $v = "Healthy","LastKnownStatus","Unhealthy"
            break
        }

        # Amazon.Route53.ReusableDelegationSetLimitType
        "Get-R53ReusableDelegationSetLimit/Type"
        {
            $v = "MAX_ZONES_BY_REUSABLE_DELEGATION_SET"
            break
        }

        # Amazon.Route53.RRType
        {
            ($_ -eq "Test-R53DNSAnswer/RecordType") -Or
            ($_ -eq "Get-R53ResourceRecordSet/StartRecordType") -Or
            ($_ -eq "Get-R53TrafficPolicyInstanceList/TrafficPolicyInstanceTypeMarker") -Or
            ($_ -eq "Get-R53TrafficPolicyInstancesByHostedZone/TrafficPolicyInstanceTypeMarker") -Or
            ($_ -eq "Get-R53TrafficPolicyInstancesByPolicy/TrafficPolicyInstanceTypeMarker")
        }
        {
            $v = "A","AAAA","CAA","CNAME","DS","HTTPS","MX","NAPTR","NS","PTR","SOA","SPF","SRV","SSHFP","SVCB","TLSA","TXT"
            break
        }

        # Amazon.Route53.TagResourceType
        {
            ($_ -eq "Edit-R53TagsForResource/ResourceType") -Or
            ($_ -eq "Get-R53TagsForResource/ResourceType") -Or
            ($_ -eq "Get-R53TagsForResourceList/ResourceType")
        }
        {
            $v = "healthcheck","hostedzone"
            break
        }

        # Amazon.Route53.VPCRegion
        {
            ($_ -eq "New-R53HostedZone/VPC_VPCRegion") -Or
            ($_ -eq "New-R53VPCAssociationAuthorization/VPC_VPCRegion") -Or
            ($_ -eq "Register-R53VPCWithHostedZone/VPC_VPCRegion") -Or
            ($_ -eq "Remove-R53VPCAssociationAuthorization/VPC_VPCRegion") -Or
            ($_ -eq "Unregister-R53VPCFromHostedZone/VPC_VPCRegion") -Or
            ($_ -eq "Get-R53HostedZonesByVPC/VPCRegion")
        }
        {
            $v = "af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-south-2","ap-southeast-1","ap-southeast-2","ap-southeast-3","ap-southeast-4","ap-southeast-5","ca-central-1","ca-west-1","cn-north-1","cn-northwest-1","eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3","il-central-1","me-central-1","me-south-1","sa-east-1","us-east-1","us-east-2","us-gov-east-1","us-gov-west-1","us-iso-east-1","us-iso-west-1","us-isob-east-1","us-west-1","us-west-2"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$R53_map = @{
    "AlarmIdentifier_Region"=@("New-R53HealthCheck","Update-R53HealthCheck")
    "HealthCheckConfig_InsufficientDataHealthStatus"=@("New-R53HealthCheck")
    "HealthCheckConfig_Type"=@("New-R53HealthCheck")
    "HostedZoneType"=@("Get-R53HostedZoneList")
    "InsufficientDataHealthStatus"=@("Update-R53HealthCheck")
    "RecordType"=@("Test-R53DNSAnswer")
    "ResourceType"=@("Edit-R53TagsForResource","Get-R53TagsForResource","Get-R53TagsForResourceList")
    "StartRecordType"=@("Get-R53ResourceRecordSet")
    "TrafficPolicyInstanceTypeMarker"=@("Get-R53TrafficPolicyInstanceList","Get-R53TrafficPolicyInstancesByHostedZone","Get-R53TrafficPolicyInstancesByPolicy")
    "Type"=@("Get-R53AccountLimit","Get-R53HostedZoneLimit","Get-R53ReusableDelegationSetLimit")
    "VPC_VPCRegion"=@("New-R53HostedZone","New-R53VPCAssociationAuthorization","Register-R53VPCWithHostedZone","Remove-R53VPCAssociationAuthorization","Unregister-R53VPCFromHostedZone")
    "VPCRegion"=@("Get-R53HostedZonesByVPC")
}

_awsArgumentCompleterRegistration $R53_Completers $R53_map

$R53_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.R53.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$R53_SelectMap = @{
    "Select"=@("Enable-R53KeySigningKey",
               "Register-R53VPCWithHostedZone",
               "Edit-R53CidrCollection",
               "Edit-R53ResourceRecordSet",
               "Edit-R53TagsForResource",
               "New-R53CidrCollection",
               "New-R53HealthCheck",
               "New-R53HostedZone",
               "New-R53KeySigningKey",
               "New-R53QueryLoggingConfig",
               "New-R53ReusableDelegationSet",
               "New-R53TrafficPolicy",
               "New-R53TrafficPolicyInstance",
               "New-R53TrafficPolicyVersion",
               "New-R53VPCAssociationAuthorization",
               "Disable-R53KeySigningKey",
               "Remove-R53CidrCollection",
               "Remove-R53HealthCheck",
               "Remove-R53HostedZone",
               "Remove-R53KeySigningKey",
               "Remove-R53QueryLoggingConfig",
               "Remove-R53ReusableDelegationSet",
               "Remove-R53TrafficPolicy",
               "Remove-R53TrafficPolicyInstance",
               "Remove-R53VPCAssociationAuthorization",
               "Disable-R53HostedZoneDNSSEC",
               "Unregister-R53VPCFromHostedZone",
               "Enable-R53HostedZoneDNSSEC",
               "Get-R53AccountLimit",
               "Get-R53Change",
               "Get-R53CheckerIpRange",
               "Get-R53DNSSEC",
               "Get-R53GeoLocation",
               "Get-R53HealthCheck",
               "Get-R53HealthCheckCount",
               "Get-R53HealthCheckLastFailureReason",
               "Get-R53HealthCheckStatus",
               "Get-R53HostedZone",
               "Get-R53HostedZoneCount",
               "Get-R53HostedZoneLimit",
               "Get-R53QueryLoggingConfig",
               "Get-R53ReusableDelegationSet",
               "Get-R53ReusableDelegationSetLimit",
               "Get-R53TrafficPolicy",
               "Get-R53TrafficPolicyInstance",
               "Get-R53TrafficPolicyInstanceCount",
               "Get-R53CidrBlockList",
               "Get-R53CidrCollectionList",
               "Get-R53CidrLocationList",
               "Get-R53GeoLocationList",
               "Get-R53HealthCheckList",
               "Get-R53HostedZoneList",
               "Get-R53HostedZonesByVPC",
               "Get-R53QueryLoggingConfigList",
               "Get-R53ResourceRecordSet",
               "Get-R53ReusableDelegationSetList",
               "Get-R53TagsForResource",
               "Get-R53TagsForResourceList",
               "Get-R53TrafficPolicyList",
               "Get-R53TrafficPolicyInstanceList",
               "Get-R53TrafficPolicyInstancesByHostedZone",
               "Get-R53TrafficPolicyInstancesByPolicy",
               "Get-R53TrafficPolicyVersionList",
               "Get-R53VPCAssociationAuthorizationList",
               "Test-R53DNSAnswer",
               "Update-R53HealthCheck",
               "Update-R53HostedZoneComment",
               "Update-R53TrafficPolicyComment",
               "Update-R53TrafficPolicyInstance",
               "Get-R53HostedZonesByName")
}

_awsArgumentCompleterRegistration $R53_SelectCompleters $R53_SelectMap
# Argument completions for service Amazon Route 53 Domains


$R53D_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Route53Domains.ContactType
        {
            ($_ -eq "Invoke-R53DDomainTransfer/AdminContact_ContactType") -Or
            ($_ -eq "Register-R53DDomain/AdminContact_ContactType") -Or
            ($_ -eq "Update-R53DDomainContact/AdminContact_ContactType") -Or
            ($_ -eq "Invoke-R53DDomainTransfer/BillingContact_ContactType") -Or
            ($_ -eq "Register-R53DDomain/BillingContact_ContactType") -Or
            ($_ -eq "Update-R53DDomainContact/BillingContact_ContactType") -Or
            ($_ -eq "Invoke-R53DDomainTransfer/RegistrantContact_ContactType") -Or
            ($_ -eq "Register-R53DDomain/RegistrantContact_ContactType") -Or
            ($_ -eq "Update-R53DDomainContact/RegistrantContact_ContactType") -Or
            ($_ -eq "Invoke-R53DDomainTransfer/TechContact_ContactType") -Or
            ($_ -eq "Register-R53DDomain/TechContact_ContactType") -Or
            ($_ -eq "Update-R53DDomainContact/TechContact_ContactType")
        }
        {
            $v = "ASSOCIATION","COMPANY","PERSON","PUBLIC_BODY","RESELLER"
            break
        }

        # Amazon.Route53Domains.CountryCode
        {
            ($_ -eq "Invoke-R53DDomainTransfer/AdminContact_CountryCode") -Or
            ($_ -eq "Register-R53DDomain/AdminContact_CountryCode") -Or
            ($_ -eq "Update-R53DDomainContact/AdminContact_CountryCode") -Or
            ($_ -eq "Invoke-R53DDomainTransfer/BillingContact_CountryCode") -Or
            ($_ -eq "Register-R53DDomain/BillingContact_CountryCode") -Or
            ($_ -eq "Update-R53DDomainContact/BillingContact_CountryCode") -Or
            ($_ -eq "Invoke-R53DDomainTransfer/RegistrantContact_CountryCode") -Or
            ($_ -eq "Register-R53DDomain/RegistrantContact_CountryCode") -Or
            ($_ -eq "Update-R53DDomainContact/RegistrantContact_CountryCode") -Or
            ($_ -eq "Invoke-R53DDomainTransfer/TechContact_CountryCode") -Or
            ($_ -eq "Register-R53DDomain/TechContact_CountryCode") -Or
            ($_ -eq "Update-R53DDomainContact/TechContact_CountryCode")
        }
        {
            $v = "AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"
            break
        }

        # Amazon.Route53Domains.ListDomainsAttributeName
        "Get-R53DDomainList/SortCondition_Name"
        {
            $v = "DomainName","Expiry"
            break
        }

        # Amazon.Route53Domains.ListOperationsSortAttributeName
        "Get-R53DOperationList/SortBy"
        {
            $v = "SubmittedDate"
            break
        }

        # Amazon.Route53Domains.SortOrder
        {
            ($_ -eq "Get-R53DDomainList/SortCondition_SortOrder") -Or
            ($_ -eq "Get-R53DOperationList/SortOrder")
        }
        {
            $v = "ASC","DESC"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$R53D_map = @{
    "AdminContact_ContactType"=@("Invoke-R53DDomainTransfer","Register-R53DDomain","Update-R53DDomainContact")
    "AdminContact_CountryCode"=@("Invoke-R53DDomainTransfer","Register-R53DDomain","Update-R53DDomainContact")
    "BillingContact_ContactType"=@("Invoke-R53DDomainTransfer","Register-R53DDomain","Update-R53DDomainContact")
    "BillingContact_CountryCode"=@("Invoke-R53DDomainTransfer","Register-R53DDomain","Update-R53DDomainContact")
    "RegistrantContact_ContactType"=@("Invoke-R53DDomainTransfer","Register-R53DDomain","Update-R53DDomainContact")
    "RegistrantContact_CountryCode"=@("Invoke-R53DDomainTransfer","Register-R53DDomain","Update-R53DDomainContact")
    "SortBy"=@("Get-R53DOperationList")
    "SortCondition_Name"=@("Get-R53DDomainList")
    "SortCondition_SortOrder"=@("Get-R53DDomainList")
    "SortOrder"=@("Get-R53DOperationList")
    "TechContact_ContactType"=@("Invoke-R53DDomainTransfer","Register-R53DDomain","Update-R53DDomainContact")
    "TechContact_CountryCode"=@("Invoke-R53DDomainTransfer","Register-R53DDomain","Update-R53DDomainContact")
}

_awsArgumentCompleterRegistration $R53D_Completers $R53D_map

$R53D_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.R53D.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$R53D_SelectMap = @{
    "Select"=@("Approve-R53DDomainTransferFromAnotherAwsAccount",
               "Add-R53DDelegationSignerToDomain",
               "Stop-R53DDomainTransferToAnotherAwsAccount",
               "Test-R53DDomainAvailability",
               "Test-R53DDomainTransferability",
               "Remove-R53DDomain",
               "Remove-R53DTagsForDomain",
               "Disable-R53DDomainAutoRenew",
               "Disable-R53DDomainTransferLock",
               "Remove-R53DDelegationSignerFromDomain",
               "Enable-R53DDomainAutoRenew",
               "Enable-R53DDomainTransferLock",
               "Get-R53DContactReachabilityStatus",
               "Get-R53DDomainDetail",
               "Get-R53DDomainSuggestion",
               "Get-R53DOperationDetail",
               "Get-R53DDomainList",
               "Get-R53DOperationList",
               "Get-R53DPriceList",
               "Get-R53DTagsForDomain",
               "Push-R53DDomain",
               "Register-R53DDomain",
               "Deny-R53DDomainTransferFromAnotherAwsAccount",
               "Update-R53DDomainRenewal",
               "Send-R53DContactReachabilityEmail",
               "Send-R53DOperationAuthorization",
               "Get-R53DDomainAuthCode",
               "Invoke-R53DDomainTransfer",
               "Move-R53DDomainToAnotherAwsAccount",
               "Update-R53DDomainContact",
               "Update-R53DDomainContactPrivacy",
               "Update-R53DDomainNameserver",
               "Update-R53DTagsForDomain",
               "Get-R53DBillingRecord")
}

_awsArgumentCompleterRegistration $R53D_SelectCompleters $R53D_SelectMap
# Argument completions for service Amazon Route 53 Profiles


$R53P_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.R53P.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$R53P_SelectMap = @{
    "Select"=@("New-R53PProfileAssociation",
               "New-R53PProfileResourceAssociation",
               "New-R53PProfile",
               "Remove-R53PProfile",
               "Remove-R53PProfileAssociation",
               "Remove-R53PProfileResourceAssociation",
               "Get-R53PProfile",
               "Get-R53PProfileAssociation",
               "Get-R53PProfileResourceAssociation",
               "Get-R53PProfileAssociationList",
               "Get-R53PProfileResourceAssociationList",
               "Get-R53PProfileList",
               "Get-R53PResourceTag",
               "Add-R53PResourceTag",
               "Remove-R53PResourceTag",
               "Update-R53PProfileResourceAssociation")
}

_awsArgumentCompleterRegistration $R53P_SelectCompleters $R53P_SelectMap
# Argument completions for service Route53 Recovery Cluster


$RRC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Route53RecoveryCluster.RoutingControlState
        "Update-RRCRoutingControlState/RoutingControlState"
        {
            $v = "Off","On"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RRC_map = @{
    "RoutingControlState"=@("Update-RRCRoutingControlState")
}

_awsArgumentCompleterRegistration $RRC_Completers $RRC_map

$RRC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.RRC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$RRC_SelectMap = @{
    "Select"=@("Get-RRCRoutingControlState",
               "Get-RRCRoutingControlList",
               "Update-RRCRoutingControlState",
               "Update-RRCRoutingControlStateBatch")
}

_awsArgumentCompleterRegistration $RRC_SelectCompleters $RRC_SelectMap
# Argument completions for service AWS Route53 Recovery Control Config


$R53RC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Route53RecoveryControlConfig.RuleType
        {
            ($_ -eq "New-R53RCSafetyRule/AssertionRule_RuleConfig_Type") -Or
            ($_ -eq "New-R53RCSafetyRule/GatingRule_RuleConfig_Type")
        }
        {
            $v = "AND","ATLEAST","OR"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$R53RC_map = @{
    "AssertionRule_RuleConfig_Type"=@("New-R53RCSafetyRule")
    "GatingRule_RuleConfig_Type"=@("New-R53RCSafetyRule")
}

_awsArgumentCompleterRegistration $R53RC_Completers $R53RC_map

$R53RC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.R53RC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$R53RC_SelectMap = @{
    "Select"=@("New-R53RCCluster",
               "New-R53RCControlPanel",
               "New-R53RCRoutingControl",
               "New-R53RCSafetyRule",
               "Remove-R53RCCluster",
               "Remove-R53RCControlPanel",
               "Remove-R53RCRoutingControl",
               "Remove-R53RCSafetyRule",
               "Get-R53RCCluster",
               "Get-R53RCControlPanel",
               "Get-R53RCRoutingControl",
               "Get-R53RCSafetyRule",
               "Get-R53RCResourcePolicy",
               "Get-R53RCAssociatedRoute53HealthCheckList",
               "Get-R53RCClusterList",
               "Get-R53RCControlPanelList",
               "Get-R53RCRoutingControlList",
               "Get-R53RCSafetyRuleList",
               "Get-R53RCResourceTag",
               "Add-R53RCResourceTag",
               "Remove-R53RCResourceTag",
               "Update-R53RCControlPanel",
               "Update-R53RCRoutingControl",
               "Update-R53RCSafetyRule")
}

_awsArgumentCompleterRegistration $R53RC_SelectCompleters $R53RC_SelectMap
# Argument completions for service Amazon Route 53 Resolver


$R53R_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Route53Resolver.Action
        {
            ($_ -eq "Edit-R53RFirewallRule/Action") -Or
            ($_ -eq "Get-R53RFirewallRuleList/Action") -Or
            ($_ -eq "New-R53RFirewallRule/Action")
        }
        {
            $v = "ALERT","ALLOW","BLOCK"
            break
        }

        # Amazon.Route53Resolver.AutodefinedReverseFlag
        "Update-R53RResolverConfig/AutodefinedReverseFlag"
        {
            $v = "DISABLE","ENABLE","USE_LOCAL_RESOURCE_SETTING"
            break
        }

        # Amazon.Route53Resolver.BlockOverrideDnsType
        {
            ($_ -eq "Edit-R53RFirewallRule/BlockOverrideDnsType") -Or
            ($_ -eq "New-R53RFirewallRule/BlockOverrideDnsType")
        }
        {
            $v = "CNAME"
            break
        }

        # Amazon.Route53Resolver.BlockResponse
        {
            ($_ -eq "Edit-R53RFirewallRule/BlockResponse") -Or
            ($_ -eq "New-R53RFirewallRule/BlockResponse")
        }
        {
            $v = "NODATA","NXDOMAIN","OVERRIDE"
            break
        }

        # Amazon.Route53Resolver.FirewallDomainImportOperation
        "Import-R53RFirewallDomainList/Operation"
        {
            $v = "REPLACE"
            break
        }

        # Amazon.Route53Resolver.FirewallDomainRedirectionAction
        {
            ($_ -eq "Edit-R53RFirewallRule/FirewallDomainRedirectionAction") -Or
            ($_ -eq "New-R53RFirewallRule/FirewallDomainRedirectionAction")
        }
        {
            $v = "INSPECT_REDIRECTION_DOMAIN","TRUST_REDIRECTION_DOMAIN"
            break
        }

        # Amazon.Route53Resolver.FirewallDomainUpdateOperation
        "Edit-R53RFirewallDomain/Operation"
        {
            $v = "ADD","REMOVE","REPLACE"
            break
        }

        # Amazon.Route53Resolver.FirewallFailOpenStatus
        "Edit-R53RFirewallConfig/FirewallFailOpen"
        {
            $v = "DISABLED","ENABLED","USE_LOCAL_RESOURCE_SETTING"
            break
        }

        # Amazon.Route53Resolver.FirewallRuleGroupAssociationStatus
        "Get-R53RFirewallRuleGroupAssociationList/Status"
        {
            $v = "COMPLETE","DELETING","UPDATING"
            break
        }

        # Amazon.Route53Resolver.MutationProtectionStatus
        {
            ($_ -eq "Edit-R53RFirewallRuleGroupAssociation/MutationProtection") -Or
            ($_ -eq "New-R53RFirewallRuleGroupAssociation/MutationProtection")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Route53Resolver.ResolverEndpointDirection
        "New-R53RResolverEndpoint/Direction"
        {
            $v = "INBOUND","OUTBOUND"
            break
        }

        # Amazon.Route53Resolver.ResolverEndpointType
        {
            ($_ -eq "New-R53RResolverEndpoint/ResolverEndpointType") -Or
            ($_ -eq "Update-R53RResolverEndpoint/ResolverEndpointType")
        }
        {
            $v = "DUALSTACK","IPV4","IPV6"
            break
        }

        # Amazon.Route53Resolver.RuleTypeOption
        "New-R53RResolverRule/RuleType"
        {
            $v = "FORWARD","RECURSIVE","SYSTEM"
            break
        }

        # Amazon.Route53Resolver.SortOrder
        {
            ($_ -eq "Get-R53RResolverQueryLogConfigAssociationList/SortOrder") -Or
            ($_ -eq "Get-R53RResolverQueryLogConfigList/SortOrder")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.Route53Resolver.Validation
        "Update-R53RResolverDnssecConfig/Validation"
        {
            $v = "DISABLE","ENABLE","USE_LOCAL_RESOURCE_SETTING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$R53R_map = @{
    "Action"=@("Edit-R53RFirewallRule","Get-R53RFirewallRuleList","New-R53RFirewallRule")
    "AutodefinedReverseFlag"=@("Update-R53RResolverConfig")
    "BlockOverrideDnsType"=@("Edit-R53RFirewallRule","New-R53RFirewallRule")
    "BlockResponse"=@("Edit-R53RFirewallRule","New-R53RFirewallRule")
    "Direction"=@("New-R53RResolverEndpoint")
    "FirewallDomainRedirectionAction"=@("Edit-R53RFirewallRule","New-R53RFirewallRule")
    "FirewallFailOpen"=@("Edit-R53RFirewallConfig")
    "MutationProtection"=@("Edit-R53RFirewallRuleGroupAssociation","New-R53RFirewallRuleGroupAssociation")
    "Operation"=@("Edit-R53RFirewallDomain","Import-R53RFirewallDomainList")
    "ResolverEndpointType"=@("New-R53RResolverEndpoint","Update-R53RResolverEndpoint")
    "RuleType"=@("New-R53RResolverRule")
    "SortOrder"=@("Get-R53RResolverQueryLogConfigAssociationList","Get-R53RResolverQueryLogConfigList")
    "Status"=@("Get-R53RFirewallRuleGroupAssociationList")
    "Validation"=@("Update-R53RResolverDnssecConfig")
}

_awsArgumentCompleterRegistration $R53R_Completers $R53R_map

$R53R_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.R53R.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$R53R_SelectMap = @{
    "Select"=@("New-R53RFirewallRuleGroupAssociation",
               "Add-R53RResolverEndpointIpAddressAssociation",
               "Add-R53RResolverQueryLogConfigAssociation",
               "Add-R53RResolverRuleAssociation",
               "New-R53RFirewallDomainList",
               "New-R53RFirewallRule",
               "New-R53RFirewallRuleGroup",
               "New-R53ROutpostResolver",
               "New-R53RResolverEndpoint",
               "New-R53RResolverQueryLogConfig",
               "New-R53RResolverRule",
               "Remove-R53RFirewallDomainList",
               "Remove-R53RFirewallRule",
               "Remove-R53RFirewallRuleGroup",
               "Remove-R53ROutpostResolver",
               "Remove-R53RResolverEndpoint",
               "Remove-R53RResolverQueryLogConfig",
               "Remove-R53RResolverRule",
               "Remove-R53RFirewallRuleGroupAssociation",
               "Remove-R53RResolverEndpointIpAddressAssociation",
               "Remove-R53RResolverQueryLogConfigAssociation",
               "Remove-R53RResolverRuleAssociation",
               "Get-R53RFirewallConfig",
               "Get-R53RFirewallDomainList",
               "Get-R53RFirewallRuleGroup",
               "Get-R53RFirewallRuleGroupAssociation",
               "Get-R53RFirewallRuleGroupPolicy",
               "Get-R53ROutpostResolver",
               "Get-R53RResolverConfig",
               "Get-R53RResolverDnssecConfig",
               "Get-R53RResolverEndpoint",
               "Get-R53RResolverQueryLogConfig",
               "Get-R53RResolverQueryLogConfigAssociation",
               "Get-R53RResolverQueryLogConfigPolicy",
               "Get-R53RResolverRule",
               "Get-R53RResolverRuleAssociation",
               "Get-R53RResolverRulePolicy",
               "Import-R53RFirewallDomainList",
               "Get-R53RFirewallConfigList",
               "Get-R53RFirewallDomainListList",
               "Get-R53RFirewallDomain",
               "Get-R53RFirewallRuleGroupAssociationList",
               "Get-R53RFirewallRuleGroupList",
               "Get-R53RFirewallRuleList",
               "Get-R53ROutpostResolverList",
               "Get-R53RResolverConfigList",
               "Get-R53RResolverDnssecConfigList",
               "Get-R53RResolverEndpointIpAddressList",
               "Get-R53RResolverEndpointList",
               "Get-R53RResolverQueryLogConfigAssociationList",
               "Get-R53RResolverQueryLogConfigList",
               "Get-R53RResolverRuleAssociationList",
               "Get-R53RResolverRuleList",
               "Get-R53RResourceTagList",
               "Edit-R53RFirewallRuleGroupPolicy",
               "Write-R53RResolverQueryLogConfigPolicy",
               "Set-R53RResolverRulePolicy",
               "Add-R53RResourceTag",
               "Remove-R53RResourceTag",
               "Edit-R53RFirewallConfig",
               "Edit-R53RFirewallDomain",
               "Edit-R53RFirewallRule",
               "Edit-R53RFirewallRuleGroupAssociation",
               "Update-R53ROutpostResolver",
               "Update-R53RResolverConfig",
               "Update-R53RResolverDnssecConfig",
               "Update-R53RResolverEndpoint",
               "Update-R53RResolverRule")
}

_awsArgumentCompleterRegistration $R53R_SelectCompleters $R53R_SelectMap
# Argument completions for service CloudWatch RUM


$CWRUM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.CloudWatchRUM.CustomEventsStatus
        {
            ($_ -eq "New-CWRUMAppMonitor/CustomEvents_Status") -Or
            ($_ -eq "Update-CWRUMAppMonitor/CustomEvents_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.CloudWatchRUM.MetricDestination
        {
            ($_ -eq "Add-CWRUMCreateRumMetricDefinition/Destination") -Or
            ($_ -eq "Get-CWRUMGetRumMetricDefinition/Destination") -Or
            ($_ -eq "Remove-CWRUMDeleteRumMetricDefinition/Destination") -Or
            ($_ -eq "Remove-CWRUMRumMetricsDestination/Destination") -Or
            ($_ -eq "Update-CWRUMRumMetricDefinition/Destination") -Or
            ($_ -eq "Write-CWRUMRumMetricsDestination/Destination")
        }
        {
            $v = "CloudWatch","Evidently"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWRUM_map = @{
    "CustomEvents_Status"=@("New-CWRUMAppMonitor","Update-CWRUMAppMonitor")
    "Destination"=@("Add-CWRUMCreateRumMetricDefinition","Get-CWRUMGetRumMetricDefinition","Remove-CWRUMDeleteRumMetricDefinition","Remove-CWRUMRumMetricsDestination","Update-CWRUMRumMetricDefinition","Write-CWRUMRumMetricsDestination")
}

_awsArgumentCompleterRegistration $CWRUM_Completers $CWRUM_map

$CWRUM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CWRUM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWRUM_SelectMap = @{
    "Select"=@("Add-CWRUMCreateRumMetricDefinition",
               "Remove-CWRUMDeleteRumMetricDefinition",
               "Get-CWRUMGetRumMetricDefinition",
               "New-CWRUMAppMonitor",
               "Remove-CWRUMAppMonitor",
               "Remove-CWRUMRumMetricsDestination",
               "Get-CWRUMAppMonitor",
               "Get-CWRUMAppMonitorData",
               "Get-CWRUMAppMonitorList",
               "Get-CWRUMRumMetricsDestinationList",
               "Get-CWRUMResourceTag",
               "Write-CWRUMRumEvent",
               "Write-CWRUMRumMetricsDestination",
               "Add-CWRUMResourceTag",
               "Remove-CWRUMResourceTag",
               "Update-CWRUMAppMonitor",
               "Update-CWRUMRumMetricDefinition")
}

_awsArgumentCompleterRegistration $CWRUM_SelectCompleters $CWRUM_SelectMap
# Argument completions for service Amazon Lex Runtime V2


$LRSV2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.LexRuntimeV2.ConfirmationState
        {
            ($_ -eq "Send-LRSV2Text/Intent_ConfirmationState") -Or
            ($_ -eq "Write-LRSV2Session/Intent_ConfirmationState")
        }
        {
            $v = "Confirmed","Denied","None"
            break
        }

        # Amazon.LexRuntimeV2.DialogActionType
        {
            ($_ -eq "Send-LRSV2Text/DialogAction_Type") -Or
            ($_ -eq "Write-LRSV2Session/DialogAction_Type")
        }
        {
            $v = "Close","ConfirmIntent","Delegate","ElicitIntent","ElicitSlot","None"
            break
        }

        # Amazon.LexRuntimeV2.IntentState
        {
            ($_ -eq "Send-LRSV2Text/Intent_State") -Or
            ($_ -eq "Write-LRSV2Session/Intent_State")
        }
        {
            $v = "Failed","Fulfilled","FulfillmentInProgress","InProgress","ReadyForFulfillment","Waiting"
            break
        }

        # Amazon.LexRuntimeV2.StyleType
        {
            ($_ -eq "Send-LRSV2Text/DialogAction_SlotElicitationStyle") -Or
            ($_ -eq "Write-LRSV2Session/DialogAction_SlotElicitationStyle")
        }
        {
            $v = "Default","SpellByLetter","SpellByWord"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LRSV2_map = @{
    "DialogAction_SlotElicitationStyle"=@("Send-LRSV2Text","Write-LRSV2Session")
    "DialogAction_Type"=@("Send-LRSV2Text","Write-LRSV2Session")
    "Intent_ConfirmationState"=@("Send-LRSV2Text","Write-LRSV2Session")
    "Intent_State"=@("Send-LRSV2Text","Write-LRSV2Session")
}

_awsArgumentCompleterRegistration $LRSV2_Completers $LRSV2_map

$LRSV2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LRSV2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LRSV2_SelectMap = @{
    "Select"=@("Remove-LRSV2Session",
               "Get-LRSV2Session",
               "Write-LRSV2Session",
               "Send-LRSV2Text",
               "Send-LRSV2Utterance")
}

_awsArgumentCompleterRegistration $LRSV2_SelectCompleters $LRSV2_SelectMap
# Argument completions for service Amazon Lex


$LEX_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Lex.DialogActionType
        "Write-LEXSession/DialogAction_Type"
        {
            $v = "Close","ConfirmIntent","Delegate","ElicitIntent","ElicitSlot"
            break
        }

        # Amazon.Lex.FulfillmentState
        "Write-LEXSession/DialogAction_FulfillmentState"
        {
            $v = "Failed","Fulfilled","ReadyForFulfillment"
            break
        }

        # Amazon.Lex.MessageFormatType
        "Write-LEXSession/DialogAction_MessageFormat"
        {
            $v = "Composite","CustomPayload","PlainText","SSML"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LEX_map = @{
    "DialogAction_FulfillmentState"=@("Write-LEXSession")
    "DialogAction_MessageFormat"=@("Write-LEXSession")
    "DialogAction_Type"=@("Write-LEXSession")
}

_awsArgumentCompleterRegistration $LEX_Completers $LEX_map

$LEX_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LEX.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$LEX_SelectMap = @{
    "Select"=@("Remove-LEXSession",
               "Get-LEXSession",
               "Send-LEXContent",
               "Send-LEXText",
               "Write-LEXSession")
}

_awsArgumentCompleterRegistration $LEX_SelectCompleters $LEX_SelectMap
# Argument completions for service Amazon SageMaker Runtime


$SMR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SMR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMR_SelectMap = @{
    "Select"=@("Invoke-SMREndpoint",
               "Invoke-SMREndpointAsync",
               "Invoke-SMREndpointWithResponseStream")
}

_awsArgumentCompleterRegistration $SMR_SelectCompleters $SMR_SelectMap
# Argument completions for service Amazon Simple Storage Service (S3)


$S3_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.S3.BucketAccelerateStatus
        "Write-S3BucketAccelerateConfiguration/AccelerateConfiguration_Status"
        {
            $v = "Enabled","Suspended"
            break
        }

        # Amazon.S3.ChecksumAlgorithm
        {
            ($_ -eq "Add-S3PublicAccessBlock/ChecksumAlgorithm") -Or
            ($_ -eq "Copy-S3Object/ChecksumAlgorithm") -Or
            ($_ -eq "Remove-S3Object/ChecksumAlgorithm") -Or
            ($_ -eq "Restore-S3Object/ChecksumAlgorithm") -Or
            ($_ -eq "Set-S3ACL/ChecksumAlgorithm") -Or
            ($_ -eq "Set-S3BucketEncryption/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3BucketAccelerateConfiguration/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3BucketLogging/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3BucketNotification/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3BucketPolicy/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3BucketReplication/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3BucketRequestPayment/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3BucketTagging/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3BucketVersioning/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3BucketWebsite/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3CORSConfiguration/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3LifecycleConfiguration/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3Object/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3ObjectLegalHold/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3ObjectLockConfiguration/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3ObjectRetention/ChecksumAlgorithm") -Or
            ($_ -eq "Write-S3ObjectTagSet/ChecksumAlgorithm")
        }
        {
            $v = "CRC32","CRC32C","SHA1","SHA256"
            break
        }

        # Amazon.S3.ChecksumMode
        {
            ($_ -eq "Copy-S3Object/ChecksumMode") -Or
            ($_ -eq "Get-S3ObjectMetadata/ChecksumMode") -Or
            ($_ -eq "Read-S3Object/ChecksumMode")
        }
        {
            $v = "ENABLED"
            break
        }

        # Amazon.S3.EncodingType
        {
            ($_ -eq "Get-S3MultipartUpload/Encoding") -Or
            ($_ -eq "Get-S3Object/Encoding") -Or
            ($_ -eq "Get-S3ObjectV2/Encoding") -Or
            ($_ -eq "Get-S3Version/Encoding")
        }
        {
            $v = "Url"
            break
        }

        # Amazon.S3.ExpressionType
        "Select-S3ObjectContent/ExpressionType"
        {
            $v = "SQL"
            break
        }

        # Amazon.S3.GlacierJobTier
        {
            ($_ -eq "Restore-S3Object/RetrievalTier") -Or
            ($_ -eq "Restore-S3Object/Tier")
        }
        {
            $v = "Bulk","Expedited","Standard"
            break
        }

        # Amazon.S3.IntelligentTieringStatus
        "Write-S3BucketIntelligentTieringConfiguration/IntelligentTieringConfiguration_Status"
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.S3.InventoryFormat
        "Write-S3BucketInventoryConfiguration/S3BucketDestination_InventoryFormat"
        {
            $v = "CSV","ORC","Parquet"
            break
        }

        # Amazon.S3.InventoryFrequency
        "Write-S3BucketInventoryConfiguration/Schedule_Frequency"
        {
            $v = "Daily","Weekly"
            break
        }

        # Amazon.S3.InventoryIncludedObjectVersions
        "Write-S3BucketInventoryConfiguration/InventoryConfiguration_IncludedObjectVersion"
        {
            $v = "All","Current"
            break
        }

        # Amazon.S3.ObjectLockEnabled
        "Write-S3ObjectLockConfiguration/ObjectLockConfiguration_ObjectLockEnabled"
        {
            $v = "Enabled"
            break
        }

        # Amazon.S3.ObjectLockLegalHoldStatus
        {
            ($_ -eq "Write-S3ObjectLegalHold/LegalHold_Status") -Or
            ($_ -eq "Write-S3GetObjectResponse/ObjectLockLegalHoldStatus")
        }
        {
            $v = "OFF","ON"
            break
        }

        # Amazon.S3.ObjectLockMode
        "Write-S3GetObjectResponse/ObjectLockMode"
        {
            $v = "COMPLIANCE","GOVERNANCE"
            break
        }

        # Amazon.S3.ObjectLockRetentionMode
        {
            ($_ -eq "Write-S3ObjectLockConfiguration/DefaultRetention_Mode") -Or
            ($_ -eq "Write-S3ObjectRetention/Retention_Mode")
        }
        {
            $v = "COMPLIANCE","GOVERNANCE"
            break
        }

        # Amazon.S3.PartitionDateSource
        "Write-S3BucketLogging/PartitionedPrefix_PartitionDateSource"
        {
            $v = "DeliveryTime","EventTime"
            break
        }

        # Amazon.S3.ReplicationStatus
        "Write-S3GetObjectResponse/ReplicationStatus"
        {
            $v = "COMPLETED","FAILED","PENDING","REPLICA"
            break
        }

        # Amazon.S3.RequestCharged
        "Write-S3GetObjectResponse/RequestCharged"
        {
            $v = "requester"
            break
        }

        # Amazon.S3.RequestPayer
        {
            ($_ -eq "Copy-S3Object/RequestPayer") -Or
            ($_ -eq "Get-S3BucketAccelerateConfiguration/RequestPayer") -Or
            ($_ -eq "Get-S3Object/RequestPayer") -Or
            ($_ -eq "Get-S3ObjectAttribute/RequestPayer") -Or
            ($_ -eq "Get-S3ObjectLegalHold/RequestPayer") -Or
            ($_ -eq "Get-S3ObjectMetadata/RequestPayer") -Or
            ($_ -eq "Get-S3ObjectRetention/RequestPayer") -Or
            ($_ -eq "Get-S3ObjectTagSet/RequestPayer") -Or
            ($_ -eq "Get-S3ObjectV2/RequestPayer") -Or
            ($_ -eq "Get-S3Version/RequestPayer") -Or
            ($_ -eq "Remove-S3Object/RequestPayer") -Or
            ($_ -eq "Restore-S3Object/RequestPayer") -Or
            ($_ -eq "Write-S3Object/RequestPayer") -Or
            ($_ -eq "Write-S3ObjectLegalHold/RequestPayer") -Or
            ($_ -eq "Write-S3ObjectLockConfiguration/RequestPayer") -Or
            ($_ -eq "Write-S3ObjectRetention/RequestPayer") -Or
            ($_ -eq "Write-S3ObjectTagSet/RequestPayer")
        }
        {
            $v = "requester"
            break
        }

        # Amazon.S3.RestoreRequestType
        "Restore-S3Object/RestoreRequestType"
        {
            $v = "SELECT"
            break
        }

        # Amazon.S3.S3CannedACL
        {
            ($_ -eq "Set-S3ACL/CannedACL") -Or
            ($_ -eq "Copy-S3Object/CannedACLName") -Or
            ($_ -eq "New-S3Bucket/CannedACLName") -Or
            ($_ -eq "Write-S3Object/CannedACLName") -Or
            ($_ -eq "Restore-S3Object/S3_CannedACL")
        }
        {
            $v = "authenticated-read","aws-exec-read","bucket-owner-full-control","bucket-owner-read","log-delivery-write","NoACL","private","public-read","public-read-write"
            break
        }

        # Amazon.S3.S3StorageClass
        {
            ($_ -eq "Restore-S3Object/S3_StorageClass") -Or
            ($_ -eq "Write-S3GetObjectResponse/StorageClass")
        }
        {
            $v = "DEEP_ARCHIVE","EXPRESS_ONEZONE","GLACIER","GLACIER_IR","INTELLIGENT_TIERING","ONEZONE_IA","OUTPOSTS","REDUCED_REDUNDANCY","SNOW","STANDARD","STANDARD_IA"
            break
        }

        # Amazon.S3.ServerSideEncryptionCustomerMethod
        {
            ($_ -eq "Copy-S3Object/CopySourceServerSideEncryptionCustomerMethod") -Or
            ($_ -eq "Select-S3ObjectContent/ServerSideCustomerEncryptionMethod") -Or
            ($_ -eq "Copy-S3Object/ServerSideEncryptionCustomerMethod") -Or
            ($_ -eq "Get-S3ObjectMetadata/ServerSideEncryptionCustomerMethod") -Or
            ($_ -eq "Get-S3PreSignedURL/ServerSideEncryptionCustomerMethod") -Or
            ($_ -eq "Read-S3Object/ServerSideEncryptionCustomerMethod") -Or
            ($_ -eq "Write-S3Object/ServerSideEncryptionCustomerMethod") -Or
            ($_ -eq "Write-S3GetObjectResponse/SSECustomerAlgorithm")
        }
        {
            $v = "","AES256"
            break
        }

        # Amazon.S3.ServerSideEncryptionMethod
        {
            ($_ -eq "Restore-S3Object/Encryption_EncryptionType") -Or
            ($_ -eq "Copy-S3Object/ServerSideEncryption") -Or
            ($_ -eq "New-S3Session/ServerSideEncryption") -Or
            ($_ -eq "Write-S3Object/ServerSideEncryption") -Or
            ($_ -eq "Get-S3PreSignedURL/ServerSideEncryptionMethod") -Or
            ($_ -eq "Write-S3GetObjectResponse/ServerSideEncryptionMethod")
        }
        {
            $v = "","AES256","aws:kms","aws:kms:dsse"
            break
        }

        # Amazon.S3.SessionMode
        "New-S3Session/SessionMode"
        {
            $v = "ReadOnly","ReadWrite"
            break
        }

        # Amazon.S3.StorageClassAnalysisSchemaVersion
        "Write-S3BucketAnalyticsConfiguration/DataExport_OutputSchemaVersion"
        {
            $v = "V_1"
            break
        }

        # Amazon.S3.TransitionDefaultMinimumObjectSize
        "Write-S3LifecycleConfiguration/TransitionDefaultMinimumObjectSize"
        {
            $v = "all_storage_classes_128K","varies_by_storage_class"
            break
        }

        # Amazon.S3.VersionStatus
        "Write-S3BucketVersioning/VersioningConfig_Status"
        {
            $v = "Enabled","Off","Suspended"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$S3_map = @{
    "AccelerateConfiguration_Status"=@("Write-S3BucketAccelerateConfiguration")
    "CannedACL"=@("Set-S3ACL")
    "CannedACLName"=@("Copy-S3Object","New-S3Bucket","Write-S3Object")
    "ChecksumAlgorithm"=@("Add-S3PublicAccessBlock","Copy-S3Object","Remove-S3Object","Restore-S3Object","Set-S3ACL","Set-S3BucketEncryption","Write-S3BucketAccelerateConfiguration","Write-S3BucketLogging","Write-S3BucketNotification","Write-S3BucketPolicy","Write-S3BucketReplication","Write-S3BucketRequestPayment","Write-S3BucketTagging","Write-S3BucketVersioning","Write-S3BucketWebsite","Write-S3CORSConfiguration","Write-S3LifecycleConfiguration","Write-S3Object","Write-S3ObjectLegalHold","Write-S3ObjectLockConfiguration","Write-S3ObjectRetention","Write-S3ObjectTagSet")
    "ChecksumMode"=@("Copy-S3Object","Get-S3ObjectMetadata","Read-S3Object")
    "CopySourceServerSideEncryptionCustomerMethod"=@("Copy-S3Object")
    "DataExport_OutputSchemaVersion"=@("Write-S3BucketAnalyticsConfiguration")
    "DefaultRetention_Mode"=@("Write-S3ObjectLockConfiguration")
    "Encoding"=@("Get-S3MultipartUpload","Get-S3Object","Get-S3ObjectV2","Get-S3Version")
    "Encryption_EncryptionType"=@("Restore-S3Object")
    "ExpressionType"=@("Select-S3ObjectContent")
    "IntelligentTieringConfiguration_Status"=@("Write-S3BucketIntelligentTieringConfiguration")
    "InventoryConfiguration_IncludedObjectVersion"=@("Write-S3BucketInventoryConfiguration")
    "LegalHold_Status"=@("Write-S3ObjectLegalHold")
    "ObjectLockConfiguration_ObjectLockEnabled"=@("Write-S3ObjectLockConfiguration")
    "ObjectLockLegalHoldStatus"=@("Write-S3GetObjectResponse")
    "ObjectLockMode"=@("Write-S3GetObjectResponse")
    "PartitionedPrefix_PartitionDateSource"=@("Write-S3BucketLogging")
    "ReplicationStatus"=@("Write-S3GetObjectResponse")
    "RequestCharged"=@("Write-S3GetObjectResponse")
    "RequestPayer"=@("Copy-S3Object","Get-S3BucketAccelerateConfiguration","Get-S3Object","Get-S3ObjectAttribute","Get-S3ObjectLegalHold","Get-S3ObjectMetadata","Get-S3ObjectRetention","Get-S3ObjectTagSet","Get-S3ObjectV2","Get-S3Version","Remove-S3Object","Restore-S3Object","Write-S3Object","Write-S3ObjectLegalHold","Write-S3ObjectLockConfiguration","Write-S3ObjectRetention","Write-S3ObjectTagSet")
    "RestoreRequestType"=@("Restore-S3Object")
    "Retention_Mode"=@("Write-S3ObjectRetention")
    "RetrievalTier"=@("Restore-S3Object")
    "S3_CannedACL"=@("Restore-S3Object")
    "S3_StorageClass"=@("Restore-S3Object")
    "S3BucketDestination_InventoryFormat"=@("Write-S3BucketInventoryConfiguration")
    "Schedule_Frequency"=@("Write-S3BucketInventoryConfiguration")
    "ServerSideCustomerEncryptionMethod"=@("Select-S3ObjectContent")
    "ServerSideEncryption"=@("Copy-S3Object","New-S3Session","Write-S3Object")
    "ServerSideEncryptionCustomerMethod"=@("Copy-S3Object","Get-S3ObjectMetadata","Get-S3PreSignedURL","Read-S3Object","Write-S3Object")
    "ServerSideEncryptionMethod"=@("Get-S3PreSignedURL","Write-S3GetObjectResponse")
    "SessionMode"=@("New-S3Session")
    "SSECustomerAlgorithm"=@("Write-S3GetObjectResponse")
    "StorageClass"=@("Write-S3GetObjectResponse")
    "Tier"=@("Restore-S3Object")
    "TransitionDefaultMinimumObjectSize"=@("Write-S3LifecycleConfiguration")
    "VersioningConfig_Status"=@("Write-S3BucketVersioning")
}

_awsArgumentCompleterRegistration $S3_Completers $S3_map

$S3_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.S3.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$S3_SelectMap = @{
    "Select"=@("New-S3Session",
               "Remove-S3BucketAnalyticsConfiguration",
               "Remove-S3BucketEncryption",
               "Remove-S3BucketIntelligentTieringConfiguration",
               "Remove-S3BucketInventoryConfiguration",
               "Remove-S3BucketMetricsConfiguration",
               "Remove-S3BucketOwnershipControl",
               "Remove-S3BucketPolicy",
               "Remove-S3BucketReplication",
               "Remove-S3BucketTagging",
               "Remove-S3BucketWebsite",
               "Remove-S3CORSConfiguration",
               "Remove-S3LifecycleConfiguration",
               "Remove-S3ObjectTagSet",
               "Remove-S3PublicAccessBlock",
               "Get-S3ACL",
               "Get-S3BucketAccelerateConfiguration",
               "Get-S3BucketAnalyticsConfiguration",
               "Get-S3BucketEncryption",
               "Get-S3BucketIntelligentTieringConfiguration",
               "Get-S3BucketInventoryConfiguration",
               "Get-S3BucketLocation",
               "Get-S3BucketLogging",
               "Get-S3BucketMetricsConfiguration",
               "Get-S3BucketNotification",
               "Get-S3BucketOwnershipControl",
               "Get-S3BucketPolicy",
               "Get-S3BucketPolicyStatus",
               "Get-S3BucketReplication",
               "Get-S3BucketRequestPayment",
               "Get-S3BucketTagging",
               "Get-S3BucketVersioning",
               "Get-S3BucketWebsite",
               "Get-S3CORSConfiguration",
               "Get-S3LifecycleConfiguration",
               "Get-S3ObjectAttribute",
               "Get-S3ObjectLegalHold",
               "Get-S3ObjectLockConfiguration",
               "Get-S3ObjectMetadata",
               "Get-S3ObjectRetention",
               "Get-S3ObjectTagSet",
               "Get-S3PublicAccessBlock",
               "Get-S3BucketAnalyticsConfigurationList",
               "Get-S3BucketIntelligentTieringConfigurationList",
               "Get-S3BucketInventoryConfigurationList",
               "Get-S3BucketMetricsConfigurationList",
               "Get-S3Bucket",
               "Get-S3DirectoryBucket",
               "Get-S3Object",
               "Get-S3ObjectV2",
               "Get-S3Version",
               "Set-S3ACL",
               "Write-S3BucketAccelerateConfiguration",
               "Write-S3BucketAnalyticsConfiguration",
               "Set-S3BucketEncryption",
               "Write-S3BucketIntelligentTieringConfiguration",
               "Write-S3BucketInventoryConfiguration",
               "Write-S3BucketLogging",
               "Write-S3BucketMetricsConfiguration",
               "Write-S3BucketNotification",
               "Write-S3BucketOwnershipControl",
               "Write-S3BucketPolicy",
               "Write-S3BucketReplication",
               "Write-S3BucketRequestPayment",
               "Write-S3BucketTagging",
               "Write-S3BucketVersioning",
               "Write-S3BucketWebsite",
               "Write-S3CORSConfiguration",
               "Write-S3LifecycleConfiguration",
               "Write-S3ObjectLegalHold",
               "Write-S3ObjectLockConfiguration",
               "Write-S3ObjectRetention",
               "Write-S3ObjectTagSet",
               "Add-S3PublicAccessBlock",
               "Restore-S3Object",
               "Select-S3ObjectContent",
               "Write-S3GetObjectResponse",
               "Copy-S3Object",
               "Get-S3MultipartUpload",
               "Get-S3PreSignedURL",
               "New-S3Bucket",
               "Read-S3Object",
               "Remove-S3Bucket",
               "Remove-S3MultipartUpload",
               "Remove-S3Object",
               "Test-S3Bucket",
               "Write-S3Object")
}

_awsArgumentCompleterRegistration $S3_SelectCompleters $S3_SelectMap
# Argument completions for service Amazon S3 Control


$S3C_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.S3Control.BucketCannedACL
        "New-S3CBucket/ACL"
        {
            $v = "authenticated-read","private","public-read","public-read-write"
            break
        }

        # Amazon.S3Control.BucketLocationConstraint
        "New-S3CBucket/CreateBucketConfiguration_LocationConstraint"
        {
            $v = "ap-northeast-1","ap-south-1","ap-southeast-1","ap-southeast-2","cn-north-1","EU","eu-central-1","eu-west-1","sa-east-1","us-west-1","us-west-2"
            break
        }

        # Amazon.S3Control.BucketVersioningStatus
        "Write-S3CBucketVersioning/VersioningConfiguration_Status"
        {
            $v = "Enabled","Suspended"
            break
        }

        # Amazon.S3Control.Format
        "Write-S3CStorageLensConfiguration/S3BucketDestination_Format"
        {
            $v = "CSV","Parquet"
            break
        }

        # Amazon.S3Control.GeneratedManifestFormat
        "New-S3CJob/ManifestOutputLocation_ManifestFormat"
        {
            $v = "S3InventoryReport_CSV_20211130"
            break
        }

        # Amazon.S3Control.GranteeType
        {
            ($_ -eq "New-S3CAccessGrant/Grantee_GranteeType") -Or
            ($_ -eq "Get-S3CAccessGrantList/GranteeType")
        }
        {
            $v = "DIRECTORY_GROUP","DIRECTORY_USER","IAM"
            break
        }

        # Amazon.S3Control.JobManifestFormat
        "New-S3CJob/Spec_Format"
        {
            $v = "S3BatchOperations_CSV_20180820","S3InventoryReport_CSV_20161130"
            break
        }

        # Amazon.S3Control.JobReportFormat
        "New-S3CJob/Report_Format"
        {
            $v = "Report_CSV_20180820"
            break
        }

        # Amazon.S3Control.JobReportScope
        "New-S3CJob/Report_ReportScope"
        {
            $v = "AllTasks","FailedTasksOnly"
            break
        }

        # Amazon.S3Control.MFADelete
        "Write-S3CBucketVersioning/VersioningConfiguration_MFADelete"
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.S3Control.OutputSchemaVersion
        "Write-S3CStorageLensConfiguration/S3BucketDestination_OutputSchemaVersion"
        {
            $v = "V_1"
            break
        }

        # Amazon.S3Control.Permission
        {
            ($_ -eq "Get-S3CAccessGrantList/Permission") -Or
            ($_ -eq "Get-S3CDataAccess/Permission") -Or
            ($_ -eq "New-S3CAccessGrant/Permission")
        }
        {
            $v = "READ","READWRITE","WRITE"
            break
        }

        # Amazon.S3Control.Privilege
        "Get-S3CDataAccess/Privilege"
        {
            $v = "Default","Minimal"
            break
        }

        # Amazon.S3Control.RequestedJobStatus
        "Update-S3CJobStatus/RequestedJobStatus"
        {
            $v = "Cancelled","Ready"
            break
        }

        # Amazon.S3Control.S3CannedAccessControlList
        {
            ($_ -eq "New-S3CJob/AccessControlPolicy_CannedAccessControlList") -Or
            ($_ -eq "New-S3CJob/S3PutObjectCopy_CannedAccessControlList")
        }
        {
            $v = "authenticated-read","aws-exec-read","bucket-owner-full-control","bucket-owner-read","private","public-read","public-read-write"
            break
        }

        # Amazon.S3Control.S3ChecksumAlgorithm
        "New-S3CJob/S3PutObjectCopy_ChecksumAlgorithm"
        {
            $v = "CRC32","CRC32C","SHA1","SHA256"
            break
        }

        # Amazon.S3Control.S3GlacierJobTier
        "New-S3CJob/S3InitiateRestoreObject_GlacierJobTier"
        {
            $v = "BULK","STANDARD"
            break
        }

        # Amazon.S3Control.S3MetadataDirective
        "New-S3CJob/S3PutObjectCopy_MetadataDirective"
        {
            $v = "COPY","REPLACE"
            break
        }

        # Amazon.S3Control.S3ObjectLockLegalHoldStatus
        {
            ($_ -eq "New-S3CJob/LegalHold_Status") -Or
            ($_ -eq "New-S3CJob/S3PutObjectCopy_ObjectLockLegalHoldStatus")
        }
        {
            $v = "OFF","ON"
            break
        }

        # Amazon.S3Control.S3ObjectLockMode
        "New-S3CJob/S3PutObjectCopy_ObjectLockMode"
        {
            $v = "COMPLIANCE","GOVERNANCE"
            break
        }

        # Amazon.S3Control.S3ObjectLockRetentionMode
        "New-S3CJob/Retention_Mode"
        {
            $v = "COMPLIANCE","GOVERNANCE"
            break
        }

        # Amazon.S3Control.S3PrefixType
        {
            ($_ -eq "New-S3CAccessGrant/S3PrefixType") -Or
            ($_ -eq "Get-S3CDataAccess/TargetType")
        }
        {
            $v = "Object"
            break
        }

        # Amazon.S3Control.S3SSEAlgorithm
        "New-S3CJob/NewObjectMetadata_SSEAlgorithm"
        {
            $v = "AES256","KMS"
            break
        }

        # Amazon.S3Control.S3StorageClass
        "New-S3CJob/S3PutObjectCopy_StorageClass"
        {
            $v = "DEEP_ARCHIVE","GLACIER","GLACIER_IR","INTELLIGENT_TIERING","ONEZONE_IA","STANDARD","STANDARD_IA"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$S3C_map = @{
    "AccessControlPolicy_CannedAccessControlList"=@("New-S3CJob")
    "ACL"=@("New-S3CBucket")
    "CreateBucketConfiguration_LocationConstraint"=@("New-S3CBucket")
    "Grantee_GranteeType"=@("New-S3CAccessGrant")
    "GranteeType"=@("Get-S3CAccessGrantList")
    "LegalHold_Status"=@("New-S3CJob")
    "ManifestOutputLocation_ManifestFormat"=@("New-S3CJob")
    "NewObjectMetadata_SSEAlgorithm"=@("New-S3CJob")
    "Permission"=@("Get-S3CAccessGrantList","Get-S3CDataAccess","New-S3CAccessGrant")
    "Privilege"=@("Get-S3CDataAccess")
    "Report_Format"=@("New-S3CJob")
    "Report_ReportScope"=@("New-S3CJob")
    "RequestedJobStatus"=@("Update-S3CJobStatus")
    "Retention_Mode"=@("New-S3CJob")
    "S3BucketDestination_Format"=@("Write-S3CStorageLensConfiguration")
    "S3BucketDestination_OutputSchemaVersion"=@("Write-S3CStorageLensConfiguration")
    "S3InitiateRestoreObject_GlacierJobTier"=@("New-S3CJob")
    "S3PrefixType"=@("New-S3CAccessGrant")
    "S3PutObjectCopy_CannedAccessControlList"=@("New-S3CJob")
    "S3PutObjectCopy_ChecksumAlgorithm"=@("New-S3CJob")
    "S3PutObjectCopy_MetadataDirective"=@("New-S3CJob")
    "S3PutObjectCopy_ObjectLockLegalHoldStatus"=@("New-S3CJob")
    "S3PutObjectCopy_ObjectLockMode"=@("New-S3CJob")
    "S3PutObjectCopy_StorageClass"=@("New-S3CJob")
    "Spec_Format"=@("New-S3CJob")
    "TargetType"=@("Get-S3CDataAccess")
    "VersioningConfiguration_MFADelete"=@("Write-S3CBucketVersioning")
    "VersioningConfiguration_Status"=@("Write-S3CBucketVersioning")
}

_awsArgumentCompleterRegistration $S3C_Completers $S3C_map

$S3C_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.S3C.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$S3C_SelectMap = @{
    "Select"=@("Connect-S3CAccessGrantsIdentityCenter",
               "New-S3CAccessGrant",
               "New-S3CAccessGrantsInstance",
               "New-S3CAccessGrantsLocation",
               "New-S3CAccessPoint",
               "New-S3CAccessPointForObjectLambda",
               "New-S3CBucket",
               "New-S3CJob",
               "New-S3CMultiRegionAccessPoint",
               "New-S3CStorageLensGroup",
               "Remove-S3CAccessGrant",
               "Remove-S3CAccessGrantsInstance",
               "Remove-S3CAccessGrantsInstanceResourcePolicy",
               "Remove-S3CAccessGrantsLocation",
               "Remove-S3CAccessPoint",
               "Remove-S3CAccessPointForObjectLambda",
               "Remove-S3CAccessPointPolicy",
               "Remove-S3CAccessPointPolicyForObjectLambda",
               "Remove-S3CBucket",
               "Remove-S3CBucketLifecycleConfiguration",
               "Remove-S3CBucketPolicy",
               "Remove-S3CBucketReplication",
               "Remove-S3CBucketTagging",
               "Remove-S3CJobTagging",
               "Remove-S3CMultiRegionAccessPoint",
               "Remove-S3CPublicAccessBlock",
               "Remove-S3CStorageLensConfiguration",
               "Remove-S3CStorageLensConfigurationTagging",
               "Remove-S3CStorageLensGroup",
               "Get-S3CJob",
               "Get-S3CMultiRegionAccessPointOperation",
               "Disconnect-S3CAccessGrantsIdentityCenter",
               "Get-S3CAccessGrant",
               "Get-S3CAccessGrantsInstance",
               "Get-S3CAccessGrantsInstanceForPrefix",
               "Get-S3CAccessGrantsInstanceResourcePolicy",
               "Get-S3CAccessGrantsLocation",
               "Get-S3CAccessPoint",
               "Get-S3CAccessPointConfigurationForObjectLambda",
               "Get-S3CAccessPointForObjectLambda",
               "Get-S3CAccessPointPolicy",
               "Get-S3CAccessPointPolicyForObjectLambda",
               "Get-S3CAccessPointPolicyStatus",
               "Get-S3CAccessPointPolicyStatusForObjectLambda",
               "Get-S3CBucket",
               "Get-S3CBucketLifecycleConfiguration",
               "Get-S3CBucketPolicy",
               "Get-S3CBucketReplication",
               "Get-S3CBucketTagging",
               "Get-S3CBucketVersioning",
               "Get-S3CDataAccess",
               "Get-S3CJobTagging",
               "Get-S3CMultiRegionAccessPoint",
               "Get-S3CMultiRegionAccessPointPolicy",
               "Get-S3CMultiRegionAccessPointPolicyStatus",
               "Get-S3CMultiRegionAccessPointRoute",
               "Get-S3CPublicAccessBlock",
               "Get-S3CStorageLensConfiguration",
               "Get-S3CStorageLensConfigurationTagging",
               "Get-S3CStorageLensGroup",
               "Get-S3CAccessGrantList",
               "Get-S3CAccessGrantsInstanceList",
               "Get-S3CAccessGrantsLocationList",
               "Get-S3CAccessPointList",
               "Get-S3CAccessPointsForObjectLambdaList",
               "Get-S3CCallerAccessGrantList",
               "Get-S3CJobList",
               "Get-S3CMultiRegionAccessPointList",
               "Get-S3CRegionalBucketList",
               "Get-S3CStorageLensConfigurationList",
               "Get-S3CStorageLensGroupList",
               "Get-S3CResourceTag",
               "Write-S3CAccessGrantsInstanceResourcePolicy",
               "Write-S3CAccessPointConfigurationForObjectLambda",
               "Write-S3CAccessPointPolicy",
               "Write-S3CAccessPointPolicyForObjectLambda",
               "Write-S3CBucketLifecycleConfiguration",
               "Write-S3CBucketPolicy",
               "Write-S3CBucketReplication",
               "Write-S3CBucketTagging",
               "Write-S3CBucketVersioning",
               "Add-S3CJobTagging",
               "Write-S3CMultiRegionAccessPointPolicy",
               "Add-S3CPublicAccessBlock",
               "Write-S3CStorageLensConfiguration",
               "Write-S3CStorageLensConfigurationTagging",
               "Submit-S3CMultiRegionAccessPointRoute",
               "Add-S3CResourceTag",
               "Remove-S3CResourceTag",
               "Update-S3CAccessGrantsLocation",
               "Update-S3CJobPriority",
               "Update-S3CJobStatus",
               "Update-S3CStorageLensGroup")
}

_awsArgumentCompleterRegistration $S3C_SelectCompleters $S3C_SelectMap
# Argument completions for service Amazon S3 Outposts


$S3O_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.S3Outposts.EndpointAccessType
        "New-S3OEndpoint/AccessType"
        {
            $v = "CustomerOwnedIp","Private"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$S3O_map = @{
    "AccessType"=@("New-S3OEndpoint")
}

_awsArgumentCompleterRegistration $S3O_Completers $S3O_map

$S3O_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.S3O.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$S3O_SelectMap = @{
    "Select"=@("New-S3OEndpoint",
               "Remove-S3OEndpoint",
               "Get-S3OEndpointList",
               "Get-S3OOutpostsWithS3List",
               "Get-S3OSharedEndpointList")
}

_awsArgumentCompleterRegistration $S3O_SelectCompleters $S3O_SelectMap
# Argument completions for service Amazon SageMaker Service


$SM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SageMaker.ActionStatus
        {
            ($_ -eq "New-SMAction/Status") -Or
            ($_ -eq "Update-SMAction/Status")
        }
        {
            $v = "Completed","Failed","InProgress","Stopped","Stopping","Unknown"
            break
        }

        # Amazon.SageMaker.AdditionalS3DataSourceDataType
        "New-SMAlgorithm/AdditionalS3DataSource_S3DataType"
        {
            $v = "S3Object","S3Prefix"
            break
        }

        # Amazon.SageMaker.AlgorithmSortBy
        "Get-SMAlgorithmList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.AppImageConfigSortKey
        "Get-SMAppImageConfigList/SortBy"
        {
            $v = "CreationTime","LastModifiedTime","Name"
            break
        }

        # Amazon.SageMaker.AppInstanceType
        {
            ($_ -eq "New-SMDomain/DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "Update-SMDomain/DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "New-SMDomain/DefaultSpaceSettings_JupyterLabAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "Update-SMDomain/DefaultSpaceSettings_JupyterLabAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "New-SMDomain/DefaultSpaceSettings_JupyterServerAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "Update-SMDomain/DefaultSpaceSettings_JupyterServerAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "New-SMDomain/DefaultSpaceSettings_KernelGatewayAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "Update-SMDomain/DefaultSpaceSettings_KernelGatewayAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "New-SMApp/ResourceSpec_InstanceType") -Or
            ($_ -eq "New-SMSpace/SpaceSettings_CodeEditorAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "Update-SMSpace/SpaceSettings_CodeEditorAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "New-SMSpace/SpaceSettings_JupyterLabAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "Update-SMSpace/SpaceSettings_JupyterLabAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "New-SMSpace/SpaceSettings_JupyterServerAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "Update-SMSpace/SpaceSettings_JupyterServerAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "New-SMSpace/SpaceSettings_KernelGatewayAppSettings_DefaultResourceSpec_InstanceType") -Or
            ($_ -eq "Update-SMSpace/SpaceSettings_KernelGatewayAppSettings_DefaultResourceSpec_InstanceType")
        }
        {
            $v = "ml.c5.12xlarge","ml.c5.18xlarge","ml.c5.24xlarge","ml.c5.2xlarge","ml.c5.4xlarge","ml.c5.9xlarge","ml.c5.large","ml.c5.xlarge","ml.c6i.12xlarge","ml.c6i.16xlarge","ml.c6i.24xlarge","ml.c6i.2xlarge","ml.c6i.32xlarge","ml.c6i.4xlarge","ml.c6i.8xlarge","ml.c6i.large","ml.c6i.xlarge","ml.c6id.12xlarge","ml.c6id.16xlarge","ml.c6id.24xlarge","ml.c6id.2xlarge","ml.c6id.32xlarge","ml.c6id.4xlarge","ml.c6id.8xlarge","ml.c6id.large","ml.c6id.xlarge","ml.c7i.12xlarge","ml.c7i.16xlarge","ml.c7i.24xlarge","ml.c7i.2xlarge","ml.c7i.48xlarge","ml.c7i.4xlarge","ml.c7i.8xlarge","ml.c7i.large","ml.c7i.xlarge","ml.g4dn.12xlarge","ml.g4dn.16xlarge","ml.g4dn.2xlarge","ml.g4dn.4xlarge","ml.g4dn.8xlarge","ml.g4dn.xlarge","ml.g5.12xlarge","ml.g5.16xlarge","ml.g5.24xlarge","ml.g5.2xlarge","ml.g5.48xlarge","ml.g5.4xlarge","ml.g5.8xlarge","ml.g5.xlarge","ml.g6.12xlarge","ml.g6.16xlarge","ml.g6.24xlarge","ml.g6.2xlarge","ml.g6.48xlarge","ml.g6.4xlarge","ml.g6.8xlarge","ml.g6.xlarge","ml.g6e.12xlarge","ml.g6e.16xlarge","ml.g6e.24xlarge","ml.g6e.2xlarge","ml.g6e.48xlarge","ml.g6e.4xlarge","ml.g6e.8xlarge","ml.g6e.xlarge","ml.geospatial.interactive","ml.m5.12xlarge","ml.m5.16xlarge","ml.m5.24xlarge","ml.m5.2xlarge","ml.m5.4xlarge","ml.m5.8xlarge","ml.m5.large","ml.m5.xlarge","ml.m5d.12xlarge","ml.m5d.16xlarge","ml.m5d.24xlarge","ml.m5d.2xlarge","ml.m5d.4xlarge","ml.m5d.8xlarge","ml.m5d.large","ml.m5d.xlarge","ml.m6i.12xlarge","ml.m6i.16xlarge","ml.m6i.24xlarge","ml.m6i.2xlarge","ml.m6i.32xlarge","ml.m6i.4xlarge","ml.m6i.8xlarge","ml.m6i.large","ml.m6i.xlarge","ml.m6id.12xlarge","ml.m6id.16xlarge","ml.m6id.24xlarge","ml.m6id.2xlarge","ml.m6id.32xlarge","ml.m6id.4xlarge","ml.m6id.8xlarge","ml.m6id.large","ml.m6id.xlarge","ml.m7i.12xlarge","ml.m7i.16xlarge","ml.m7i.24xlarge","ml.m7i.2xlarge","ml.m7i.48xlarge","ml.m7i.4xlarge","ml.m7i.8xlarge","ml.m7i.large","ml.m7i.xlarge","ml.p3.16xlarge","ml.p3.2xlarge","ml.p3.8xlarge","ml.p3dn.24xlarge","ml.p4d.24xlarge","ml.p4de.24xlarge","ml.p5.48xlarge","ml.r5.12xlarge","ml.r5.16xlarge","ml.r5.24xlarge","ml.r5.2xlarge","ml.r5.4xlarge","ml.r5.8xlarge","ml.r5.large","ml.r5.xlarge","ml.r6i.12xlarge","ml.r6i.16xlarge","ml.r6i.24xlarge","ml.r6i.2xlarge","ml.r6i.32xlarge","ml.r6i.4xlarge","ml.r6i.8xlarge","ml.r6i.large","ml.r6i.xlarge","ml.r6id.12xlarge","ml.r6id.16xlarge","ml.r6id.24xlarge","ml.r6id.2xlarge","ml.r6id.32xlarge","ml.r6id.4xlarge","ml.r6id.8xlarge","ml.r6id.large","ml.r6id.xlarge","ml.r7i.12xlarge","ml.r7i.16xlarge","ml.r7i.24xlarge","ml.r7i.2xlarge","ml.r7i.48xlarge","ml.r7i.4xlarge","ml.r7i.8xlarge","ml.r7i.large","ml.r7i.xlarge","ml.t3.2xlarge","ml.t3.large","ml.t3.medium","ml.t3.micro","ml.t3.small","ml.t3.xlarge","ml.trn1.2xlarge","ml.trn1.32xlarge","ml.trn1n.32xlarge","system"
            break
        }

        # Amazon.SageMaker.AppNetworkAccessType
        {
            ($_ -eq "New-SMDomain/AppNetworkAccessType") -Or
            ($_ -eq "Update-SMDomain/AppNetworkAccessType")
        }
        {
            $v = "PublicInternetOnly","VpcOnly"
            break
        }

        # Amazon.SageMaker.AppSecurityGroupManagement
        {
            ($_ -eq "New-SMDomain/AppSecurityGroupManagement") -Or
            ($_ -eq "Update-SMDomain/AppSecurityGroupManagement")
        }
        {
            $v = "Customer","Service"
            break
        }

        # Amazon.SageMaker.AppSortKey
        "Get-SMAppList/SortBy"
        {
            $v = "CreationTime"
            break
        }

        # Amazon.SageMaker.AppType
        {
            ($_ -eq "Get-SMApp/AppType") -Or
            ($_ -eq "New-SMApp/AppType") -Or
            ($_ -eq "Remove-SMApp/AppType") -Or
            ($_ -eq "New-SMSpace/SpaceSettings_AppType") -Or
            ($_ -eq "Update-SMSpace/SpaceSettings_AppType")
        }
        {
            $v = "Canvas","CodeEditor","DetailedProfiler","JupyterLab","JupyterServer","KernelGateway","RSessionGateway","RStudioServerPro","TensorBoard"
            break
        }

        # Amazon.SageMaker.AssemblyType
        "New-SMTransformJob/TransformOutput_AssembleWith"
        {
            $v = "Line","None"
            break
        }

        # Amazon.SageMaker.AssociationEdgeType
        {
            ($_ -eq "Add-SMAssociation/AssociationType") -Or
            ($_ -eq "Get-SMAssociationList/AssociationType")
        }
        {
            $v = "AssociatedWith","ContributedTo","DerivedFrom","Produced","SameAs"
            break
        }

        # Amazon.SageMaker.AuthMode
        "New-SMDomain/AuthMode"
        {
            $v = "IAM","SSO"
            break
        }

        # Amazon.SageMaker.AutoMLJobStatus
        "Get-SMAutoMLJobList/StatusEqual"
        {
            $v = "Completed","Failed","InProgress","Stopped","Stopping"
            break
        }

        # Amazon.SageMaker.AutoMLMetricEnum
        {
            ($_ -eq "New-SMAutoMLJob/AutoMLJobObjective_MetricName") -Or
            ($_ -eq "New-SMAutoMLJobV2/AutoMLJobObjective_MetricName")
        }
        {
            $v = "Accuracy","AUC","AverageWeightedQuantileLoss","BalancedAccuracy","F1","F1macro","MAE","MAPE","MASE","MSE","Precision","PrecisionMacro","R2","Recall","RecallMacro","RMSE","WAPE"
            break
        }

        # Amazon.SageMaker.AutoMLMode
        {
            ($_ -eq "New-SMAutoMLJob/AutoMLJobConfig_Mode") -Or
            ($_ -eq "New-SMAutoMLJobV2/TabularJobConfig_Mode")
        }
        {
            $v = "AUTO","ENSEMBLING","HYPERPARAMETER_TUNING"
            break
        }

        # Amazon.SageMaker.AutoMLSortBy
        "Get-SMAutoMLJobList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.AutoMLSortOrder
        {
            ($_ -eq "Get-SMAutoMLJobList/SortOrder") -Or
            ($_ -eq "Get-SMCandidatesForAutoMLJobList/SortOrder")
        }
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.AutotuneMode
        "New-SMHyperParameterTuningJob/Autotune_Mode"
        {
            $v = "Enabled"
            break
        }

        # Amazon.SageMaker.AwsManagedHumanLoopRequestSource
        "New-SMFlowDefinition/HumanLoopRequestSource_AwsManagedHumanLoopRequestSource"
        {
            $v = "AWS/Rekognition/DetectModerationLabels/Image/V3","AWS/Textract/AnalyzeDocument/Forms/V1"
            break
        }

        # Amazon.SageMaker.BatchStrategy
        "New-SMTransformJob/BatchStrategy"
        {
            $v = "MultiRecord","SingleRecord"
            break
        }

        # Amazon.SageMaker.BooleanOperator
        "Search-SMResource/SearchExpression_Operator"
        {
            $v = "And","Or"
            break
        }

        # Amazon.SageMaker.CandidateSortBy
        "Get-SMCandidatesForAutoMLJobList/SortBy"
        {
            $v = "CreationTime","FinalObjectiveMetricValue","Status"
            break
        }

        # Amazon.SageMaker.CandidateStatus
        "Get-SMCandidatesForAutoMLJobList/StatusEqual"
        {
            $v = "Completed","Failed","InProgress","Stopped","Stopping"
            break
        }

        # Amazon.SageMaker.CapacitySizeType
        {
            ($_ -eq "New-SMEndpoint/CanarySize_Type") -Or
            ($_ -eq "Update-SMEndpoint/CanarySize_Type") -Or
            ($_ -eq "New-SMEndpoint/LinearStepSize_Type") -Or
            ($_ -eq "Update-SMEndpoint/LinearStepSize_Type") -Or
            ($_ -eq "New-SMEndpoint/MaximumBatchSize_Type") -Or
            ($_ -eq "Update-SMEndpoint/MaximumBatchSize_Type") -Or
            ($_ -eq "New-SMEndpoint/RollbackMaximumBatchSize_Type") -Or
            ($_ -eq "Update-SMEndpoint/RollbackMaximumBatchSize_Type")
        }
        {
            $v = "CAPACITY_PERCENT","INSTANCE_COUNT"
            break
        }

        # Amazon.SageMaker.ClarifyTextGranularity
        "New-SMEndpointConfig/TextConfig_Granularity"
        {
            $v = "paragraph","sentence","token"
            break
        }

        # Amazon.SageMaker.ClarifyTextLanguage
        "New-SMEndpointConfig/TextConfig_Language"
        {
            $v = "af","ar","bg","bn","ca","cs","da","de","el","en","es","et","eu","fa","fi","fr","ga","gu","he","hi","hr","hu","hy","id","is","it","kn","ky","lb","lij","lt","lv","mk","ml","mr","nb","ne","nl","pl","pt","ro","ru","sa","si","sk","sl","sq","sr","sv","ta","te","tl","tn","tr","tt","uk","ur","xx","yo","zh"
            break
        }

        # Amazon.SageMaker.ClusterNodeRecovery
        {
            ($_ -eq "New-SMCluster/NodeRecovery") -Or
            ($_ -eq "Update-SMCluster/NodeRecovery")
        }
        {
            $v = "Automatic","None"
            break
        }

        # Amazon.SageMaker.ClusterSortBy
        {
            ($_ -eq "Get-SMClusterList/SortBy") -Or
            ($_ -eq "Get-SMClusterNodeList/SortBy")
        }
        {
            $v = "CREATION_TIME","NAME"
            break
        }

        # Amazon.SageMaker.CodeRepositorySortBy
        "Get-SMCodeRepositoryList/SortBy"
        {
            $v = "CreationTime","LastModifiedTime","Name"
            break
        }

        # Amazon.SageMaker.CodeRepositorySortOrder
        "Get-SMCodeRepositoryList/SortOrder"
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.CompilationJobStatus
        "Get-SMCompilationJobList/StatusEqual"
        {
            $v = "COMPLETED","FAILED","INPROGRESS","STARTING","STOPPED","STOPPING"
            break
        }

        # Amazon.SageMaker.CompleteOnConvergence
        "New-SMHyperParameterTuningJob/ConvergenceDetected_CompleteOnConvergence"
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.SageMaker.CompressionType
        {
            ($_ -eq "New-SMAlgorithm/AdditionalS3DataSource_CompressionType") -Or
            ($_ -eq "New-SMTransformJob/TransformInput_CompressionType")
        }
        {
            $v = "Gzip","None"
            break
        }

        # Amazon.SageMaker.CrossAccountFilterOption
        {
            ($_ -eq "Get-SMModelPackageGroupList/CrossAccountFilterOption") -Or
            ($_ -eq "Search-SMResource/CrossAccountFilterOption")
        }
        {
            $v = "CrossAccount","SameAccount"
            break
        }

        # Amazon.SageMaker.DirectInternetAccess
        "New-SMNotebookInstance/DirectInternetAccess"
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.SageMaker.Direction
        "Find-SMLineage/Direction"
        {
            $v = "Ascendants","Both","Descendants"
            break
        }

        # Amazon.SageMaker.EdgePackagingJobStatus
        "Get-SMEdgePackagingJobList/StatusEqual"
        {
            $v = "COMPLETED","FAILED","INPROGRESS","STARTING","STOPPED","STOPPING"
            break
        }

        # Amazon.SageMaker.EdgePresetDeploymentType
        {
            ($_ -eq "New-SMDeviceFleet/OutputConfig_PresetDeploymentType") -Or
            ($_ -eq "New-SMEdgePackagingJob/OutputConfig_PresetDeploymentType") -Or
            ($_ -eq "Update-SMDeviceFleet/OutputConfig_PresetDeploymentType")
        }
        {
            $v = "GreengrassV2Component"
            break
        }

        # Amazon.SageMaker.EnabledOrDisabled
        {
            ($_ -eq "New-SMWorkteam/IamPolicyConstraints_SourceIp") -Or
            ($_ -eq "Update-SMWorkteam/IamPolicyConstraints_SourceIp") -Or
            ($_ -eq "New-SMWorkteam/IamPolicyConstraints_VpcSourceIp") -Or
            ($_ -eq "Update-SMWorkteam/IamPolicyConstraints_VpcSourceIp")
        }
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.SageMaker.EndpointConfigSortKey
        "Get-SMConfigList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.EndpointSortKey
        "Get-SMEndpointList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.EndpointStatus
        "Get-SMEndpointList/StatusEqual"
        {
            $v = "Creating","Deleting","Failed","InService","OutOfService","RollingBack","SystemUpdating","UpdateRollbackFailed","Updating"
            break
        }

        # Amazon.SageMaker.ExecutionRoleIdentityConfig
        {
            ($_ -eq "New-SMDomain/DomainSettings_ExecutionRoleIdentityConfig") -Or
            ($_ -eq "Update-SMDomain/DomainSettingsForUpdate_ExecutionRoleIdentityConfig")
        }
        {
            $v = "DISABLED","USER_PROFILE_NAME"
            break
        }

        # Amazon.SageMaker.ExecutionStatus
        "Get-SMMonitoringExecutionList/StatusEqual"
        {
            $v = "Completed","CompletedWithViolations","Failed","InProgress","Pending","Stopped","Stopping"
            break
        }

        # Amazon.SageMaker.FeatureGroupSortBy
        "Get-SMFeatureGroupList/SortBy"
        {
            $v = "CreationTime","FeatureGroupStatus","Name","OfflineStoreStatus"
            break
        }

        # Amazon.SageMaker.FeatureGroupSortOrder
        "Get-SMFeatureGroupList/SortOrder"
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.FeatureGroupStatus
        "Get-SMFeatureGroupList/FeatureGroupStatusEqual"
        {
            $v = "Created","CreateFailed","Creating","DeleteFailed","Deleting"
            break
        }

        # Amazon.SageMaker.FeatureStatus
        {
            ($_ -eq "New-SMDomain/AmazonQSettings_Status") -Or
            ($_ -eq "Update-SMDomain/AmazonQSettings_Status") -Or
            ($_ -eq "New-SMDomain/DockerSettings_EnableDockerAccess") -Or
            ($_ -eq "Update-SMDomain/DockerSettings_EnableDockerAccess")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.SageMaker.FlatInvocations
        "New-SMInferenceRecommendationsJob/StoppingConditions_FlatInvocation"
        {
            $v = "Continue","Stop"
            break
        }

        # Amazon.SageMaker.Framework
        "New-SMCompilationJob/InputConfig_Framework"
        {
            $v = "DARKNET","KERAS","MXNET","ONNX","PYTORCH","SKLEARN","TENSORFLOW","TFLITE","XGBOOST"
            break
        }

        # Amazon.SageMaker.HubContentSortBy
        {
            ($_ -eq "Get-SMHubContentList/SortBy") -Or
            ($_ -eq "Get-SMHubContentVersionList/SortBy")
        }
        {
            $v = "CreationTime","HubContentName","HubContentStatus"
            break
        }

        # Amazon.SageMaker.HubContentType
        {
            ($_ -eq "Get-SMHubContent/HubContentType") -Or
            ($_ -eq "Get-SMHubContentList/HubContentType") -Or
            ($_ -eq "Get-SMHubContentVersionList/HubContentType") -Or
            ($_ -eq "Import-SMHubContent/HubContentType") -Or
            ($_ -eq "Remove-SMHubContent/HubContentType") -Or
            ($_ -eq "Remove-SMHubContentReference/HubContentType")
        }
        {
            $v = "Model","ModelReference","Notebook"
            break
        }

        # Amazon.SageMaker.HubSortBy
        "Get-SMHubList/SortBy"
        {
            $v = "AccountIdOwner","CreationTime","HubName","HubStatus"
            break
        }

        # Amazon.SageMaker.HyperParameterTuningAllocationStrategy
        "New-SMHyperParameterTuningJob/HyperParameterTuningResourceConfig_AllocationStrategy"
        {
            $v = "Prioritized"
            break
        }

        # Amazon.SageMaker.HyperParameterTuningJobObjectiveType
        {
            ($_ -eq "New-SMHyperParameterTuningJob/HyperParameterTuningJobObjective_Type") -Or
            ($_ -eq "New-SMHyperParameterTuningJob/TuningObjective_Type")
        }
        {
            $v = "Maximize","Minimize"
            break
        }

        # Amazon.SageMaker.HyperParameterTuningJobSortByOptions
        "Get-SMHyperParameterTuningJobList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.HyperParameterTuningJobStatus
        "Get-SMHyperParameterTuningJobList/StatusEqual"
        {
            $v = "Completed","DeleteFailed","Deleting","Failed","InProgress","Stopped","Stopping"
            break
        }

        # Amazon.SageMaker.HyperParameterTuningJobStrategyType
        "New-SMHyperParameterTuningJob/HyperParameterTuningJobConfig_Strategy"
        {
            $v = "Bayesian","Grid","Hyperband","Random"
            break
        }

        # Amazon.SageMaker.HyperParameterTuningJobWarmStartType
        "New-SMHyperParameterTuningJob/WarmStartConfig_WarmStartType"
        {
            $v = "IdenticalDataAndAlgorithm","TransferLearning"
            break
        }

        # Amazon.SageMaker.ImageSortBy
        "Get-SMImageList/SortBy"
        {
            $v = "CREATION_TIME","IMAGE_NAME","LAST_MODIFIED_TIME"
            break
        }

        # Amazon.SageMaker.ImageSortOrder
        "Get-SMImageList/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.SageMaker.ImageVersionSortBy
        "Get-SMImageVersionList/SortBy"
        {
            $v = "CREATION_TIME","LAST_MODIFIED_TIME","VERSION"
            break
        }

        # Amazon.SageMaker.ImageVersionSortOrder
        "Get-SMImageVersionList/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.SageMaker.InferenceComponentSortKey
        "Get-SMInferenceComponentList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.InferenceComponentStatus
        "Get-SMInferenceComponentList/StatusEqual"
        {
            $v = "Creating","Deleting","Failed","InService","Updating"
            break
        }

        # Amazon.SageMaker.InferenceExecutionMode
        "New-SMModel/InferenceExecutionConfig_Mode"
        {
            $v = "Direct","Serial"
            break
        }

        # Amazon.SageMaker.InferenceExperimentStatus
        "Get-SMInferenceExperimentList/StatusEqual"
        {
            $v = "Cancelled","Completed","Created","Creating","Running","Starting","Stopping","Updating"
            break
        }

        # Amazon.SageMaker.InferenceExperimentStopDesiredState
        "Stop-SMInferenceExperiment/DesiredState"
        {
            $v = "Cancelled","Completed"
            break
        }

        # Amazon.SageMaker.InferenceExperimentType
        {
            ($_ -eq "Get-SMInferenceExperimentList/Type") -Or
            ($_ -eq "New-SMInferenceExperiment/Type")
        }
        {
            $v = "ShadowMode"
            break
        }

        # Amazon.SageMaker.InstanceType
        {
            ($_ -eq "New-SMNotebookInstance/InstanceType") -Or
            ($_ -eq "Update-SMNotebookInstance/InstanceType")
        }
        {
            $v = "ml.c4.2xlarge","ml.c4.4xlarge","ml.c4.8xlarge","ml.c4.xlarge","ml.c5.18xlarge","ml.c5.2xlarge","ml.c5.4xlarge","ml.c5.9xlarge","ml.c5.xlarge","ml.c5d.18xlarge","ml.c5d.2xlarge","ml.c5d.4xlarge","ml.c5d.9xlarge","ml.c5d.xlarge","ml.c6i.12xlarge","ml.c6i.16xlarge","ml.c6i.24xlarge","ml.c6i.2xlarge","ml.c6i.32xlarge","ml.c6i.4xlarge","ml.c6i.8xlarge","ml.c6i.large","ml.c6i.xlarge","ml.c6id.12xlarge","ml.c6id.16xlarge","ml.c6id.24xlarge","ml.c6id.2xlarge","ml.c6id.32xlarge","ml.c6id.4xlarge","ml.c6id.8xlarge","ml.c6id.large","ml.c6id.xlarge","ml.c7i.12xlarge","ml.c7i.16xlarge","ml.c7i.24xlarge","ml.c7i.2xlarge","ml.c7i.48xlarge","ml.c7i.4xlarge","ml.c7i.8xlarge","ml.c7i.large","ml.c7i.xlarge","ml.g4dn.12xlarge","ml.g4dn.16xlarge","ml.g4dn.2xlarge","ml.g4dn.4xlarge","ml.g4dn.8xlarge","ml.g4dn.xlarge","ml.g5.12xlarge","ml.g5.16xlarge","ml.g5.24xlarge","ml.g5.2xlarge","ml.g5.48xlarge","ml.g5.4xlarge","ml.g5.8xlarge","ml.g5.xlarge","ml.g6.12xlarge","ml.g6.16xlarge","ml.g6.24xlarge","ml.g6.2xlarge","ml.g6.48xlarge","ml.g6.4xlarge","ml.g6.8xlarge","ml.g6.xlarge","ml.inf1.24xlarge","ml.inf1.2xlarge","ml.inf1.6xlarge","ml.inf1.xlarge","ml.m4.10xlarge","ml.m4.16xlarge","ml.m4.2xlarge","ml.m4.4xlarge","ml.m4.xlarge","ml.m5.12xlarge","ml.m5.24xlarge","ml.m5.2xlarge","ml.m5.4xlarge","ml.m5.xlarge","ml.m5d.12xlarge","ml.m5d.16xlarge","ml.m5d.24xlarge","ml.m5d.2xlarge","ml.m5d.4xlarge","ml.m5d.8xlarge","ml.m5d.large","ml.m5d.xlarge","ml.m6i.12xlarge","ml.m6i.16xlarge","ml.m6i.24xlarge","ml.m6i.2xlarge","ml.m6i.32xlarge","ml.m6i.4xlarge","ml.m6i.8xlarge","ml.m6i.large","ml.m6i.xlarge","ml.m6id.12xlarge","ml.m6id.16xlarge","ml.m6id.24xlarge","ml.m6id.2xlarge","ml.m6id.32xlarge","ml.m6id.4xlarge","ml.m6id.8xlarge","ml.m6id.large","ml.m6id.xlarge","ml.m7i.12xlarge","ml.m7i.16xlarge","ml.m7i.24xlarge","ml.m7i.2xlarge","ml.m7i.48xlarge","ml.m7i.4xlarge","ml.m7i.8xlarge","ml.m7i.large","ml.m7i.xlarge","ml.p2.16xlarge","ml.p2.8xlarge","ml.p2.xlarge","ml.p3.16xlarge","ml.p3.2xlarge","ml.p3.8xlarge","ml.p3dn.24xlarge","ml.p4d.24xlarge","ml.p4de.24xlarge","ml.p5.48xlarge","ml.r5.12xlarge","ml.r5.16xlarge","ml.r5.24xlarge","ml.r5.2xlarge","ml.r5.4xlarge","ml.r5.8xlarge","ml.r5.large","ml.r5.xlarge","ml.r6i.12xlarge","ml.r6i.16xlarge","ml.r6i.24xlarge","ml.r6i.2xlarge","ml.r6i.32xlarge","ml.r6i.4xlarge","ml.r6i.8xlarge","ml.r6i.large","ml.r6i.xlarge","ml.r6id.12xlarge","ml.r6id.16xlarge","ml.r6id.24xlarge","ml.r6id.2xlarge","ml.r6id.32xlarge","ml.r6id.4xlarge","ml.r6id.8xlarge","ml.r6id.large","ml.r6id.xlarge","ml.r7i.12xlarge","ml.r7i.16xlarge","ml.r7i.24xlarge","ml.r7i.2xlarge","ml.r7i.48xlarge","ml.r7i.4xlarge","ml.r7i.8xlarge","ml.r7i.large","ml.r7i.xlarge","ml.t2.2xlarge","ml.t2.large","ml.t2.medium","ml.t2.xlarge","ml.t3.2xlarge","ml.t3.large","ml.t3.medium","ml.t3.xlarge"
            break
        }

        # Amazon.SageMaker.JobType
        {
            ($_ -eq "New-SMImageVersion/JobType") -Or
            ($_ -eq "Update-SMImageVersion/JobType")
        }
        {
            $v = "INFERENCE","NOTEBOOK_KERNEL","TRAINING"
            break
        }

        # Amazon.SageMaker.JoinSource
        "New-SMTransformJob/DataProcessing_JoinSource"
        {
            $v = "Input","None"
            break
        }

        # Amazon.SageMaker.LabelingJobStatus
        "Get-SMLabelingJobList/StatusEqual"
        {
            $v = "Completed","Failed","Initializing","InProgress","Stopped","Stopping"
            break
        }

        # Amazon.SageMaker.LifecycleManagement
        {
            ($_ -eq "New-SMDomain/IdleSettings_LifecycleManagement") -Or
            ($_ -eq "Update-SMDomain/IdleSettings_LifecycleManagement")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.SageMaker.ListCompilationJobsSortBy
        "Get-SMCompilationJobList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.ListDeviceFleetsSortBy
        "Get-SMDeviceFleetList/SortBy"
        {
            $v = "CREATION_TIME","LAST_MODIFIED_TIME","NAME"
            break
        }

        # Amazon.SageMaker.ListEdgeDeploymentPlansSortBy
        "Get-SMEdgeDeploymentPlanList/SortBy"
        {
            $v = "CREATION_TIME","DEVICE_FLEET_NAME","LAST_MODIFIED_TIME","NAME"
            break
        }

        # Amazon.SageMaker.ListEdgePackagingJobsSortBy
        "Get-SMEdgePackagingJobList/SortBy"
        {
            $v = "CREATION_TIME","LAST_MODIFIED_TIME","MODEL_NAME","NAME","STATUS"
            break
        }

        # Amazon.SageMaker.ListInferenceRecommendationsJobsSortBy
        "Get-SMInferenceRecommendationsJobList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.ListLabelingJobsForWorkteamSortByOptions
        "Get-SMLabelingJobListForWorkteam/SortBy"
        {
            $v = "CreationTime"
            break
        }

        # Amazon.SageMaker.ListOptimizationJobsSortBy
        "Get-SMOptimizationJobList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.ListWorkforcesSortByOptions
        "Get-SMWorkforceList/SortBy"
        {
            $v = "CreateDate","Name"
            break
        }

        # Amazon.SageMaker.ListWorkteamsSortByOptions
        "Get-SMWorkteamList/SortBy"
        {
            $v = "CreateDate","Name"
            break
        }

        # Amazon.SageMaker.ModelApprovalStatus
        {
            ($_ -eq "Get-SMModelPackageList/ModelApprovalStatus") -Or
            ($_ -eq "New-SMModelPackage/ModelApprovalStatus") -Or
            ($_ -eq "Update-SMModelPackage/ModelApprovalStatus")
        }
        {
            $v = "Approved","PendingManualApproval","Rejected"
            break
        }

        # Amazon.SageMaker.ModelCardExportJobSortBy
        "Get-SMModelCardExportJobList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.ModelCardExportJobSortOrder
        "Get-SMModelCardExportJobList/SortOrder"
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.ModelCardExportJobStatus
        "Get-SMModelCardExportJobList/StatusEqual"
        {
            $v = "Completed","Failed","InProgress"
            break
        }

        # Amazon.SageMaker.ModelCardSortBy
        "Get-SMModelCardList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.ModelCardSortOrder
        {
            ($_ -eq "Get-SMModelCardList/SortOrder") -Or
            ($_ -eq "Get-SMModelCardVersionList/SortOrder")
        }
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.ModelCardStatus
        {
            ($_ -eq "New-SMModelPackage/ModelCard_ModelCardStatus") -Or
            ($_ -eq "Update-SMModelPackage/ModelCard_ModelCardStatus") -Or
            ($_ -eq "Get-SMModelCardList/ModelCardStatus") -Or
            ($_ -eq "Get-SMModelCardVersionList/ModelCardStatus") -Or
            ($_ -eq "New-SMModelCard/ModelCardStatus") -Or
            ($_ -eq "Update-SMModelCard/ModelCardStatus")
        }
        {
            $v = "Approved","Archived","Draft","PendingReview"
            break
        }

        # Amazon.SageMaker.ModelCardVersionSortBy
        "Get-SMModelCardVersionList/SortBy"
        {
            $v = "Version"
            break
        }

        # Amazon.SageMaker.ModelPackageGroupSortBy
        "Get-SMModelPackageGroupList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.ModelPackageSortBy
        "Get-SMModelPackageList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.ModelPackageType
        "Get-SMModelPackageList/ModelPackageType"
        {
            $v = "Both","Unversioned","Versioned"
            break
        }

        # Amazon.SageMaker.ModelSortKey
        "Get-SMModelList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.MonitoringAlertHistorySortKey
        "Get-SMMonitoringAlertHistoryList/SortBy"
        {
            $v = "CreationTime","Status"
            break
        }

        # Amazon.SageMaker.MonitoringAlertStatus
        "Get-SMMonitoringAlertHistoryList/StatusEqual"
        {
            $v = "InAlert","OK"
            break
        }

        # Amazon.SageMaker.MonitoringExecutionSortKey
        "Get-SMMonitoringExecutionList/SortBy"
        {
            $v = "CreationTime","ScheduledTime","Status"
            break
        }

        # Amazon.SageMaker.MonitoringJobDefinitionSortKey
        {
            ($_ -eq "Get-SMDataQualityJobDefinitionList/SortBy") -Or
            ($_ -eq "Get-SMModelBiasJobDefinitionList/SortBy") -Or
            ($_ -eq "Get-SMModelExplainabilityJobDefinitionList/SortBy") -Or
            ($_ -eq "Get-SMModelQualityJobDefinitionList/SortBy")
        }
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.MonitoringProblemType
        "New-SMModelQualityJobDefinition/ModelQualityAppSpecification_ProblemType"
        {
            $v = "BinaryClassification","MulticlassClassification","Regression"
            break
        }

        # Amazon.SageMaker.MonitoringScheduleSortKey
        "Get-SMMonitoringScheduleList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.MonitoringType
        {
            ($_ -eq "Get-SMMonitoringExecutionList/MonitoringTypeEqual") -Or
            ($_ -eq "Get-SMMonitoringScheduleList/MonitoringTypeEqual")
        }
        {
            $v = "DataQuality","ModelBias","ModelExplainability","ModelQuality"
            break
        }

        # Amazon.SageMaker.NotebookInstanceLifecycleConfigSortKey
        "Get-SMNotebookInstanceLifecycleConfigList/SortBy"
        {
            $v = "CreationTime","LastModifiedTime","Name"
            break
        }

        # Amazon.SageMaker.NotebookInstanceLifecycleConfigSortOrder
        "Get-SMNotebookInstanceLifecycleConfigList/SortOrder"
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.NotebookInstanceSortKey
        "Get-SMNotebookInstanceList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.NotebookInstanceSortOrder
        "Get-SMNotebookInstanceList/SortOrder"
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.NotebookInstanceStatus
        "Get-SMNotebookInstanceList/StatusEqual"
        {
            $v = "Deleting","Failed","InService","Pending","Stopped","Stopping","Updating"
            break
        }

        # Amazon.SageMaker.OfflineStoreStatusValue
        "Get-SMFeatureGroupList/OfflineStoreStatusEqual"
        {
            $v = "Active","Blocked","Disabled"
            break
        }

        # Amazon.SageMaker.OptimizationJobDeploymentInstanceType
        "New-SMOptimizationJob/DeploymentInstanceType"
        {
            $v = "ml.g5.12xlarge","ml.g5.16xlarge","ml.g5.24xlarge","ml.g5.2xlarge","ml.g5.48xlarge","ml.g5.4xlarge","ml.g5.8xlarge","ml.g5.xlarge","ml.g6.12xlarge","ml.g6.16xlarge","ml.g6.24xlarge","ml.g6.2xlarge","ml.g6.48xlarge","ml.g6.4xlarge","ml.g6.8xlarge","ml.g6.xlarge","ml.inf2.24xlarge","ml.inf2.48xlarge","ml.inf2.8xlarge","ml.inf2.xlarge","ml.p4d.24xlarge","ml.p4de.24xlarge","ml.p5.48xlarge","ml.trn1.2xlarge","ml.trn1.32xlarge","ml.trn1n.32xlarge"
            break
        }

        # Amazon.SageMaker.OptimizationJobStatus
        "Get-SMOptimizationJobList/StatusEqual"
        {
            $v = "COMPLETED","FAILED","INPROGRESS","STARTING","STOPPED","STOPPING"
            break
        }

        # Amazon.SageMaker.OrderKey
        {
            ($_ -eq "Get-SMConfigList/SortOrder") -Or
            ($_ -eq "Get-SMEndpointList/SortOrder") -Or
            ($_ -eq "Get-SMInferenceComponentList/SortOrder") -Or
            ($_ -eq "Get-SMModelList/SortOrder")
        }
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.ProblemType
        {
            ($_ -eq "New-SMAutoMLJob/ProblemType") -Or
            ($_ -eq "New-SMAutoMLJobV2/TabularJobConfig_ProblemType")
        }
        {
            $v = "BinaryClassification","MulticlassClassification","Regression"
            break
        }

        # Amazon.SageMaker.ProcessingInstanceType
        {
            ($_ -eq "New-SMDataQualityJobDefinition/ClusterConfig_InstanceType") -Or
            ($_ -eq "New-SMModelBiasJobDefinition/ClusterConfig_InstanceType") -Or
            ($_ -eq "New-SMModelExplainabilityJobDefinition/ClusterConfig_InstanceType") -Or
            ($_ -eq "New-SMModelQualityJobDefinition/ClusterConfig_InstanceType") -Or
            ($_ -eq "New-SMProcessingJob/ClusterConfig_InstanceType")
        }
        {
            $v = "ml.c4.2xlarge","ml.c4.4xlarge","ml.c4.8xlarge","ml.c4.xlarge","ml.c5.18xlarge","ml.c5.2xlarge","ml.c5.4xlarge","ml.c5.9xlarge","ml.c5.xlarge","ml.g4dn.12xlarge","ml.g4dn.16xlarge","ml.g4dn.2xlarge","ml.g4dn.4xlarge","ml.g4dn.8xlarge","ml.g4dn.xlarge","ml.g5.12xlarge","ml.g5.16xlarge","ml.g5.24xlarge","ml.g5.2xlarge","ml.g5.48xlarge","ml.g5.4xlarge","ml.g5.8xlarge","ml.g5.xlarge","ml.m4.10xlarge","ml.m4.16xlarge","ml.m4.2xlarge","ml.m4.4xlarge","ml.m4.xlarge","ml.m5.12xlarge","ml.m5.24xlarge","ml.m5.2xlarge","ml.m5.4xlarge","ml.m5.large","ml.m5.xlarge","ml.p2.16xlarge","ml.p2.8xlarge","ml.p2.xlarge","ml.p3.16xlarge","ml.p3.2xlarge","ml.p3.8xlarge","ml.r5.12xlarge","ml.r5.16xlarge","ml.r5.24xlarge","ml.r5.2xlarge","ml.r5.4xlarge","ml.r5.8xlarge","ml.r5.large","ml.r5.xlarge","ml.r5d.12xlarge","ml.r5d.16xlarge","ml.r5d.24xlarge","ml.r5d.2xlarge","ml.r5d.4xlarge","ml.r5d.8xlarge","ml.r5d.large","ml.r5d.xlarge","ml.t3.2xlarge","ml.t3.large","ml.t3.medium","ml.t3.xlarge"
            break
        }

        # Amazon.SageMaker.ProcessingJobStatus
        "Get-SMProcessingJobList/StatusEqual"
        {
            $v = "Completed","Failed","InProgress","Stopped","Stopping"
            break
        }

        # Amazon.SageMaker.ProcessingS3DataDistributionType
        {
            ($_ -eq "New-SMDataQualityJobDefinition/BatchTransformInput_S3DataDistributionType") -Or
            ($_ -eq "New-SMModelBiasJobDefinition/BatchTransformInput_S3DataDistributionType") -Or
            ($_ -eq "New-SMModelExplainabilityJobDefinition/BatchTransformInput_S3DataDistributionType") -Or
            ($_ -eq "New-SMModelQualityJobDefinition/BatchTransformInput_S3DataDistributionType") -Or
            ($_ -eq "New-SMDataQualityJobDefinition/EndpointInput_S3DataDistributionType") -Or
            ($_ -eq "New-SMModelBiasJobDefinition/EndpointInput_S3DataDistributionType") -Or
            ($_ -eq "New-SMModelExplainabilityJobDefinition/EndpointInput_S3DataDistributionType") -Or
            ($_ -eq "New-SMModelQualityJobDefinition/EndpointInput_S3DataDistributionType")
        }
        {
            $v = "FullyReplicated","ShardedByS3Key"
            break
        }

        # Amazon.SageMaker.ProcessingS3InputMode
        {
            ($_ -eq "New-SMDataQualityJobDefinition/BatchTransformInput_S3InputMode") -Or
            ($_ -eq "New-SMModelBiasJobDefinition/BatchTransformInput_S3InputMode") -Or
            ($_ -eq "New-SMModelExplainabilityJobDefinition/BatchTransformInput_S3InputMode") -Or
            ($_ -eq "New-SMModelQualityJobDefinition/BatchTransformInput_S3InputMode") -Or
            ($_ -eq "New-SMDataQualityJobDefinition/EndpointInput_S3InputMode") -Or
            ($_ -eq "New-SMModelBiasJobDefinition/EndpointInput_S3InputMode") -Or
            ($_ -eq "New-SMModelExplainabilityJobDefinition/EndpointInput_S3InputMode") -Or
            ($_ -eq "New-SMModelQualityJobDefinition/EndpointInput_S3InputMode")
        }
        {
            $v = "File","Pipe"
            break
        }

        # Amazon.SageMaker.Processor
        {
            ($_ -eq "New-SMImageVersion/Processor") -Or
            ($_ -eq "Update-SMImageVersion/Processor")
        }
        {
            $v = "CPU","GPU"
            break
        }

        # Amazon.SageMaker.ProjectSortBy
        "Get-SMProjectList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.ProjectSortOrder
        "Get-SMProjectList/SortOrder"
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.RecommendationJobStatus
        {
            ($_ -eq "Get-SMInferenceRecommendationsJobStepList/Status") -Or
            ($_ -eq "Get-SMInferenceRecommendationsJobList/StatusEqual")
        }
        {
            $v = "COMPLETED","DELETED","DELETING","FAILED","IN_PROGRESS","PENDING","STOPPED","STOPPING"
            break
        }

        # Amazon.SageMaker.RecommendationJobSupportedEndpointType
        "New-SMInferenceRecommendationsJob/ContainerConfig_SupportedEndpointType"
        {
            $v = "RealTime","Serverless"
            break
        }

        # Amazon.SageMaker.RecommendationJobType
        "New-SMInferenceRecommendationsJob/JobType"
        {
            $v = "Advanced","Default"
            break
        }

        # Amazon.SageMaker.RecommendationStepType
        "Get-SMInferenceRecommendationsJobStepList/StepType"
        {
            $v = "BENCHMARK"
            break
        }

        # Amazon.SageMaker.ResourceCatalogSortBy
        "Get-SMResourceCatalogList/SortBy"
        {
            $v = "CreationTime"
            break
        }

        # Amazon.SageMaker.ResourceCatalogSortOrder
        "Get-SMResourceCatalogList/SortOrder"
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.ResourceType
        {
            ($_ -eq "Get-SMSearchSuggestion/Resource") -Or
            ($_ -eq "Search-SMResource/Resource")
        }
        {
            $v = "Endpoint","Experiment","ExperimentTrial","ExperimentTrialComponent","FeatureGroup","FeatureMetadata","HyperParameterTuningJob","Image","ImageVersion","Model","ModelCard","ModelPackage","ModelPackageGroup","Pipeline","PipelineExecution","Project","TrainingJob"
            break
        }

        # Amazon.SageMaker.RetentionType
        "Remove-SMDomain/RetentionPolicy_HomeEfsFileSystem"
        {
            $v = "Delete","Retain"
            break
        }

        # Amazon.SageMaker.RootAccess
        {
            ($_ -eq "New-SMNotebookInstance/RootAccess") -Or
            ($_ -eq "Update-SMNotebookInstance/RootAccess")
        }
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.SageMaker.S3DataType
        "New-SMTransformJob/S3DataSource_S3DataType"
        {
            $v = "AugmentedManifestFile","ManifestFile","S3Prefix"
            break
        }

        # Amazon.SageMaker.ScheduleStatus
        "Get-SMMonitoringScheduleList/StatusEqual"
        {
            $v = "Failed","Pending","Scheduled","Stopped"
            break
        }

        # Amazon.SageMaker.SearchSortOrder
        "Search-SMResource/SortOrder"
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.SharingType
        "New-SMSpace/SpaceSharingSettings_SharingType"
        {
            $v = "Private","Shared"
            break
        }

        # Amazon.SageMaker.SkipModelValidation
        "New-SMModelPackage/SkipModelValidation"
        {
            $v = "All","None"
            break
        }

        # Amazon.SageMaker.SortActionsBy
        "Get-SMActionList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.SortArtifactsBy
        "Get-SMArtifactList/SortBy"
        {
            $v = "CreationTime"
            break
        }

        # Amazon.SageMaker.SortAssociationsBy
        "Get-SMAssociationList/SortBy"
        {
            $v = "CreationTime","DestinationArn","DestinationType","SourceArn","SourceType"
            break
        }

        # Amazon.SageMaker.SortBy
        {
            ($_ -eq "Get-SMLabelingJobList/SortBy") -Or
            ($_ -eq "Get-SMProcessingJobList/SortBy") -Or
            ($_ -eq "Get-SMTrainingJobList/SortBy") -Or
            ($_ -eq "Get-SMTransformJobList/SortBy")
        }
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.SortContextsBy
        "Get-SMContextList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.SortExperimentsBy
        "Get-SMExperimentList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.SortInferenceExperimentsBy
        "Get-SMInferenceExperimentList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.SortLineageGroupsBy
        "Get-SMLineageGroupList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.SortOrder
        {
            ($_ -eq "Get-SMActionList/SortOrder") -Or
            ($_ -eq "Get-SMAlgorithmList/SortOrder") -Or
            ($_ -eq "Get-SMAppImageConfigList/SortOrder") -Or
            ($_ -eq "Get-SMAppList/SortOrder") -Or
            ($_ -eq "Get-SMArtifactList/SortOrder") -Or
            ($_ -eq "Get-SMAssociationList/SortOrder") -Or
            ($_ -eq "Get-SMClusterList/SortOrder") -Or
            ($_ -eq "Get-SMClusterNodeList/SortOrder") -Or
            ($_ -eq "Get-SMCompilationJobList/SortOrder") -Or
            ($_ -eq "Get-SMContextList/SortOrder") -Or
            ($_ -eq "Get-SMDataQualityJobDefinitionList/SortOrder") -Or
            ($_ -eq "Get-SMDeviceFleetList/SortOrder") -Or
            ($_ -eq "Get-SMEdgeDeploymentPlanList/SortOrder") -Or
            ($_ -eq "Get-SMEdgePackagingJobList/SortOrder") -Or
            ($_ -eq "Get-SMExperimentList/SortOrder") -Or
            ($_ -eq "Get-SMFlowDefinitionList/SortOrder") -Or
            ($_ -eq "Get-SMHubContentList/SortOrder") -Or
            ($_ -eq "Get-SMHubContentVersionList/SortOrder") -Or
            ($_ -eq "Get-SMHubList/SortOrder") -Or
            ($_ -eq "Get-SMHumanTaskUiList/SortOrder") -Or
            ($_ -eq "Get-SMHyperParameterTuningJobList/SortOrder") -Or
            ($_ -eq "Get-SMInferenceExperimentList/SortOrder") -Or
            ($_ -eq "Get-SMInferenceRecommendationsJobList/SortOrder") -Or
            ($_ -eq "Get-SMLabelingJobList/SortOrder") -Or
            ($_ -eq "Get-SMLabelingJobListForWorkteam/SortOrder") -Or
            ($_ -eq "Get-SMLineageGroupList/SortOrder") -Or
            ($_ -eq "Get-SMMlflowTrackingServerList/SortOrder") -Or
            ($_ -eq "Get-SMModelBiasJobDefinitionList/SortOrder") -Or
            ($_ -eq "Get-SMModelExplainabilityJobDefinitionList/SortOrder") -Or
            ($_ -eq "Get-SMModelPackageGroupList/SortOrder") -Or
            ($_ -eq "Get-SMModelPackageList/SortOrder") -Or
            ($_ -eq "Get-SMModelQualityJobDefinitionList/SortOrder") -Or
            ($_ -eq "Get-SMMonitoringAlertHistoryList/SortOrder") -Or
            ($_ -eq "Get-SMMonitoringExecutionList/SortOrder") -Or
            ($_ -eq "Get-SMMonitoringScheduleList/SortOrder") -Or
            ($_ -eq "Get-SMOptimizationJobList/SortOrder") -Or
            ($_ -eq "Get-SMPipelineExecutionList/SortOrder") -Or
            ($_ -eq "Get-SMPipelineExecutionStepList/SortOrder") -Or
            ($_ -eq "Get-SMPipelineList/SortOrder") -Or
            ($_ -eq "Get-SMProcessingJobList/SortOrder") -Or
            ($_ -eq "Get-SMSpaceList/SortOrder") -Or
            ($_ -eq "Get-SMStudioLifecycleConfigList/SortOrder") -Or
            ($_ -eq "Get-SMTrainingJobList/SortOrder") -Or
            ($_ -eq "Get-SMTrainingJobsForHyperParameterTuningJobList/SortOrder") -Or
            ($_ -eq "Get-SMTransformJobList/SortOrder") -Or
            ($_ -eq "Get-SMTrialComponentList/SortOrder") -Or
            ($_ -eq "Get-SMTrialList/SortOrder") -Or
            ($_ -eq "Get-SMUserProfileList/SortOrder") -Or
            ($_ -eq "Get-SMWorkforceList/SortOrder") -Or
            ($_ -eq "Get-SMWorkteamList/SortOrder")
        }
        {
            $v = "Ascending","Descending"
            break
        }

        # Amazon.SageMaker.SortPipelineExecutionsBy
        "Get-SMPipelineExecutionList/SortBy"
        {
            $v = "CreationTime","PipelineExecutionArn"
            break
        }

        # Amazon.SageMaker.SortPipelinesBy
        "Get-SMPipelineList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.SortTrackingServerBy
        "Get-SMMlflowTrackingServerList/SortBy"
        {
            $v = "CreationTime","Name","Status"
            break
        }

        # Amazon.SageMaker.SortTrialComponentsBy
        "Get-SMTrialComponentList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.SortTrialsBy
        "Get-SMTrialList/SortBy"
        {
            $v = "CreationTime","Name"
            break
        }

        # Amazon.SageMaker.SpaceSortKey
        "Get-SMSpaceList/SortBy"
        {
            $v = "CreationTime","LastModifiedTime"
            break
        }

        # Amazon.SageMaker.SplitType
        "New-SMTransformJob/TransformInput_SplitType"
        {
            $v = "Line","None","RecordIO","TFRecord"
            break
        }

        # Amazon.SageMaker.StorageType
        "New-SMFeatureGroup/OnlineStoreConfig_StorageType"
        {
            $v = "InMemory","Standard"
            break
        }

        # Amazon.SageMaker.StudioLifecycleConfigAppType
        {
            ($_ -eq "Get-SMStudioLifecycleConfigList/AppTypeEqual") -Or
            ($_ -eq "New-SMStudioLifecycleConfig/StudioLifecycleConfigAppType")
        }
        {
            $v = "CodeEditor","JupyterLab","JupyterServer","KernelGateway"
            break
        }

        # Amazon.SageMaker.StudioLifecycleConfigSortKey
        "Get-SMStudioLifecycleConfigList/SortBy"
        {
            $v = "CreationTime","LastModifiedTime","Name"
            break
        }

        # Amazon.SageMaker.TableFormat
        "New-SMFeatureGroup/OfflineStoreConfig_TableFormat"
        {
            $v = "Default","Glue","Iceberg"
            break
        }

        # Amazon.SageMaker.TagPropagation
        {
            ($_ -eq "New-SMDomain/TagPropagation") -Or
            ($_ -eq "Update-SMDomain/TagPropagation")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.SageMaker.TargetDevice
        "New-SMCompilationJob/OutputConfig_TargetDevice"
        {
            $v = "aisage","amba_cv2","amba_cv22","amba_cv25","coreml","deeplens","imx8mplus","imx8qm","jacinto_tda4vm","jetson_nano","jetson_tx1","jetson_tx2","jetson_xavier","lambda","ml_c4","ml_c5","ml_c6g","ml_eia2","ml_g4dn","ml_inf1","ml_inf2","ml_m4","ml_m5","ml_m6g","ml_p2","ml_p3","ml_trn1","qcs603","qcs605","rasp3b","rasp4b","rk3288","rk3399","sbe_c","sitara_am57x","x86_win32","x86_win64"
            break
        }

        # Amazon.SageMaker.TargetPlatformAccelerator
        "New-SMCompilationJob/TargetPlatform_Accelerator"
        {
            $v = "INTEL_GRAPHICS","MALI","NNA","NVIDIA"
            break
        }

        # Amazon.SageMaker.TargetPlatformArch
        "New-SMCompilationJob/TargetPlatform_Arch"
        {
            $v = "ARM64","ARM_EABI","ARM_EABIHF","X86","X86_64"
            break
        }

        # Amazon.SageMaker.TargetPlatformOs
        "New-SMCompilationJob/TargetPlatform_Os"
        {
            $v = "ANDROID","LINUX"
            break
        }

        # Amazon.SageMaker.ThroughputMode
        {
            ($_ -eq "New-SMFeatureGroup/ThroughputConfig_ThroughputMode") -Or
            ($_ -eq "Update-SMFeatureGroup/ThroughputConfig_ThroughputMode")
        }
        {
            $v = "OnDemand","Provisioned"
            break
        }

        # Amazon.SageMaker.TrackingServerSize
        {
            ($_ -eq "New-SMMlflowTrackingServer/TrackingServerSize") -Or
            ($_ -eq "Update-SMMlflowTrackingServer/TrackingServerSize")
        }
        {
            $v = "Large","Medium","Small"
            break
        }

        # Amazon.SageMaker.TrackingServerStatus
        "Get-SMMlflowTrackingServerList/TrackingServerStatus"
        {
            $v = "Created","CreateFailed","Creating","DeleteFailed","Deleting","MaintenanceComplete","MaintenanceFailed","MaintenanceInProgress","Started","StartFailed","Starting","StopFailed","Stopped","Stopping","Updated","UpdateFailed","Updating"
            break
        }

        # Amazon.SageMaker.TrafficRoutingConfigType
        {
            ($_ -eq "New-SMEndpoint/TrafficRoutingConfiguration_Type") -Or
            ($_ -eq "Update-SMEndpoint/TrafficRoutingConfiguration_Type")
        }
        {
            $v = "ALL_AT_ONCE","CANARY","LINEAR"
            break
        }

        # Amazon.SageMaker.TrafficType
        "New-SMInferenceRecommendationsJob/TrafficPattern_TrafficType"
        {
            $v = "PHASES","STAIRS"
            break
        }

        # Amazon.SageMaker.TrainingInputMode
        "New-SMHyperParameterTuningJob/AlgorithmSpecification_TrainingInputMode"
        {
            $v = "FastFile","File","Pipe"
            break
        }

        # Amazon.SageMaker.TrainingInstanceType
        "New-SMHyperParameterTuningJob/HyperParameterTuningResourceConfig_InstanceType"
        {
            $v = "ml.c4.2xlarge","ml.c4.4xlarge","ml.c4.8xlarge","ml.c4.xlarge","ml.c5.18xlarge","ml.c5.2xlarge","ml.c5.4xlarge","ml.c5.9xlarge","ml.c5.xlarge","ml.c5n.18xlarge","ml.c5n.2xlarge","ml.c5n.4xlarge","ml.c5n.9xlarge","ml.c5n.xlarge","ml.c6i.12xlarge","ml.c6i.16xlarge","ml.c6i.24xlarge","ml.c6i.2xlarge","ml.c6i.32xlarge","ml.c6i.4xlarge","ml.c6i.8xlarge","ml.c6i.xlarge","ml.g4dn.12xlarge","ml.g4dn.16xlarge","ml.g4dn.2xlarge","ml.g4dn.4xlarge","ml.g4dn.8xlarge","ml.g4dn.xlarge","ml.g5.12xlarge","ml.g5.16xlarge","ml.g5.24xlarge","ml.g5.2xlarge","ml.g5.48xlarge","ml.g5.4xlarge","ml.g5.8xlarge","ml.g5.xlarge","ml.g6.12xlarge","ml.g6.16xlarge","ml.g6.24xlarge","ml.g6.2xlarge","ml.g6.48xlarge","ml.g6.4xlarge","ml.g6.8xlarge","ml.g6.xlarge","ml.g6e.12xlarge","ml.g6e.16xlarge","ml.g6e.24xlarge","ml.g6e.2xlarge","ml.g6e.48xlarge","ml.g6e.4xlarge","ml.g6e.8xlarge","ml.g6e.xlarge","ml.m4.10xlarge","ml.m4.16xlarge","ml.m4.2xlarge","ml.m4.4xlarge","ml.m4.xlarge","ml.m5.12xlarge","ml.m5.24xlarge","ml.m5.2xlarge","ml.m5.4xlarge","ml.m5.large","ml.m5.xlarge","ml.m6i.12xlarge","ml.m6i.16xlarge","ml.m6i.24xlarge","ml.m6i.2xlarge","ml.m6i.32xlarge","ml.m6i.4xlarge","ml.m6i.8xlarge","ml.m6i.large","ml.m6i.xlarge","ml.p2.16xlarge","ml.p2.8xlarge","ml.p2.xlarge","ml.p3.16xlarge","ml.p3.2xlarge","ml.p3.8xlarge","ml.p3dn.24xlarge","ml.p4d.24xlarge","ml.p4de.24xlarge","ml.p5.48xlarge","ml.p5e.48xlarge","ml.r5.12xlarge","ml.r5.16xlarge","ml.r5.24xlarge","ml.r5.2xlarge","ml.r5.4xlarge","ml.r5.8xlarge","ml.r5.large","ml.r5.xlarge","ml.r5d.12xlarge","ml.r5d.16xlarge","ml.r5d.24xlarge","ml.r5d.2xlarge","ml.r5d.4xlarge","ml.r5d.8xlarge","ml.r5d.large","ml.r5d.xlarge","ml.t3.2xlarge","ml.t3.large","ml.t3.medium","ml.t3.xlarge","ml.trn1.2xlarge","ml.trn1.32xlarge","ml.trn1n.32xlarge"
            break
        }

        # Amazon.SageMaker.TrainingJobEarlyStoppingType
        "New-SMHyperParameterTuningJob/HyperParameterTuningJobConfig_TrainingJobEarlyStoppingType"
        {
            $v = "Auto","Off"
            break
        }

        # Amazon.SageMaker.TrainingJobSortByOptions
        "Get-SMTrainingJobsForHyperParameterTuningJobList/SortBy"
        {
            $v = "CreationTime","FinalObjectiveMetricValue","Name","Status"
            break
        }

        # Amazon.SageMaker.TrainingJobStatus
        {
            ($_ -eq "Get-SMTrainingJobList/StatusEqual") -Or
            ($_ -eq "Get-SMTrainingJobsForHyperParameterTuningJobList/StatusEqual")
        }
        {
            $v = "Completed","Failed","InProgress","Stopped","Stopping"
            break
        }

        # Amazon.SageMaker.TransformInstanceType
        "New-SMTransformJob/TransformResources_InstanceType"
        {
            $v = "ml.c4.2xlarge","ml.c4.4xlarge","ml.c4.8xlarge","ml.c4.xlarge","ml.c5.18xlarge","ml.c5.2xlarge","ml.c5.4xlarge","ml.c5.9xlarge","ml.c5.xlarge","ml.c6i.12xlarge","ml.c6i.16xlarge","ml.c6i.24xlarge","ml.c6i.2xlarge","ml.c6i.32xlarge","ml.c6i.4xlarge","ml.c6i.8xlarge","ml.c6i.large","ml.c6i.xlarge","ml.c7i.12xlarge","ml.c7i.16xlarge","ml.c7i.24xlarge","ml.c7i.2xlarge","ml.c7i.48xlarge","ml.c7i.4xlarge","ml.c7i.8xlarge","ml.c7i.large","ml.c7i.xlarge","ml.g4dn.12xlarge","ml.g4dn.16xlarge","ml.g4dn.2xlarge","ml.g4dn.4xlarge","ml.g4dn.8xlarge","ml.g4dn.xlarge","ml.g5.12xlarge","ml.g5.16xlarge","ml.g5.24xlarge","ml.g5.2xlarge","ml.g5.48xlarge","ml.g5.4xlarge","ml.g5.8xlarge","ml.g5.xlarge","ml.m4.10xlarge","ml.m4.16xlarge","ml.m4.2xlarge","ml.m4.4xlarge","ml.m4.xlarge","ml.m5.12xlarge","ml.m5.24xlarge","ml.m5.2xlarge","ml.m5.4xlarge","ml.m5.large","ml.m5.xlarge","ml.m6i.12xlarge","ml.m6i.16xlarge","ml.m6i.24xlarge","ml.m6i.2xlarge","ml.m6i.32xlarge","ml.m6i.4xlarge","ml.m6i.8xlarge","ml.m6i.large","ml.m6i.xlarge","ml.m7i.12xlarge","ml.m7i.16xlarge","ml.m7i.24xlarge","ml.m7i.2xlarge","ml.m7i.48xlarge","ml.m7i.4xlarge","ml.m7i.8xlarge","ml.m7i.large","ml.m7i.xlarge","ml.p2.16xlarge","ml.p2.8xlarge","ml.p2.xlarge","ml.p3.16xlarge","ml.p3.2xlarge","ml.p3.8xlarge","ml.r6i.12xlarge","ml.r6i.16xlarge","ml.r6i.24xlarge","ml.r6i.2xlarge","ml.r6i.32xlarge","ml.r6i.4xlarge","ml.r6i.8xlarge","ml.r6i.large","ml.r6i.xlarge","ml.r7i.12xlarge","ml.r7i.16xlarge","ml.r7i.24xlarge","ml.r7i.2xlarge","ml.r7i.48xlarge","ml.r7i.4xlarge","ml.r7i.8xlarge","ml.r7i.large","ml.r7i.xlarge"
            break
        }

        # Amazon.SageMaker.TransformJobStatus
        "Get-SMTransformJobList/StatusEqual"
        {
            $v = "Completed","Failed","InProgress","Stopped","Stopping"
            break
        }

        # Amazon.SageMaker.TrialComponentPrimaryStatus
        {
            ($_ -eq "New-SMTrialComponent/Status_PrimaryStatus") -Or
            ($_ -eq "Update-SMTrialComponent/Status_PrimaryStatus")
        }
        {
            $v = "Completed","Failed","InProgress","Stopped","Stopping"
            break
        }

        # Amazon.SageMaker.TtlDurationUnit
        {
            ($_ -eq "New-SMFeatureGroup/TtlDuration_Unit") -Or
            ($_ -eq "Update-SMFeatureGroup/TtlDuration_Unit")
        }
        {
            $v = "Days","Hours","Minutes","Seconds","Weeks"
            break
        }

        # Amazon.SageMaker.UserProfileSortKey
        "Get-SMUserProfileList/SortBy"
        {
            $v = "CreationTime","LastModifiedTime"
            break
        }

        # Amazon.SageMaker.VendorGuidance
        {
            ($_ -eq "New-SMImageVersion/VendorGuidance") -Or
            ($_ -eq "Update-SMImageVersion/VendorGuidance")
        }
        {
            $v = "ARCHIVED","NOT_PROVIDED","STABLE","TO_BE_ARCHIVED"
            break
        }

        # Amazon.SageMaker.WarmPoolResourceStatus
        "Get-SMTrainingJobList/WarmPoolStatusEqual"
        {
            $v = "Available","InUse","Reused","Terminated"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SM_map = @{
    "AdditionalS3DataSource_CompressionType"=@("New-SMAlgorithm")
    "AdditionalS3DataSource_S3DataType"=@("New-SMAlgorithm")
    "AlgorithmSpecification_TrainingInputMode"=@("New-SMHyperParameterTuningJob")
    "AmazonQSettings_Status"=@("New-SMDomain","Update-SMDomain")
    "AppNetworkAccessType"=@("New-SMDomain","Update-SMDomain")
    "AppSecurityGroupManagement"=@("New-SMDomain","Update-SMDomain")
    "AppType"=@("Get-SMApp","New-SMApp","Remove-SMApp")
    "AppTypeEqual"=@("Get-SMStudioLifecycleConfigList")
    "AssociationType"=@("Add-SMAssociation","Get-SMAssociationList")
    "AuthMode"=@("New-SMDomain")
    "AutoMLJobConfig_Mode"=@("New-SMAutoMLJob")
    "AutoMLJobObjective_MetricName"=@("New-SMAutoMLJob","New-SMAutoMLJobV2")
    "Autotune_Mode"=@("New-SMHyperParameterTuningJob")
    "BatchStrategy"=@("New-SMTransformJob")
    "BatchTransformInput_S3DataDistributionType"=@("New-SMDataQualityJobDefinition","New-SMModelBiasJobDefinition","New-SMModelExplainabilityJobDefinition","New-SMModelQualityJobDefinition")
    "BatchTransformInput_S3InputMode"=@("New-SMDataQualityJobDefinition","New-SMModelBiasJobDefinition","New-SMModelExplainabilityJobDefinition","New-SMModelQualityJobDefinition")
    "CanarySize_Type"=@("New-SMEndpoint","Update-SMEndpoint")
    "ClusterConfig_InstanceType"=@("New-SMDataQualityJobDefinition","New-SMModelBiasJobDefinition","New-SMModelExplainabilityJobDefinition","New-SMModelQualityJobDefinition","New-SMProcessingJob")
    "ContainerConfig_SupportedEndpointType"=@("New-SMInferenceRecommendationsJob")
    "ConvergenceDetected_CompleteOnConvergence"=@("New-SMHyperParameterTuningJob")
    "CrossAccountFilterOption"=@("Get-SMModelPackageGroupList","Search-SMResource")
    "DataProcessing_JoinSource"=@("New-SMTransformJob")
    "DefaultResourceSpec_InstanceType"=@("New-SMDomain","Update-SMDomain")
    "DefaultSpaceSettings_JupyterLabAppSettings_DefaultResourceSpec_InstanceType"=@("New-SMDomain","Update-SMDomain")
    "DefaultSpaceSettings_JupyterServerAppSettings_DefaultResourceSpec_InstanceType"=@("New-SMDomain","Update-SMDomain")
    "DefaultSpaceSettings_KernelGatewayAppSettings_DefaultResourceSpec_InstanceType"=@("New-SMDomain","Update-SMDomain")
    "DeploymentInstanceType"=@("New-SMOptimizationJob")
    "DesiredState"=@("Stop-SMInferenceExperiment")
    "DirectInternetAccess"=@("New-SMNotebookInstance")
    "Direction"=@("Find-SMLineage")
    "DockerSettings_EnableDockerAccess"=@("New-SMDomain","Update-SMDomain")
    "DomainSettings_ExecutionRoleIdentityConfig"=@("New-SMDomain")
    "DomainSettingsForUpdate_ExecutionRoleIdentityConfig"=@("Update-SMDomain")
    "EndpointInput_S3DataDistributionType"=@("New-SMDataQualityJobDefinition","New-SMModelBiasJobDefinition","New-SMModelExplainabilityJobDefinition","New-SMModelQualityJobDefinition")
    "EndpointInput_S3InputMode"=@("New-SMDataQualityJobDefinition","New-SMModelBiasJobDefinition","New-SMModelExplainabilityJobDefinition","New-SMModelQualityJobDefinition")
    "FeatureGroupStatusEqual"=@("Get-SMFeatureGroupList")
    "HubContentType"=@("Get-SMHubContent","Get-SMHubContentList","Get-SMHubContentVersionList","Import-SMHubContent","Remove-SMHubContent","Remove-SMHubContentReference")
    "HumanLoopRequestSource_AwsManagedHumanLoopRequestSource"=@("New-SMFlowDefinition")
    "HyperParameterTuningJobConfig_Strategy"=@("New-SMHyperParameterTuningJob")
    "HyperParameterTuningJobConfig_TrainingJobEarlyStoppingType"=@("New-SMHyperParameterTuningJob")
    "HyperParameterTuningJobObjective_Type"=@("New-SMHyperParameterTuningJob")
    "HyperParameterTuningResourceConfig_AllocationStrategy"=@("New-SMHyperParameterTuningJob")
    "HyperParameterTuningResourceConfig_InstanceType"=@("New-SMHyperParameterTuningJob")
    "IamPolicyConstraints_SourceIp"=@("New-SMWorkteam","Update-SMWorkteam")
    "IamPolicyConstraints_VpcSourceIp"=@("New-SMWorkteam","Update-SMWorkteam")
    "IdleSettings_LifecycleManagement"=@("New-SMDomain","Update-SMDomain")
    "InferenceExecutionConfig_Mode"=@("New-SMModel")
    "InputConfig_Framework"=@("New-SMCompilationJob")
    "InstanceType"=@("New-SMNotebookInstance","Update-SMNotebookInstance")
    "JobType"=@("New-SMImageVersion","New-SMInferenceRecommendationsJob","Update-SMImageVersion")
    "LinearStepSize_Type"=@("New-SMEndpoint","Update-SMEndpoint")
    "MaximumBatchSize_Type"=@("New-SMEndpoint","Update-SMEndpoint")
    "ModelApprovalStatus"=@("Get-SMModelPackageList","New-SMModelPackage","Update-SMModelPackage")
    "ModelCard_ModelCardStatus"=@("New-SMModelPackage","Update-SMModelPackage")
    "ModelCardStatus"=@("Get-SMModelCardList","Get-SMModelCardVersionList","New-SMModelCard","Update-SMModelCard")
    "ModelPackageType"=@("Get-SMModelPackageList")
    "ModelQualityAppSpecification_ProblemType"=@("New-SMModelQualityJobDefinition")
    "MonitoringTypeEqual"=@("Get-SMMonitoringExecutionList","Get-SMMonitoringScheduleList")
    "NodeRecovery"=@("New-SMCluster","Update-SMCluster")
    "OfflineStoreConfig_TableFormat"=@("New-SMFeatureGroup")
    "OfflineStoreStatusEqual"=@("Get-SMFeatureGroupList")
    "OnlineStoreConfig_StorageType"=@("New-SMFeatureGroup")
    "OutputConfig_PresetDeploymentType"=@("New-SMDeviceFleet","New-SMEdgePackagingJob","Update-SMDeviceFleet")
    "OutputConfig_TargetDevice"=@("New-SMCompilationJob")
    "ProblemType"=@("New-SMAutoMLJob")
    "Processor"=@("New-SMImageVersion","Update-SMImageVersion")
    "Resource"=@("Get-SMSearchSuggestion","Search-SMResource")
    "ResourceSpec_InstanceType"=@("New-SMApp")
    "RetentionPolicy_HomeEfsFileSystem"=@("Remove-SMDomain")
    "RollbackMaximumBatchSize_Type"=@("New-SMEndpoint","Update-SMEndpoint")
    "RootAccess"=@("New-SMNotebookInstance","Update-SMNotebookInstance")
    "S3DataSource_S3DataType"=@("New-SMTransformJob")
    "SearchExpression_Operator"=@("Search-SMResource")
    "SkipModelValidation"=@("New-SMModelPackage")
    "SortBy"=@("Get-SMActionList","Get-SMAlgorithmList","Get-SMAppImageConfigList","Get-SMAppList","Get-SMArtifactList","Get-SMAssociationList","Get-SMAutoMLJobList","Get-SMCandidatesForAutoMLJobList","Get-SMClusterList","Get-SMClusterNodeList","Get-SMCodeRepositoryList","Get-SMCompilationJobList","Get-SMConfigList","Get-SMContextList","Get-SMDataQualityJobDefinitionList","Get-SMDeviceFleetList","Get-SMEdgeDeploymentPlanList","Get-SMEdgePackagingJobList","Get-SMEndpointList","Get-SMExperimentList","Get-SMFeatureGroupList","Get-SMHubContentList","Get-SMHubContentVersionList","Get-SMHubList","Get-SMHyperParameterTuningJobList","Get-SMImageList","Get-SMImageVersionList","Get-SMInferenceComponentList","Get-SMInferenceExperimentList","Get-SMInferenceRecommendationsJobList","Get-SMLabelingJobList","Get-SMLabelingJobListForWorkteam","Get-SMLineageGroupList","Get-SMMlflowTrackingServerList","Get-SMModelBiasJobDefinitionList","Get-SMModelCardExportJobList","Get-SMModelCardList","Get-SMModelCardVersionList","Get-SMModelExplainabilityJobDefinitionList","Get-SMModelList","Get-SMModelPackageGroupList","Get-SMModelPackageList","Get-SMModelQualityJobDefinitionList","Get-SMMonitoringAlertHistoryList","Get-SMMonitoringExecutionList","Get-SMMonitoringScheduleList","Get-SMNotebookInstanceLifecycleConfigList","Get-SMNotebookInstanceList","Get-SMOptimizationJobList","Get-SMPipelineExecutionList","Get-SMPipelineList","Get-SMProcessingJobList","Get-SMProjectList","Get-SMResourceCatalogList","Get-SMSpaceList","Get-SMStudioLifecycleConfigList","Get-SMTrainingJobList","Get-SMTrainingJobsForHyperParameterTuningJobList","Get-SMTransformJobList","Get-SMTrialComponentList","Get-SMTrialList","Get-SMUserProfileList","Get-SMWorkforceList","Get-SMWorkteamList")
    "SortOrder"=@("Get-SMActionList","Get-SMAlgorithmList","Get-SMAppImageConfigList","Get-SMAppList","Get-SMArtifactList","Get-SMAssociationList","Get-SMAutoMLJobList","Get-SMCandidatesForAutoMLJobList","Get-SMClusterList","Get-SMClusterNodeList","Get-SMCodeRepositoryList","Get-SMCompilationJobList","Get-SMConfigList","Get-SMContextList","Get-SMDataQualityJobDefinitionList","Get-SMDeviceFleetList","Get-SMEdgeDeploymentPlanList","Get-SMEdgePackagingJobList","Get-SMEndpointList","Get-SMExperimentList","Get-SMFeatureGroupList","Get-SMFlowDefinitionList","Get-SMHubContentList","Get-SMHubContentVersionList","Get-SMHubList","Get-SMHumanTaskUiList","Get-SMHyperParameterTuningJobList","Get-SMImageList","Get-SMImageVersionList","Get-SMInferenceComponentList","Get-SMInferenceExperimentList","Get-SMInferenceRecommendationsJobList","Get-SMLabelingJobList","Get-SMLabelingJobListForWorkteam","Get-SMLineageGroupList","Get-SMMlflowTrackingServerList","Get-SMModelBiasJobDefinitionList","Get-SMModelCardExportJobList","Get-SMModelCardList","Get-SMModelCardVersionList","Get-SMModelExplainabilityJobDefinitionList","Get-SMModelList","Get-SMModelPackageGroupList","Get-SMModelPackageList","Get-SMModelQualityJobDefinitionList","Get-SMMonitoringAlertHistoryList","Get-SMMonitoringExecutionList","Get-SMMonitoringScheduleList","Get-SMNotebookInstanceLifecycleConfigList","Get-SMNotebookInstanceList","Get-SMOptimizationJobList","Get-SMPipelineExecutionList","Get-SMPipelineExecutionStepList","Get-SMPipelineList","Get-SMProcessingJobList","Get-SMProjectList","Get-SMResourceCatalogList","Get-SMSpaceList","Get-SMStudioLifecycleConfigList","Get-SMTrainingJobList","Get-SMTrainingJobsForHyperParameterTuningJobList","Get-SMTransformJobList","Get-SMTrialComponentList","Get-SMTrialList","Get-SMUserProfileList","Get-SMWorkforceList","Get-SMWorkteamList","Search-SMResource")
    "SpaceSettings_AppType"=@("New-SMSpace","Update-SMSpace")
    "SpaceSettings_CodeEditorAppSettings_DefaultResourceSpec_InstanceType"=@("New-SMSpace","Update-SMSpace")
    "SpaceSettings_JupyterLabAppSettings_DefaultResourceSpec_InstanceType"=@("New-SMSpace","Update-SMSpace")
    "SpaceSettings_JupyterServerAppSettings_DefaultResourceSpec_InstanceType"=@("New-SMSpace","Update-SMSpace")
    "SpaceSettings_KernelGatewayAppSettings_DefaultResourceSpec_InstanceType"=@("New-SMSpace","Update-SMSpace")
    "SpaceSharingSettings_SharingType"=@("New-SMSpace")
    "Status"=@("Get-SMInferenceRecommendationsJobStepList","New-SMAction","Update-SMAction")
    "Status_PrimaryStatus"=@("New-SMTrialComponent","Update-SMTrialComponent")
    "StatusEqual"=@("Get-SMAutoMLJobList","Get-SMCandidatesForAutoMLJobList","Get-SMCompilationJobList","Get-SMEdgePackagingJobList","Get-SMEndpointList","Get-SMHyperParameterTuningJobList","Get-SMInferenceComponentList","Get-SMInferenceExperimentList","Get-SMInferenceRecommendationsJobList","Get-SMLabelingJobList","Get-SMModelCardExportJobList","Get-SMMonitoringAlertHistoryList","Get-SMMonitoringExecutionList","Get-SMMonitoringScheduleList","Get-SMNotebookInstanceList","Get-SMOptimizationJobList","Get-SMProcessingJobList","Get-SMTrainingJobList","Get-SMTrainingJobsForHyperParameterTuningJobList","Get-SMTransformJobList")
    "StepType"=@("Get-SMInferenceRecommendationsJobStepList")
    "StoppingConditions_FlatInvocation"=@("New-SMInferenceRecommendationsJob")
    "StudioLifecycleConfigAppType"=@("New-SMStudioLifecycleConfig")
    "TabularJobConfig_Mode"=@("New-SMAutoMLJobV2")
    "TabularJobConfig_ProblemType"=@("New-SMAutoMLJobV2")
    "TagPropagation"=@("New-SMDomain","Update-SMDomain")
    "TargetPlatform_Accelerator"=@("New-SMCompilationJob")
    "TargetPlatform_Arch"=@("New-SMCompilationJob")
    "TargetPlatform_Os"=@("New-SMCompilationJob")
    "TextConfig_Granularity"=@("New-SMEndpointConfig")
    "TextConfig_Language"=@("New-SMEndpointConfig")
    "ThroughputConfig_ThroughputMode"=@("New-SMFeatureGroup","Update-SMFeatureGroup")
    "TrackingServerSize"=@("New-SMMlflowTrackingServer","Update-SMMlflowTrackingServer")
    "TrackingServerStatus"=@("Get-SMMlflowTrackingServerList")
    "TrafficPattern_TrafficType"=@("New-SMInferenceRecommendationsJob")
    "TrafficRoutingConfiguration_Type"=@("New-SMEndpoint","Update-SMEndpoint")
    "TransformInput_CompressionType"=@("New-SMTransformJob")
    "TransformInput_SplitType"=@("New-SMTransformJob")
    "TransformOutput_AssembleWith"=@("New-SMTransformJob")
    "TransformResources_InstanceType"=@("New-SMTransformJob")
    "TtlDuration_Unit"=@("New-SMFeatureGroup","Update-SMFeatureGroup")
    "TuningObjective_Type"=@("New-SMHyperParameterTuningJob")
    "Type"=@("Get-SMInferenceExperimentList","New-SMInferenceExperiment")
    "VendorGuidance"=@("New-SMImageVersion","Update-SMImageVersion")
    "WarmPoolStatusEqual"=@("Get-SMTrainingJobList")
    "WarmStartConfig_WarmStartType"=@("New-SMHyperParameterTuningJob")
}

_awsArgumentCompleterRegistration $SM_Completers $SM_map

$SM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SM_SelectMap = @{
    "Select"=@("Add-SMAssociation",
               "Add-SMResourceTag",
               "Register-SMTrialComponent",
               "Set-SMDeleteClusterNode",
               "Get-SMDescribeModelPackage",
               "New-SMAction",
               "New-SMAlgorithm",
               "New-SMApp",
               "New-SMAppImageConfig",
               "New-SMArtifact",
               "New-SMAutoMLJob",
               "New-SMAutoMLJobV2",
               "New-SMCluster",
               "New-SMCodeRepository",
               "New-SMCompilationJob",
               "New-SMContext",
               "New-SMDataQualityJobDefinition",
               "New-SMDeviceFleet",
               "New-SMDomain",
               "New-SMEdgeDeploymentPlan",
               "New-SMEdgeDeploymentStage",
               "New-SMEdgePackagingJob",
               "New-SMEndpoint",
               "New-SMEndpointConfig",
               "New-SMExperiment",
               "New-SMFeatureGroup",
               "New-SMFlowDefinition",
               "New-SMHub",
               "New-SMHubContentReference",
               "New-SMHumanTaskUi",
               "New-SMHyperParameterTuningJob",
               "New-SMImage",
               "New-SMImageVersion",
               "New-SMInferenceComponent",
               "New-SMInferenceExperiment",
               "New-SMInferenceRecommendationsJob",
               "New-SMLabelingJob",
               "New-SMMlflowTrackingServer",
               "New-SMModel",
               "New-SMModelBiasJobDefinition",
               "New-SMModelCard",
               "New-SMModelCardExportJob",
               "New-SMModelExplainabilityJobDefinition",
               "New-SMModelPackage",
               "New-SMModelPackageGroup",
               "New-SMModelQualityJobDefinition",
               "New-SMMonitoringSchedule",
               "New-SMNotebookInstance",
               "New-SMNotebookInstanceLifecycleConfig",
               "New-SMOptimizationJob",
               "New-SMPipeline",
               "New-SMPresignedDomainUrl",
               "New-SMPresignedMlflowTrackingServerUrl",
               "New-SMPresignedNotebookInstanceUrl",
               "New-SMProcessingJob",
               "New-SMProject",
               "New-SMSpace",
               "New-SMStudioLifecycleConfig",
               "New-SMTrainingJob",
               "New-SMTransformJob",
               "New-SMTrial",
               "New-SMTrialComponent",
               "New-SMUserProfile",
               "New-SMWorkforce",
               "New-SMWorkteam",
               "Remove-SMAction",
               "Remove-SMAlgorithm",
               "Remove-SMApp",
               "Remove-SMAppImageConfig",
               "Remove-SMArtifact",
               "Remove-SMAssociation",
               "Remove-SMCluster",
               "Remove-SMCodeRepository",
               "Remove-SMCompilationJob",
               "Remove-SMContext",
               "Remove-SMDataQualityJobDefinition",
               "Remove-SMDeviceFleet",
               "Remove-SMDomain",
               "Remove-SMEdgeDeploymentPlan",
               "Remove-SMEdgeDeploymentStage",
               "Remove-SMEndpoint",
               "Remove-SMEndpointConfig",
               "Remove-SMExperiment",
               "Remove-SMFeatureGroup",
               "Remove-SMFlowDefinition",
               "Remove-SMHub",
               "Remove-SMHubContent",
               "Remove-SMHubContentReference",
               "Remove-SMHumanTaskUi",
               "Remove-SMHyperParameterTuningJob",
               "Remove-SMImage",
               "Remove-SMImageVersion",
               "Remove-SMInferenceComponent",
               "Remove-SMInferenceExperiment",
               "Remove-SMMlflowTrackingServer",
               "Remove-SMModel",
               "Remove-SMModelBiasJobDefinition",
               "Remove-SMModelCard",
               "Remove-SMModelExplainabilityJobDefinition",
               "Remove-SMModelPackage",
               "Remove-SMModelPackageGroup",
               "Remove-SMModelPackageGroupPolicy",
               "Remove-SMModelQualityJobDefinition",
               "Remove-SMMonitoringSchedule",
               "Remove-SMNotebookInstance",
               "Remove-SMNotebookInstanceLifecycleConfig",
               "Remove-SMOptimizationJob",
               "Remove-SMPipeline",
               "Remove-SMProject",
               "Remove-SMSpace",
               "Remove-SMStudioLifecycleConfig",
               "Remove-SMResourceTag",
               "Remove-SMTrial",
               "Remove-SMTrialComponent",
               "Remove-SMUserProfile",
               "Remove-SMWorkforce",
               "Remove-SMWorkteam",
               "Remove-SMDevice",
               "Get-SMAction",
               "Get-SMAlgorithm",
               "Get-SMApp",
               "Get-SMAppImageConfig",
               "Get-SMArtifact",
               "Get-SMAutoMLJob",
               "Get-SMAutoMLJobV2",
               "Get-SMCluster",
               "Get-SMClusterNode",
               "Get-SMCodeRepository",
               "Get-SMCompilationJob",
               "Get-SMContext",
               "Get-SMDataQualityJobDefinition",
               "Get-SMDevice",
               "Get-SMDeviceFleet",
               "Get-SMDomain",
               "Get-SMEdgeDeploymentPlan",
               "Get-SMEdgePackagingJob",
               "Get-SMEndpoint",
               "Get-SMEndpointConfig",
               "Get-SMExperiment",
               "Get-SMFeatureGroup",
               "Get-SMFeatureMetadata",
               "Get-SMFlowDefinition",
               "Get-SMHub",
               "Get-SMHubContent",
               "Get-SMHumanTaskUi",
               "Get-SMHyperParameterTuningJob",
               "Get-SMImage",
               "Get-SMImageVersion",
               "Get-SMInferenceComponent",
               "Get-SMInferenceExperiment",
               "Get-SMInferenceRecommendationsJob",
               "Get-SMLabelingJob",
               "Get-SMLineageGroup",
               "Get-SMMlflowTrackingServer",
               "Get-SMModel",
               "Get-SMModelBiasJobDefinition",
               "Get-SMModelCard",
               "Get-SMModelCardExportJob",
               "Get-SMModelExplainabilityJobDefinition",
               "Get-SMModelPackage",
               "Get-SMModelPackageGroup",
               "Get-SMModelQualityJobDefinition",
               "Get-SMMonitoringSchedule",
               "Get-SMNotebookInstance",
               "Get-SMNotebookInstanceLifecycleConfig",
               "Get-SMOptimizationJob",
               "Get-SMPipeline",
               "Get-SMPipelineDefinitionForExecution",
               "Get-SMPipelineExecution",
               "Get-SMProcessingJob",
               "Get-SMProject",
               "Get-SMSpace",
               "Get-SMStudioLifecycleConfig",
               "Get-SMSubscribedWorkteam",
               "Get-SMTrainingJob",
               "Get-SMTransformJob",
               "Get-SMTrial",
               "Get-SMTrialComponent",
               "Get-SMUserProfile",
               "Get-SMWorkforce",
               "Get-SMWorkteam",
               "Disable-SMSagemakerServicecatalogPortfolio",
               "Unregister-SMTrialComponent",
               "Enable-SMSagemakerServicecatalogPortfolio",
               "Get-SMDeviceFleetReport",
               "Get-SMLineageGroupPolicy",
               "Get-SMModelPackageGroupPolicy",
               "Get-SMSagemakerServicecatalogPortfolioStatus",
               "Get-SMScalingConfigurationRecommendation",
               "Get-SMSearchSuggestion",
               "Import-SMHubContent",
               "Get-SMActionList",
               "Get-SMAlgorithmList",
               "Get-SMAliasList",
               "Get-SMAppImageConfigList",
               "Get-SMAppList",
               "Get-SMArtifactList",
               "Get-SMAssociationList",
               "Get-SMAutoMLJobList",
               "Get-SMCandidatesForAutoMLJobList",
               "Get-SMClusterNodeList",
               "Get-SMClusterList",
               "Get-SMCodeRepositoryList",
               "Get-SMCompilationJobList",
               "Get-SMContextList",
               "Get-SMDataQualityJobDefinitionList",
               "Get-SMDeviceFleetList",
               "Get-SMDeviceList",
               "Get-SMDomainList",
               "Get-SMEdgeDeploymentPlanList",
               "Get-SMEdgePackagingJobList",
               "Get-SMConfigList",
               "Get-SMEndpointList",
               "Get-SMExperimentList",
               "Get-SMFeatureGroupList",
               "Get-SMFlowDefinitionList",
               "Get-SMHubContentList",
               "Get-SMHubContentVersionList",
               "Get-SMHubList",
               "Get-SMHumanTaskUiList",
               "Get-SMHyperParameterTuningJobList",
               "Get-SMImageList",
               "Get-SMImageVersionList",
               "Get-SMInferenceComponentList",
               "Get-SMInferenceExperimentList",
               "Get-SMInferenceRecommendationsJobList",
               "Get-SMInferenceRecommendationsJobStepList",
               "Get-SMLabelingJobList",
               "Get-SMLabelingJobListForWorkteam",
               "Get-SMLineageGroupList",
               "Get-SMMlflowTrackingServerList",
               "Get-SMModelBiasJobDefinitionList",
               "Get-SMModelCardExportJobList",
               "Get-SMModelCardList",
               "Get-SMModelCardVersionList",
               "Get-SMModelExplainabilityJobDefinitionList",
               "Get-SMModelMetadataList",
               "Get-SMModelPackageGroupList",
               "Get-SMModelPackageList",
               "Get-SMModelQualityJobDefinitionList",
               "Get-SMModelList",
               "Get-SMMonitoringAlertHistoryList",
               "Get-SMMonitoringAlertList",
               "Get-SMMonitoringExecutionList",
               "Get-SMMonitoringScheduleList",
               "Get-SMNotebookInstanceLifecycleConfigList",
               "Get-SMNotebookInstanceList",
               "Get-SMOptimizationJobList",
               "Get-SMPipelineExecutionList",
               "Get-SMPipelineExecutionStepList",
               "Get-SMPipelineParametersForExecutionList",
               "Get-SMPipelineList",
               "Get-SMProcessingJobList",
               "Get-SMProjectList",
               "Get-SMResourceCatalogList",
               "Get-SMSpaceList",
               "Get-SMStageDeviceList",
               "Get-SMStudioLifecycleConfigList",
               "Get-SMSubscribedWorkteamList",
               "Get-SMResourceTagList",
               "Get-SMTrainingJobList",
               "Get-SMTrainingJobsForHyperParameterTuningJobList",
               "Get-SMTransformJobList",
               "Get-SMTrialComponentList",
               "Get-SMTrialList",
               "Get-SMUserProfileList",
               "Get-SMWorkforceList",
               "Get-SMWorkteamList",
               "Write-SMModelPackageGroupPolicy",
               "Find-SMLineage",
               "Register-SMDevice",
               "Invoke-SMUiTemplateRendering",
               "Restart-SMPipelineExecution",
               "Search-SMResource",
               "Send-SMPipelineExecutionStepFailure",
               "Send-SMPipelineExecutionStepSuccess",
               "Start-SMEdgeDeploymentStage",
               "Start-SMInferenceExperiment",
               "Start-SMMlflowTrackingServer",
               "Start-SMMonitoringSchedule",
               "Start-SMNotebookInstance",
               "Start-SMPipelineExecution",
               "Stop-SMAutoMLJob",
               "Stop-SMCompilationJob",
               "Stop-SMEdgeDeploymentStage",
               "Stop-SMEdgePackagingJob",
               "Stop-SMHyperParameterTuningJob",
               "Stop-SMInferenceExperiment",
               "Stop-SMInferenceRecommendationsJob",
               "Stop-SMLabelingJob",
               "Stop-SMMlflowTrackingServer",
               "Stop-SMMonitoringSchedule",
               "Stop-SMNotebookInstance",
               "Stop-SMOptimizationJob",
               "Stop-SMPipelineExecution",
               "Stop-SMProcessingJob",
               "Stop-SMTrainingJob",
               "Stop-SMTransformJob",
               "Update-SMAction",
               "Update-SMAppImageConfig",
               "Update-SMArtifact",
               "Update-SMCluster",
               "Update-SMClusterSoftware",
               "Update-SMCodeRepository",
               "Update-SMContext",
               "Update-SMDeviceFleet",
               "Update-SMDevice",
               "Update-SMDomain",
               "Update-SMEndpoint",
               "Update-SMEndpointWeightAndCapacity",
               "Update-SMExperiment",
               "Update-SMFeatureGroup",
               "Update-SMFeatureMetadata",
               "Update-SMHub",
               "Update-SMImage",
               "Update-SMImageVersion",
               "Update-SMInferenceComponent",
               "Update-SMInferenceComponentRuntimeConfig",
               "Update-SMInferenceExperiment",
               "Update-SMMlflowTrackingServer",
               "Update-SMModelCard",
               "Update-SMModelPackage",
               "Update-SMMonitoringAlert",
               "Update-SMMonitoringSchedule",
               "Update-SMNotebookInstance",
               "Update-SMNotebookInstanceLifecycleConfig",
               "Update-SMPipeline",
               "Update-SMPipelineExecution",
               "Update-SMProject",
               "Update-SMSpace",
               "Update-SMTrainingJob",
               "Update-SMTrial",
               "Update-SMTrialComponent",
               "Update-SMUserProfile",
               "Update-SMWorkforce",
               "Update-SMWorkteam")
}

_awsArgumentCompleterRegistration $SM_SelectCompleters $SM_SelectMap
# Argument completions for service Amazon Augmented AI (A2I) Runtime


$A2IR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AugmentedAIRuntime.SortOrder
        "Get-A2IRHumanLoopList/SortOrder"
        {
            $v = "Ascending","Descending"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$A2IR_map = @{
    "SortOrder"=@("Get-A2IRHumanLoopList")
}

_awsArgumentCompleterRegistration $A2IR_Completers $A2IR_map

$A2IR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.A2IR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$A2IR_SelectMap = @{
    "Select"=@("Remove-A2IRHumanLoop",
               "Get-A2IRHumanLoop",
               "Get-A2IRHumanLoopList",
               "Start-A2IRHumanLoop",
               "Stop-A2IRHumanLoop")
}

_awsArgumentCompleterRegistration $A2IR_SelectCompleters $A2IR_SelectMap
# Argument completions for service Amazon Sagemaker Edge Manager


$SME_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SME.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SME_SelectMap = @{
    "Select"=@("Get-SMEDeployment",
               "Get-SMEDeviceRegistration",
               "Send-SMEHeartbeat")
}

_awsArgumentCompleterRegistration $SME_SelectCompleters $SME_SelectMap
# Argument completions for service Amazon SageMaker Feature Store Runtime


$SMFS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SageMakerFeatureStoreRuntime.DeletionMode
        "Remove-SMFSRecord/DeletionMode"
        {
            $v = "HardDelete","SoftDelete"
            break
        }

        # Amazon.SageMakerFeatureStoreRuntime.ExpirationTimeResponse
        {
            ($_ -eq "Get-SMFSRecord/ExpirationTimeResponse") -Or
            ($_ -eq "Get-SMFSRecordBatch/ExpirationTimeResponse")
        }
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.SageMakerFeatureStoreRuntime.TtlDurationUnit
        "Write-SMFSRecord/TtlDuration_Unit"
        {
            $v = "Days","Hours","Minutes","Seconds","Weeks"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMFS_map = @{
    "DeletionMode"=@("Remove-SMFSRecord")
    "ExpirationTimeResponse"=@("Get-SMFSRecord","Get-SMFSRecordBatch")
    "TtlDuration_Unit"=@("Write-SMFSRecord")
}

_awsArgumentCompleterRegistration $SMFS_Completers $SMFS_map

$SMFS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SMFS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMFS_SelectMap = @{
    "Select"=@("Get-SMFSRecordBatch",
               "Remove-SMFSRecord",
               "Get-SMFSRecord",
               "Write-SMFSRecord")
}

_awsArgumentCompleterRegistration $SMFS_SelectCompleters $SMFS_SelectMap
# Argument completions for service SageMaker Geospatial


$SMGS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SageMakerGeospatial.AlgorithmNameCloudRemoval
        "Start-SMGSEarthObservationJob/CloudRemovalConfig_AlgorithmName"
        {
            $v = "INTERPOLATION"
            break
        }

        # Amazon.SageMakerGeospatial.AlgorithmNameGeoMosaic
        "Start-SMGSEarthObservationJob/GeoMosaicConfig_AlgorithmName"
        {
            $v = "AVERAGE","BILINEAR","CUBIC","CUBICSPLINE","LANCZOS","MAX","MED","MIN","MODE","NEAR","Q1","Q3","RMS","SUM"
            break
        }

        # Amazon.SageMakerGeospatial.AlgorithmNameResampling
        "Start-SMGSEarthObservationJob/ResamplingConfig_AlgorithmName"
        {
            $v = "AVERAGE","BILINEAR","CUBIC","CUBICSPLINE","LANCZOS","MAX","MED","MIN","MODE","NEAR","Q1","Q3","RMS","SUM"
            break
        }

        # Amazon.SageMakerGeospatial.EarthObservationJobStatus
        "Get-SMGSEarthObservationJobList/StatusEqual"
        {
            $v = "COMPLETED","DELETED","DELETING","FAILED","INITIALIZING","IN_PROGRESS","STOPPED","STOPPING"
            break
        }

        # Amazon.SageMakerGeospatial.GroupBy
        "Start-SMGSEarthObservationJob/TemporalStatisticsConfig_GroupBy"
        {
            $v = "ALL","YEARLY"
            break
        }

        # Amazon.SageMakerGeospatial.LogicalOperator
        {
            ($_ -eq "Search-SMGSRasterDataCollection/PropertyFilters_LogicalOperator") -Or
            ($_ -eq "Start-SMGSEarthObservationJob/PropertyFilters_LogicalOperator")
        }
        {
            $v = "AND"
            break
        }

        # Amazon.SageMakerGeospatial.OutputType
        "Get-SMGSTile/OutputDataType"
        {
            $v = "FLOAT32","FLOAT64","INT16","INT32","UINT16"
            break
        }

        # Amazon.SageMakerGeospatial.PredefinedResolution
        "Start-SMGSEarthObservationJob/OutputResolution_Predefined"
        {
            $v = "AVERAGE","HIGHEST","LOWEST"
            break
        }

        # Amazon.SageMakerGeospatial.SortOrder
        {
            ($_ -eq "Get-SMGSEarthObservationJobList/SortOrder") -Or
            ($_ -eq "Get-SMGSVectorEnrichmentJobList/SortOrder")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.SageMakerGeospatial.TargetOptions
        "Get-SMGSTile/Target"
        {
            $v = "INPUT","OUTPUT"
            break
        }

        # Amazon.SageMakerGeospatial.Unit
        {
            ($_ -eq "Start-SMGSEarthObservationJob/JobConfig_ResamplingConfig_OutputResolution_UserDefined_Unit") -Or
            ($_ -eq "Start-SMGSEarthObservationJob/JobConfig_StackConfig_OutputResolution_UserDefined_Unit")
        }
        {
            $v = "METERS"
            break
        }

        # Amazon.SageMakerGeospatial.VectorEnrichmentJobDocumentType
        "Start-SMGSVectorEnrichmentJob/InputConfig_DocumentType"
        {
            $v = "CSV"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMGS_map = @{
    "CloudRemovalConfig_AlgorithmName"=@("Start-SMGSEarthObservationJob")
    "GeoMosaicConfig_AlgorithmName"=@("Start-SMGSEarthObservationJob")
    "InputConfig_DocumentType"=@("Start-SMGSVectorEnrichmentJob")
    "JobConfig_ResamplingConfig_OutputResolution_UserDefined_Unit"=@("Start-SMGSEarthObservationJob")
    "JobConfig_StackConfig_OutputResolution_UserDefined_Unit"=@("Start-SMGSEarthObservationJob")
    "OutputDataType"=@("Get-SMGSTile")
    "OutputResolution_Predefined"=@("Start-SMGSEarthObservationJob")
    "PropertyFilters_LogicalOperator"=@("Search-SMGSRasterDataCollection","Start-SMGSEarthObservationJob")
    "ResamplingConfig_AlgorithmName"=@("Start-SMGSEarthObservationJob")
    "SortOrder"=@("Get-SMGSEarthObservationJobList","Get-SMGSVectorEnrichmentJobList")
    "StatusEqual"=@("Get-SMGSEarthObservationJobList")
    "Target"=@("Get-SMGSTile")
    "TemporalStatisticsConfig_GroupBy"=@("Start-SMGSEarthObservationJob")
}

_awsArgumentCompleterRegistration $SMGS_Completers $SMGS_map

$SMGS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SMGS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMGS_SelectMap = @{
    "Select"=@("Remove-SMGSEarthObservationJob",
               "Remove-SMGSVectorEnrichmentJob",
               "Export-SMGSEarthObservationJob",
               "Export-SMGSVectorEnrichmentJob",
               "Get-SMGSEarthObservationJob",
               "Get-SMGSRasterDataCollection",
               "Get-SMGSTile",
               "Get-SMGSVectorEnrichmentJob",
               "Get-SMGSEarthObservationJobList",
               "Get-SMGSRasterDataCollectionList",
               "Get-SMGSResourceTag",
               "Get-SMGSVectorEnrichmentJobList",
               "Search-SMGSRasterDataCollection",
               "Start-SMGSEarthObservationJob",
               "Start-SMGSVectorEnrichmentJob",
               "Stop-SMGSEarthObservationJob",
               "Stop-SMGSVectorEnrichmentJob",
               "Add-SMGSResourceTag",
               "Remove-SMGSResourceTag")
}

_awsArgumentCompleterRegistration $SMGS_SelectCompleters $SMGS_SelectMap
# Argument completions for service Amazon SageMaker Metrics Service


$SMM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SMM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMM_SelectMap = @{
    "Select"=@("Get-SMMMetric",
               "Add-SMMMetric")
}

_awsArgumentCompleterRegistration $SMM_SelectCompleters $SMM_SelectMap
# Argument completions for service AWS Savings Plans


$SP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SavingsPlans.SavingsPlanProductType
        "Get-SPSavingsPlansOffering/ProductType"
        {
            $v = "EC2","Fargate","Lambda","SageMaker"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SP_map = @{
    "ProductType"=@("Get-SPSavingsPlansOffering")
}

_awsArgumentCompleterRegistration $SP_Completers $SP_map

$SP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SP_SelectMap = @{
    "Select"=@("New-SPSavingsPlan",
               "Remove-SPQueuedSavingsPlan",
               "Get-SPSavingsPlanRate",
               "Get-SPSavingsPlan",
               "Get-SPSavingsPlansOfferingRate",
               "Get-SPSavingsPlansOffering",
               "Get-SPResourceTag",
               "Invoke-SPReturnSavingsPlan",
               "Add-SPResourceTag",
               "Remove-SPResourceTag")
}

_awsArgumentCompleterRegistration $SP_SelectCompleters $SP_SelectMap
# Argument completions for service Amazon EventBridge Scheduler


$SCH_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Scheduler.ActionAfterCompletion
        {
            ($_ -eq "New-SCHSchedule/ActionAfterCompletion") -Or
            ($_ -eq "Update-SCHSchedule/ActionAfterCompletion")
        }
        {
            $v = "DELETE","NONE"
            break
        }

        # Amazon.Scheduler.AssignPublicIp
        {
            ($_ -eq "New-SCHSchedule/AwsvpcConfiguration_AssignPublicIp") -Or
            ($_ -eq "Update-SCHSchedule/AwsvpcConfiguration_AssignPublicIp")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Scheduler.FlexibleTimeWindowMode
        {
            ($_ -eq "New-SCHSchedule/FlexibleTimeWindow_Mode") -Or
            ($_ -eq "Update-SCHSchedule/FlexibleTimeWindow_Mode")
        }
        {
            $v = "FLEXIBLE","OFF"
            break
        }

        # Amazon.Scheduler.LaunchType
        {
            ($_ -eq "New-SCHSchedule/EcsParameters_LaunchType") -Or
            ($_ -eq "Update-SCHSchedule/EcsParameters_LaunchType")
        }
        {
            $v = "EC2","EXTERNAL","FARGATE"
            break
        }

        # Amazon.Scheduler.PropagateTags
        {
            ($_ -eq "New-SCHSchedule/EcsParameters_PropagateTag") -Or
            ($_ -eq "Update-SCHSchedule/EcsParameters_PropagateTag")
        }
        {
            $v = "TASK_DEFINITION"
            break
        }

        # Amazon.Scheduler.ScheduleState
        {
            ($_ -eq "Get-SCHScheduleList/State") -Or
            ($_ -eq "New-SCHSchedule/State") -Or
            ($_ -eq "Update-SCHSchedule/State")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SCH_map = @{
    "ActionAfterCompletion"=@("New-SCHSchedule","Update-SCHSchedule")
    "AwsvpcConfiguration_AssignPublicIp"=@("New-SCHSchedule","Update-SCHSchedule")
    "EcsParameters_LaunchType"=@("New-SCHSchedule","Update-SCHSchedule")
    "EcsParameters_PropagateTag"=@("New-SCHSchedule","Update-SCHSchedule")
    "FlexibleTimeWindow_Mode"=@("New-SCHSchedule","Update-SCHSchedule")
    "State"=@("Get-SCHScheduleList","New-SCHSchedule","Update-SCHSchedule")
}

_awsArgumentCompleterRegistration $SCH_Completers $SCH_map

$SCH_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SCH.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SCH_SelectMap = @{
    "Select"=@("New-SCHSchedule",
               "New-SCHScheduleGroup",
               "Remove-SCHSchedule",
               "Remove-SCHScheduleGroup",
               "Get-SCHSchedule",
               "Get-SCHScheduleGroup",
               "Get-SCHScheduleGroupList",
               "Get-SCHScheduleList",
               "Get-SCHResourceTag",
               "Add-SCHResourceTag",
               "Remove-SCHResourceTag",
               "Update-SCHSchedule")
}

_awsArgumentCompleterRegistration $SCH_SelectCompleters $SCH_SelectMap
# Argument completions for service Amazon EventBridge Schema Registry


$SCHM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Schemas.Type
        {
            ($_ -eq "Get-SCHMDiscoveredSchema/Type") -Or
            ($_ -eq "New-SCHMSchema/Type") -Or
            ($_ -eq "Update-SCHMSchema/Type")
        }
        {
            $v = "JSONSchemaDraft4","OpenApi3"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SCHM_map = @{
    "Type"=@("Get-SCHMDiscoveredSchema","New-SCHMSchema","Update-SCHMSchema")
}

_awsArgumentCompleterRegistration $SCHM_Completers $SCHM_map

$SCHM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SCHM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SCHM_SelectMap = @{
    "Select"=@("New-SCHMDiscoverer",
               "New-SCHMRegistry",
               "New-SCHMSchema",
               "Remove-SCHMDiscoverer",
               "Remove-SCHMRegistry",
               "Remove-SCHMResourcePolicy",
               "Remove-SCHMSchema",
               "Remove-SCHMSchemaVersion",
               "Get-SCHMCodeBinding",
               "Get-SCHMDiscoverer",
               "Get-SCHMRegistry",
               "Get-SCHMSchema",
               "Export-SCHMSchema",
               "Get-SCHMCodeBindingSource",
               "Get-SCHMDiscoveredSchema",
               "Get-SCHMResourcePolicy",
               "Get-SCHMDiscovererList",
               "Get-SCHMRegistryList",
               "Get-SCHMSchemaList",
               "Get-SCHMSchemaVersionList",
               "Get-SCHMResourceTag",
               "Write-SCHMCodeBinding",
               "Write-SCHMResourcePolicy",
               "Search-SCHMSchema",
               "Start-SCHMDiscoverer",
               "Stop-SCHMDiscoverer",
               "Add-SCHMResourceTag",
               "Remove-SCHMResourceTag",
               "Update-SCHMDiscoverer",
               "Update-SCHMRegistry",
               "Update-SCHMSchema")
}

_awsArgumentCompleterRegistration $SCHM_SelectCompleters $SCHM_SelectMap
# Argument completions for service AWS Secrets Manager


$SEC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SecretsManager.SortOrderType
        "Get-SECSecretList/SortOrder"
        {
            $v = "asc","desc"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SEC_map = @{
    "SortOrder"=@("Get-SECSecretList")
}

_awsArgumentCompleterRegistration $SEC_Completers $SEC_map

$SEC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SEC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SEC_SelectMap = @{
    "Select"=@("Get-SECBatchSecretValue",
               "Stop-SECSecretRotation",
               "New-SECSecret",
               "Remove-SECResourcePolicy",
               "Remove-SECSecret",
               "Get-SECSecret",
               "Get-SECRandomPassword",
               "Get-SECResourcePolicy",
               "Get-SECSecretValue",
               "Get-SECSecretList",
               "Get-SECSecretVersionIdList",
               "Write-SECResourcePolicy",
               "Write-SECSecretValue",
               "Remove-SECRegionsFromReplication",
               "Add-SECSecretToRegion",
               "Restore-SECSecret",
               "Invoke-SECSecretRotation",
               "Stop-SECReplicationToReplica",
               "Add-SECResourceTag",
               "Remove-SECResourceTag",
               "Update-SECSecret",
               "Update-SECSecretVersionStage",
               "Test-SECResourcePolicy")
}

_awsArgumentCompleterRegistration $SEC_SelectCompleters $SEC_SelectMap
# Argument completions for service AWS Security Hub


$SHUB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SecurityHub.AssociationType
        "Get-SHUBConfigurationPolicyAssociationList/Filters_AssociationType"
        {
            $v = "APPLIED","INHERITED"
            break
        }

        # Amazon.SecurityHub.AutoEnableStandards
        "Update-SHUBOrganizationConfiguration/AutoEnableStandard"
        {
            $v = "DEFAULT","NONE"
            break
        }

        # Amazon.SecurityHub.ConfigurationPolicyAssociationStatus
        "Get-SHUBConfigurationPolicyAssociationList/Filters_AssociationStatus"
        {
            $v = "FAILED","PENDING","SUCCESS"
            break
        }

        # Amazon.SecurityHub.ControlFindingGenerator
        {
            ($_ -eq "Enable-SHUBSecurityHub/ControlFindingGenerator") -Or
            ($_ -eq "Update-SHUBSecurityHubConfiguration/ControlFindingGenerator")
        }
        {
            $v = "SECURITY_CONTROL","STANDARD_CONTROL"
            break
        }

        # Amazon.SecurityHub.ControlStatus
        "Update-SHUBStandardsControl/ControlStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.SecurityHub.OrganizationConfigurationConfigurationType
        "Update-SHUBOrganizationConfiguration/OrganizationConfiguration_ConfigurationType"
        {
            $v = "CENTRAL","LOCAL"
            break
        }

        # Amazon.SecurityHub.OrganizationConfigurationStatus
        "Update-SHUBOrganizationConfiguration/OrganizationConfiguration_Status"
        {
            $v = "ENABLED","FAILED","PENDING"
            break
        }

        # Amazon.SecurityHub.RecordState
        "Update-SHUBFinding/RecordState"
        {
            $v = "ACTIVE","ARCHIVED"
            break
        }

        # Amazon.SecurityHub.RuleStatus
        "New-SHUBAutomationRule/RuleStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.SecurityHub.SeverityLabel
        "Update-SHUBFindingsBatch/Severity_Label"
        {
            $v = "CRITICAL","HIGH","INFORMATIONAL","LOW","MEDIUM"
            break
        }

        # Amazon.SecurityHub.VerificationState
        "Update-SHUBFindingsBatch/VerificationState"
        {
            $v = "BENIGN_POSITIVE","FALSE_POSITIVE","TRUE_POSITIVE","UNKNOWN"
            break
        }

        # Amazon.SecurityHub.WorkflowStatus
        "Update-SHUBFindingsBatch/Workflow_Status"
        {
            $v = "NEW","NOTIFIED","RESOLVED","SUPPRESSED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SHUB_map = @{
    "AutoEnableStandard"=@("Update-SHUBOrganizationConfiguration")
    "ControlFindingGenerator"=@("Enable-SHUBSecurityHub","Update-SHUBSecurityHubConfiguration")
    "ControlStatus"=@("Update-SHUBStandardsControl")
    "Filters_AssociationStatus"=@("Get-SHUBConfigurationPolicyAssociationList")
    "Filters_AssociationType"=@("Get-SHUBConfigurationPolicyAssociationList")
    "OrganizationConfiguration_ConfigurationType"=@("Update-SHUBOrganizationConfiguration")
    "OrganizationConfiguration_Status"=@("Update-SHUBOrganizationConfiguration")
    "RecordState"=@("Update-SHUBFinding")
    "RuleStatus"=@("New-SHUBAutomationRule")
    "Severity_Label"=@("Update-SHUBFindingsBatch")
    "VerificationState"=@("Update-SHUBFindingsBatch")
    "Workflow_Status"=@("Update-SHUBFindingsBatch")
}

_awsArgumentCompleterRegistration $SHUB_Completers $SHUB_map

$SHUB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SHUB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SHUB_SelectMap = @{
    "Select"=@("Confirm-SHUBAdministratorInvitation",
               "Confirm-SHUBInvitation",
               "Remove-SHUBDeleteAutomationRule",
               "Disable-SHUBStandardsBatch",
               "Enable-SHUBStandardsBatch",
               "Get-SHUBGetAutomationRule",
               "Get-SHUBGetConfigurationPolicyAssociation",
               "Get-SHUBGetSecurityControl",
               "Get-SHUBGetStandardsControlAssociation",
               "Import-SHUBFindingsBatch",
               "Edit-SHUBUpdateAutomationRule",
               "Update-SHUBFindingsBatch",
               "Edit-SHUBUpdateStandardsControlAssociation",
               "New-SHUBActionTarget",
               "New-SHUBAutomationRule",
               "New-SHUBConfigurationPolicy",
               "New-SHUBFindingAggregator",
               "New-SHUBInsight",
               "New-SHUBMember",
               "Deny-SHUBInvitation",
               "Remove-SHUBActionTarget",
               "Remove-SHUBConfigurationPolicy",
               "Remove-SHUBFindingAggregator",
               "Remove-SHUBInsight",
               "Remove-SHUBInvitation",
               "Remove-SHUBMember",
               "Get-SHUBActionTarget",
               "Get-SHUBHub",
               "Get-SHUBOrganizationConfiguration",
               "Get-SHUBProduct",
               "Get-SHUBStandard",
               "Get-SHUBStandardsControl",
               "Disable-SHUBImportFindingsForProduct",
               "Disable-SHUBOrganizationAdminAccount",
               "Disable-SHUBSecurityHub",
               "Remove-SHUBFromAdministratorAccount",
               "Remove-SHUBMasterAccountAssociation",
               "Remove-SHUBMemberAssociation",
               "Enable-SHUBImportFindingsForProduct",
               "Enable-SHUBOrganizationAdminAccount",
               "Enable-SHUBSecurityHub",
               "Get-SHUBAdministratorAccount",
               "Get-SHUBConfigurationPolicy",
               "Get-SHUBConfigurationPolicyAssociation",
               "Get-SHUBEnabledStandard",
               "Get-SHUBFindingAggregator",
               "Get-SHUBFindingHistory",
               "Get-SHUBFinding",
               "Get-SHUBInsightResult",
               "Get-SHUBInsight",
               "Get-SHUBInvitationsCount",
               "Get-SHUBMasterAccount",
               "Get-SHUBMember",
               "Get-SHUBSecurityControlDefinition",
               "Send-SHUBMemberInvitation",
               "Get-SHUBAutomationRuleList",
               "Get-SHUBConfigurationPolicyList",
               "Get-SHUBConfigurationPolicyAssociationList",
               "Get-SHUBEnabledProductsForImportList",
               "Get-SHUBFindingAggregatorList",
               "Get-SHUBInvitationList",
               "Get-SHUBMemberList",
               "Get-SHUBOrganizationAdminAccountList",
               "Get-SHUBSecurityControlDefinitionList",
               "Get-SHUBStandardsControlAssociationList",
               "Get-SHUBResourceTag",
               "Start-SHUBConfigurationPolicyAssociation",
               "Start-SHUBConfigurationPolicyDisassociation",
               "Add-SHUBResourceTag",
               "Remove-SHUBResourceTag",
               "Update-SHUBActionTarget",
               "Update-SHUBConfigurationPolicy",
               "Update-SHUBFindingAggregator",
               "Update-SHUBFinding",
               "Update-SHUBInsight",
               "Update-SHUBOrganizationConfiguration",
               "Update-SHUBSecurityControl",
               "Update-SHUBSecurityHubConfiguration",
               "Update-SHUBStandardsControl")
}

_awsArgumentCompleterRegistration $SHUB_SelectCompleters $SHUB_SelectMap
# Argument completions for service Amazon Security Lake


$SLK_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SecurityLake.HttpMethod
        {
            ($_ -eq "New-SLKSubscriberNotification/HttpsNotificationConfiguration_HttpMethod") -Or
            ($_ -eq "Update-SLKSubscriberNotification/HttpsNotificationConfiguration_HttpMethod")
        }
        {
            $v = "POST","PUT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SLK_map = @{
    "HttpsNotificationConfiguration_HttpMethod"=@("New-SLKSubscriberNotification","Update-SLKSubscriberNotification")
}

_awsArgumentCompleterRegistration $SLK_Completers $SLK_map

$SLK_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SLK.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SLK_SelectMap = @{
    "Select"=@("New-SLKAwsLogSource",
               "New-SLKCustomLogSource",
               "New-SLKDataLake",
               "New-SLKDataLakeExceptionSubscription",
               "New-SLKDataLakeOrganizationConfiguration",
               "New-SLKSubscriber",
               "New-SLKSubscriberNotification",
               "Remove-SLKAwsLogSource",
               "Remove-SLKCustomLogSource",
               "Remove-SLKDataLake",
               "Remove-SLKDataLakeExceptionSubscription",
               "Remove-SLKDataLakeOrganizationConfiguration",
               "Remove-SLKSubscriber",
               "Remove-SLKSubscriberNotification",
               "Remove-SLKDataLakeDelegatedAdministrator",
               "Get-SLKDataLakeExceptionSubscription",
               "Get-SLKDataLakeOrganizationConfiguration",
               "Get-SLKDataLakeSource",
               "Get-SLKSubscriber",
               "Get-SLKDataLakeExceptionList",
               "Get-SLKDataLakeList",
               "Get-SLKLogSourceList",
               "Get-SLKSubscriberList",
               "Get-SLKResourceTag",
               "Register-SLKDataLakeDelegatedAdministrator",
               "Add-SLKResourceTag",
               "Remove-SLKResourceTag",
               "Update-SLKDataLake",
               "Update-SLKDataLakeExceptionSubscription",
               "Update-SLKSubscriber",
               "Update-SLKSubscriberNotification")
}

_awsArgumentCompleterRegistration $SLK_SelectCompleters $SLK_SelectMap
# Argument completions for service AWS Serverless Application Repository


$SAR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SAR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SAR_SelectMap = @{
    "Select"=@("New-SARApplication",
               "New-SARApplicationVersion",
               "New-SARCloudFormationChangeSet",
               "New-SARCloudFormationTemplate",
               "Remove-SARApplication",
               "Get-SARApplication",
               "Get-SARApplicationPolicy",
               "Get-SARCloudFormationTemplate",
               "Get-SARApplicationDependencyList",
               "Get-SARApplicationList",
               "Get-SARApplicationVersionList",
               "Set-SARApplicationPolicy",
               "Revoke-SARApplicationSharing",
               "Update-SARApplication")
}

_awsArgumentCompleterRegistration $SAR_SelectCompleters $SAR_SelectMap
# Argument completions for service AWS Service Catalog


$SC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ServiceCatalog.AccessLevelFilterKey
        {
            ($_ -eq "Find-SCProvisionedProduct/AccessLevelFilter_Key") -Or
            ($_ -eq "Get-SCProvisionedProduct/AccessLevelFilter_Key") -Or
            ($_ -eq "Get-SCProvisionedProductPlanList/AccessLevelFilter_Key") -Or
            ($_ -eq "Get-SCRecordHistory/AccessLevelFilter_Key")
        }
        {
            $v = "Account","Role","User"
            break
        }

        # Amazon.ServiceCatalog.DescribePortfolioShareType
        "Get-SCPortfolioShare/Type"
        {
            $v = "ACCOUNT","ORGANIZATION","ORGANIZATIONAL_UNIT","ORGANIZATION_MEMBER_ACCOUNT"
            break
        }

        # Amazon.ServiceCatalog.EngineWorkflowStatus
        {
            ($_ -eq "Start-SCProvisionProductEngineWorkflowResult/Status") -Or
            ($_ -eq "Start-SCTerminateProvisionedProductEngineWorkflowResult/Status") -Or
            ($_ -eq "Start-SCUpdateProvisionedProductEngineWorkflowResult/Status")
        }
        {
            $v = "FAILED","SUCCEEDED"
            break
        }

        # Amazon.ServiceCatalog.OrganizationNodeType
        {
            ($_ -eq "New-SCPortfolioShare/OrganizationNode_Type") -Or
            ($_ -eq "Remove-SCPortfolioShare/OrganizationNode_Type") -Or
            ($_ -eq "Update-SCPortfolioShare/OrganizationNode_Type") -Or
            ($_ -eq "Get-SCOrganizationPortfolioAccessList/OrganizationNodeType")
        }
        {
            $v = "ACCOUNT","ORGANIZATION","ORGANIZATIONAL_UNIT"
            break
        }

        # Amazon.ServiceCatalog.PortfolioShareType
        {
            ($_ -eq "Deny-SCPortfolioShare/PortfolioShareType") -Or
            ($_ -eq "Get-SCAcceptedPortfolioShareList/PortfolioShareType") -Or
            ($_ -eq "Receive-SCPortfolioShare/PortfolioShareType")
        }
        {
            $v = "AWS_ORGANIZATIONS","AWS_SERVICECATALOG","IMPORTED"
            break
        }

        # Amazon.ServiceCatalog.PrincipalType
        {
            ($_ -eq "Register-SCPrincipalWithPortfolio/PrincipalType") -Or
            ($_ -eq "Unregister-SCPrincipalFromPortfolio/PrincipalType")
        }
        {
            $v = "IAM","IAM_PATTERN"
            break
        }

        # Amazon.ServiceCatalog.ProductSource
        "Find-SCProductsAsAdmin/ProductSource"
        {
            $v = "ACCOUNT"
            break
        }

        # Amazon.ServiceCatalog.ProductType
        "New-SCProduct/ProductType"
        {
            $v = "CLOUD_FORMATION_TEMPLATE","EXTERNAL","MARKETPLACE","TERRAFORM_CLOUD","TERRAFORM_OPEN_SOURCE"
            break
        }

        # Amazon.ServiceCatalog.ProductViewSortBy
        {
            ($_ -eq "Find-SCProduct/SortBy") -Or
            ($_ -eq "Find-SCProductsAsAdmin/SortBy")
        }
        {
            $v = "CreationDate","Title","VersionCount"
            break
        }

        # Amazon.ServiceCatalog.ProvisionedProductPlanType
        "New-SCProvisionedProductPlan/PlanType"
        {
            $v = "CLOUDFORMATION"
            break
        }

        # Amazon.ServiceCatalog.ProvisioningArtifactGuidance
        "Update-SCProvisioningArtifact/Guidance"
        {
            $v = "DEFAULT","DEPRECATED"
            break
        }

        # Amazon.ServiceCatalog.ProvisioningArtifactType
        {
            ($_ -eq "New-SCProvisioningArtifact/Parameters_Type") -Or
            ($_ -eq "New-SCProduct/ProvisioningArtifactParameters_Type")
        }
        {
            $v = "CLOUD_FORMATION_TEMPLATE","EXTERNAL","MARKETPLACE_AMI","MARKETPLACE_CAR","TERRAFORM_CLOUD","TERRAFORM_OPEN_SOURCE"
            break
        }

        # Amazon.ServiceCatalog.ServiceActionDefinitionType
        "New-SCServiceAction/DefinitionType"
        {
            $v = "SSM_AUTOMATION"
            break
        }

        # Amazon.ServiceCatalog.SortOrder
        {
            ($_ -eq "Find-SCProduct/SortOrder") -Or
            ($_ -eq "Find-SCProductsAsAdmin/SortOrder") -Or
            ($_ -eq "Find-SCProvisionedProduct/SortOrder")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.ServiceCatalog.SourceType
        {
            ($_ -eq "New-SCProduct/SourceConnection_Type") -Or
            ($_ -eq "Update-SCProduct/SourceConnection_Type")
        }
        {
            $v = "CODESTAR"
            break
        }

        # Amazon.ServiceCatalog.StackSetOperationType
        "Update-SCProvisionedProduct/ProvisioningPreferences_StackSetOperationType"
        {
            $v = "CREATE","DELETE","UPDATE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SC_map = @{
    "AccessLevelFilter_Key"=@("Find-SCProvisionedProduct","Get-SCProvisionedProduct","Get-SCProvisionedProductPlanList","Get-SCRecordHistory")
    "DefinitionType"=@("New-SCServiceAction")
    "Guidance"=@("Update-SCProvisioningArtifact")
    "OrganizationNode_Type"=@("New-SCPortfolioShare","Remove-SCPortfolioShare","Update-SCPortfolioShare")
    "OrganizationNodeType"=@("Get-SCOrganizationPortfolioAccessList")
    "Parameters_Type"=@("New-SCProvisioningArtifact")
    "PlanType"=@("New-SCProvisionedProductPlan")
    "PortfolioShareType"=@("Deny-SCPortfolioShare","Get-SCAcceptedPortfolioShareList","Receive-SCPortfolioShare")
    "PrincipalType"=@("Register-SCPrincipalWithPortfolio","Unregister-SCPrincipalFromPortfolio")
    "ProductSource"=@("Find-SCProductsAsAdmin")
    "ProductType"=@("New-SCProduct")
    "ProvisioningArtifactParameters_Type"=@("New-SCProduct")
    "ProvisioningPreferences_StackSetOperationType"=@("Update-SCProvisionedProduct")
    "SortBy"=@("Find-SCProduct","Find-SCProductsAsAdmin")
    "SortOrder"=@("Find-SCProduct","Find-SCProductsAsAdmin","Find-SCProvisionedProduct")
    "SourceConnection_Type"=@("New-SCProduct","Update-SCProduct")
    "Status"=@("Start-SCProvisionProductEngineWorkflowResult","Start-SCTerminateProvisionedProductEngineWorkflowResult","Start-SCUpdateProvisionedProductEngineWorkflowResult")
    "Type"=@("Get-SCPortfolioShare")
}

_awsArgumentCompleterRegistration $SC_Completers $SC_map

$SC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SC_SelectMap = @{
    "Select"=@("Receive-SCPortfolioShare",
               "Register-SCBudgetWithResource",
               "Register-SCPrincipalWithPortfolio",
               "Register-SCProductWithPortfolio",
               "Add-SCServiceActionAssociationWithProvisioningArtifact",
               "Add-SCTagOptionToResource",
               "Add-SCServiceActionAssociationWithProvisioningArtifactBatch",
               "Remove-SCServiceActionAssociationFromProvisioningArtifactBatch",
               "Copy-SCProduct",
               "New-SCConstraint",
               "New-SCPortfolio",
               "New-SCPortfolioShare",
               "New-SCProduct",
               "New-SCProvisionedProductPlan",
               "New-SCProvisioningArtifact",
               "New-SCServiceAction",
               "New-SCTagOption",
               "Remove-SCConstraint",
               "Remove-SCPortfolio",
               "Remove-SCPortfolioShare",
               "Remove-SCProduct",
               "Remove-SCProvisionedProductPlan",
               "Remove-SCProvisioningArtifact",
               "Remove-SCServiceAction",
               "Remove-SCTagOption",
               "Get-SCConstraint",
               "Get-SCCopyProductStatus",
               "Get-SCPortfolio",
               "Get-SCPortfolioShare",
               "Get-SCPortfolioShareStatus",
               "Get-SCProduct",
               "Get-SCProductAsAdmin",
               "Get-SCProductView",
               "Get-SCProvisionedProductDetail",
               "Get-SCProvisionedProductPlan",
               "Get-SCProvisioningArtifact",
               "Get-SCProvisioningParameter",
               "Get-SCRecord",
               "Get-SCServiceAction",
               "Get-SCServiceActionExecutionParameter",
               "Get-SCTagOption",
               "Disable-SCAWSOrganizationsAccess",
               "Unregister-SCBudgetFromResource",
               "Unregister-SCPrincipalFromPortfolio",
               "Unregister-SCProductFromPortfolio",
               "Remove-SCServiceActionAssociationFromProvisioningArtifact",
               "Remove-SCTagOptionFromResource",
               "Enable-SCAWSOrganizationsAccess",
               "Start-SCProvisionedProductPlanExecution",
               "Start-SCProvisionedProductServiceActionExecution",
               "Get-SCAWSOrganizationsAccessStatus",
               "Get-SCProvisionedProductOutput",
               "Import-SCAsProvisionedProduct",
               "Get-SCAcceptedPortfolioShareList",
               "Get-SCBudgetsForResource",
               "Get-SCConstrainsForPortfolioList",
               "Get-SCLaunchPath",
               "Get-SCOrganizationPortfolioAccessList",
               "Get-SCPortfolioAccessList",
               "Get-SCPortfolioList",
               "Get-SCProductPortfolioList",
               "Get-SCPrincipalsForPortfolio",
               "Get-SCProvisionedProductPlanList",
               "Get-SCProvisioningArtifactList",
               "Get-SCProvisioningArtifactsForServiceActionList",
               "Get-SCRecordHistory",
               "Get-SCResourcesForTagOption",
               "Get-SCServiceActionList",
               "Get-SCServiceActionsForProvisioningArtifactList",
               "Get-SCStackInstancesForProvisionedProduct",
               "Get-SCTagOptionList",
               "Start-SCProvisionProductEngineWorkflowResult",
               "Start-SCTerminateProvisionedProductEngineWorkflowResult",
               "Start-SCUpdateProvisionedProductEngineWorkflowResult",
               "New-SCProvisionedProduct",
               "Deny-SCPortfolioShare",
               "Get-SCProvisionedProduct",
               "Find-SCProduct",
               "Find-SCProductsAsAdmin",
               "Find-SCProvisionedProduct",
               "Remove-SCProvisionedProduct",
               "Update-SCConstraint",
               "Update-SCPortfolio",
               "Update-SCPortfolioShare",
               "Update-SCProduct",
               "Update-SCProvisionedProduct",
               "Update-SCProvisionedProductProperty",
               "Update-SCProvisioningArtifact",
               "Update-SCServiceAction",
               "Update-SCTagOption")
}

_awsArgumentCompleterRegistration $SC_SelectCompleters $SC_SelectMap
# Argument completions for service AWS Service Catalog App Registry


$SCAR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.AppRegistry.ResourceType
        {
            ($_ -eq "Get-SCARAssociatedResource/ResourceType") -Or
            ($_ -eq "Register-SCARResource/ResourceType") -Or
            ($_ -eq "Sync-SCARResource/ResourceType") -Or
            ($_ -eq "Unregister-SCARResource/ResourceType")
        }
        {
            $v = "CFN_STACK","RESOURCE_TAG_VALUE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SCAR_map = @{
    "ResourceType"=@("Get-SCARAssociatedResource","Register-SCARResource","Sync-SCARResource","Unregister-SCARResource")
}

_awsArgumentCompleterRegistration $SCAR_Completers $SCAR_map

$SCAR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SCAR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SCAR_SelectMap = @{
    "Select"=@("Register-SCARAttributeGroup",
               "Register-SCARResource",
               "New-SCARApplication",
               "New-SCARAttributeGroup",
               "Remove-SCARApplication",
               "Remove-SCARAttributeGroup",
               "Unregister-SCARAttributeGroup",
               "Unregister-SCARResource",
               "Get-SCARApplication",
               "Get-SCARAssociatedResource",
               "Get-SCARAttributeGroup",
               "Get-SCARConfiguration",
               "Get-SCARApplicationList",
               "Get-SCARAssociatedAttributeGroupList",
               "Get-SCARAssociatedResourceList",
               "Get-SCARAttributeGroupList",
               "Get-SCARAttributeGroupsForApplicationList",
               "Get-SCARResourceTag",
               "Write-SCARConfiguration",
               "Sync-SCARResource",
               "Add-SCARResourceTag",
               "Remove-SCARResourceTag",
               "Update-SCARApplication",
               "Update-SCARAttributeGroup")
}

_awsArgumentCompleterRegistration $SCAR_SelectCompleters $SCAR_SelectMap
# Argument completions for service AWS Cloud Map


$SD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ServiceDiscovery.CustomHealthStatus
        "Update-SDInstanceCustomHealthStatus/Status"
        {
            $v = "HEALTHY","UNHEALTHY"
            break
        }

        # Amazon.ServiceDiscovery.HealthCheckType
        "New-SDService/HealthCheckConfig_Type"
        {
            $v = "HTTP","HTTPS","TCP"
            break
        }

        # Amazon.ServiceDiscovery.HealthStatusFilter
        "Find-SDInstance/HealthStatus"
        {
            $v = "ALL","HEALTHY","HEALTHY_OR_ELSE_ALL","UNHEALTHY"
            break
        }

        # Amazon.ServiceDiscovery.ServiceTypeOption
        "New-SDService/Type"
        {
            $v = "HTTP"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SD_map = @{
    "HealthCheckConfig_Type"=@("New-SDService")
    "HealthStatus"=@("Find-SDInstance")
    "Status"=@("Update-SDInstanceCustomHealthStatus")
    "Type"=@("New-SDService")
}

_awsArgumentCompleterRegistration $SD_Completers $SD_map

$SD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SD_SelectMap = @{
    "Select"=@("New-SDHttpNamespace",
               "New-SDPrivateDnsNamespace",
               "New-SDPublicDnsNamespace",
               "New-SDService",
               "Remove-SDNamespace",
               "Remove-SDService",
               "Remove-SDInstanceRegistration",
               "Find-SDInstance",
               "Get-SDInstancesRevision",
               "Get-SDInstance",
               "Get-SDInstancesHealthStatus",
               "Get-SDNamespace",
               "Get-SDOperation",
               "Get-SDService",
               "Get-SDInstanceList",
               "Get-SDNamespaceList",
               "Get-SDOperationList",
               "Get-SDServiceList",
               "Get-SDResourceTag",
               "New-SDInstanceRegistration",
               "Add-SDResourceTag",
               "Remove-SDResourceTag",
               "Update-SDHttpNamespace",
               "Update-SDInstanceCustomHealthStatus",
               "Update-SDPrivateDnsNamespace",
               "Update-SDPublicDnsNamespace",
               "Update-SDService")
}

_awsArgumentCompleterRegistration $SD_SelectCompleters $SD_SelectMap
# Argument completions for service AWS Service Quotas


$SQ_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ServiceQuotas.AppliedLevelEnum
        {
            ($_ -eq "Get-SQServiceQuotaList/QuotaAppliedAtLevel") -Or
            ($_ -eq "Get-SQRequestedServiceQuotaChangeHistoryByQuotaList/QuotaRequestedAtLevel") -Or
            ($_ -eq "Get-SQRequestedServiceQuotaChangeHistoryList/QuotaRequestedAtLevel")
        }
        {
            $v = "ACCOUNT","ALL","RESOURCE"
            break
        }

        # Amazon.ServiceQuotas.RequestStatus
        {
            ($_ -eq "Get-SQRequestedServiceQuotaChangeHistoryByQuotaList/Status") -Or
            ($_ -eq "Get-SQRequestedServiceQuotaChangeHistoryList/Status")
        }
        {
            $v = "APPROVED","CASE_CLOSED","CASE_OPENED","DENIED","INVALID_REQUEST","NOT_APPROVED","PENDING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SQ_map = @{
    "QuotaAppliedAtLevel"=@("Get-SQServiceQuotaList")
    "QuotaRequestedAtLevel"=@("Get-SQRequestedServiceQuotaChangeHistoryByQuotaList","Get-SQRequestedServiceQuotaChangeHistoryList")
    "Status"=@("Get-SQRequestedServiceQuotaChangeHistoryByQuotaList","Get-SQRequestedServiceQuotaChangeHistoryList")
}

_awsArgumentCompleterRegistration $SQ_Completers $SQ_map

$SQ_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SQ.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SQ_SelectMap = @{
    "Select"=@("Register-SQServiceQuotaTemplate",
               "Remove-SQServiceQuotaIncreaseRequestFromTemplate",
               "Unregister-SQServiceQuotaTemplate",
               "Get-SQAssociationForServiceQuotaTemplate",
               "Get-SQAWSDefaultServiceQuota",
               "Get-SQRequestedServiceQuotaChange",
               "Get-SQServiceQuota",
               "Get-SQServiceQuotaIncreaseRequestFromTemplate",
               "Get-SQAWSDefaultServiceQuotaList",
               "Get-SQRequestedServiceQuotaChangeHistoryList",
               "Get-SQRequestedServiceQuotaChangeHistoryByQuotaList",
               "Get-SQServiceQuotaIncreaseRequestsInTemplateList",
               "Get-SQServiceQuotaList",
               "Get-SQServiceList",
               "Get-SQResourceTag",
               "Write-SQServiceQuotaIncreaseRequestIntoTemplate",
               "Request-SQServiceQuotaIncrease",
               "Add-SQResourceTag",
               "Remove-SQResourceTag")
}

_awsArgumentCompleterRegistration $SQ_SelectCompleters $SQ_SelectMap
# Argument completions for service Amazon Simple Email Service V2 (SES V2)


$SES2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SimpleEmailV2.BehaviorOnMxFailure
        "Write-SES2EmailIdentityMailFromAttribute/BehaviorOnMxFailure"
        {
            $v = "REJECT_MESSAGE","USE_DEFAULT_VALUE"
            break
        }

        # Amazon.SimpleEmailV2.ContactLanguage
        "Write-SES2AccountDetail/ContactLanguage"
        {
            $v = "EN","JA"
            break
        }

        # Amazon.SimpleEmailV2.ContactListImportAction
        "New-SES2ImportJob/ContactListDestination_ContactListImportAction"
        {
            $v = "DELETE","PUT"
            break
        }

        # Amazon.SimpleEmailV2.DataFormat
        {
            ($_ -eq "New-SES2ExportJob/ExportDestination_DataFormat") -Or
            ($_ -eq "New-SES2ImportJob/ImportDataSource_DataFormat")
        }
        {
            $v = "CSV","JSON"
            break
        }

        # Amazon.SimpleEmailV2.DkimSigningAttributesOrigin
        "Write-SES2EmailIdentityDkimSigningAttribute/SigningAttributesOrigin"
        {
            $v = "AWS_SES","EXTERNAL"
            break
        }

        # Amazon.SimpleEmailV2.DkimSigningKeyLength
        {
            ($_ -eq "New-SES2EmailIdentity/DkimSigningAttributes_NextSigningKeyLength") -Or
            ($_ -eq "Write-SES2EmailIdentityDkimSigningAttribute/SigningAttributes_NextSigningKeyLength")
        }
        {
            $v = "RSA_1024_BIT","RSA_2048_BIT"
            break
        }

        # Amazon.SimpleEmailV2.ExportSourceType
        "Get-SES2ExportJobList/ExportSourceType"
        {
            $v = "MESSAGE_INSIGHTS","METRICS_DATA"
            break
        }

        # Amazon.SimpleEmailV2.FeatureStatus
        {
            ($_ -eq "Write-SES2AccountVdmAttribute/DashboardAttributes_EngagementMetric") -Or
            ($_ -eq "New-SES2ConfigurationSet/DashboardOptions_EngagementMetric") -Or
            ($_ -eq "Write-SES2ConfigurationSetVdmOption/DashboardOptions_EngagementMetric") -Or
            ($_ -eq "Write-SES2AccountVdmAttribute/GuardianAttributes_OptimizedSharedDelivery") -Or
            ($_ -eq "New-SES2ConfigurationSet/GuardianOptions_OptimizedSharedDelivery") -Or
            ($_ -eq "Write-SES2ConfigurationSetVdmOption/GuardianOptions_OptimizedSharedDelivery") -Or
            ($_ -eq "Write-SES2AccountVdmAttribute/VdmAttributes_VdmEnabled")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.SimpleEmailV2.HttpsPolicy
        {
            ($_ -eq "Write-SES2ConfigurationSetTrackingOption/HttpsPolicy") -Or
            ($_ -eq "New-SES2ConfigurationSet/TrackingOptions_HttpsPolicy")
        }
        {
            $v = "OPTIONAL","REQUIRE","REQUIRE_OPEN_ONLY"
            break
        }

        # Amazon.SimpleEmailV2.ImportDestinationType
        "Get-SES2ImportJobList/ImportDestinationType"
        {
            $v = "CONTACT_LIST","SUPPRESSION_LIST"
            break
        }

        # Amazon.SimpleEmailV2.JobStatus
        "Get-SES2ExportJobList/JobStatus"
        {
            $v = "CANCELLED","COMPLETED","CREATED","FAILED","PROCESSING"
            break
        }

        # Amazon.SimpleEmailV2.MailType
        "Write-SES2AccountDetail/MailType"
        {
            $v = "MARKETING","TRANSACTIONAL"
            break
        }

        # Amazon.SimpleEmailV2.MetricNamespace
        "New-SES2ExportJob/MetricsDataSource_Namespace"
        {
            $v = "VDM"
            break
        }

        # Amazon.SimpleEmailV2.ScalingMode
        {
            ($_ -eq "New-SES2DedicatedIpPool/ScalingMode") -Or
            ($_ -eq "Write-SES2DedicatedIpPoolScalingAttribute/ScalingMode")
        }
        {
            $v = "MANAGED","STANDARD"
            break
        }

        # Amazon.SimpleEmailV2.SubscriptionStatus
        "Get-SES2ContactCollection/Filter_FilteredStatus"
        {
            $v = "OPT_IN","OPT_OUT"
            break
        }

        # Amazon.SimpleEmailV2.SuppressionListImportAction
        "New-SES2ImportJob/SuppressionListDestination_SuppressionListImportAction"
        {
            $v = "DELETE","PUT"
            break
        }

        # Amazon.SimpleEmailV2.SuppressionListReason
        "Write-SES2SuppressedDestination/Reason"
        {
            $v = "BOUNCE","COMPLAINT"
            break
        }

        # Amazon.SimpleEmailV2.TlsPolicy
        {
            ($_ -eq "New-SES2ConfigurationSet/DeliveryOptions_TlsPolicy") -Or
            ($_ -eq "Write-SES2ConfigurationSetDeliveryOption/TlsPolicy")
        }
        {
            $v = "OPTIONAL","REQUIRE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SES2_map = @{
    "BehaviorOnMxFailure"=@("Write-SES2EmailIdentityMailFromAttribute")
    "ContactLanguage"=@("Write-SES2AccountDetail")
    "ContactListDestination_ContactListImportAction"=@("New-SES2ImportJob")
    "DashboardAttributes_EngagementMetric"=@("Write-SES2AccountVdmAttribute")
    "DashboardOptions_EngagementMetric"=@("New-SES2ConfigurationSet","Write-SES2ConfigurationSetVdmOption")
    "DeliveryOptions_TlsPolicy"=@("New-SES2ConfigurationSet")
    "DkimSigningAttributes_NextSigningKeyLength"=@("New-SES2EmailIdentity")
    "ExportDestination_DataFormat"=@("New-SES2ExportJob")
    "ExportSourceType"=@("Get-SES2ExportJobList")
    "Filter_FilteredStatus"=@("Get-SES2ContactCollection")
    "GuardianAttributes_OptimizedSharedDelivery"=@("Write-SES2AccountVdmAttribute")
    "GuardianOptions_OptimizedSharedDelivery"=@("New-SES2ConfigurationSet","Write-SES2ConfigurationSetVdmOption")
    "HttpsPolicy"=@("Write-SES2ConfigurationSetTrackingOption")
    "ImportDataSource_DataFormat"=@("New-SES2ImportJob")
    "ImportDestinationType"=@("Get-SES2ImportJobList")
    "JobStatus"=@("Get-SES2ExportJobList")
    "MailType"=@("Write-SES2AccountDetail")
    "MetricsDataSource_Namespace"=@("New-SES2ExportJob")
    "Reason"=@("Write-SES2SuppressedDestination")
    "ScalingMode"=@("New-SES2DedicatedIpPool","Write-SES2DedicatedIpPoolScalingAttribute")
    "SigningAttributes_NextSigningKeyLength"=@("Write-SES2EmailIdentityDkimSigningAttribute")
    "SigningAttributesOrigin"=@("Write-SES2EmailIdentityDkimSigningAttribute")
    "SuppressionListDestination_SuppressionListImportAction"=@("New-SES2ImportJob")
    "TlsPolicy"=@("Write-SES2ConfigurationSetDeliveryOption")
    "TrackingOptions_HttpsPolicy"=@("New-SES2ConfigurationSet")
    "VdmAttributes_VdmEnabled"=@("Write-SES2AccountVdmAttribute")
}

_awsArgumentCompleterRegistration $SES2_Completers $SES2_map

$SES2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SES2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SES2_SelectMap = @{
    "Select"=@("Get-SES2BatchMetricData",
               "Stop-SES2ExportJob",
               "New-SES2ConfigurationSet",
               "New-SES2ConfigurationSetEventDestination",
               "New-SES2Contact",
               "New-SES2ContactList",
               "New-SES2CustomVerificationEmailTemplate",
               "New-SES2DedicatedIpPool",
               "New-SES2DeliverabilityTestReport",
               "New-SES2EmailIdentity",
               "New-SES2EmailIdentityPolicy",
               "New-SES2EmailTemplate",
               "New-SES2ExportJob",
               "New-SES2ImportJob",
               "Remove-SES2ConfigurationSet",
               "Remove-SES2ConfigurationSetEventDestination",
               "Remove-SES2Contact",
               "Remove-SES2ContactList",
               "Remove-SES2CustomVerificationEmailTemplate",
               "Remove-SES2DedicatedIpPool",
               "Remove-SES2EmailIdentity",
               "Remove-SES2EmailIdentityPolicy",
               "Remove-SES2EmailTemplate",
               "Remove-SES2SuppressedDestination",
               "Get-SES2Account",
               "Get-SES2BlacklistReport",
               "Get-SES2ConfigurationSet",
               "Get-SES2ConfigurationSetEventDestination",
               "Get-SES2Contact",
               "Get-SES2ContactList",
               "Get-SES2CustomVerificationEmailTemplate",
               "Get-SES2DedicatedIp",
               "Get-SES2DedicatedIpPool",
               "Get-SES2DedicatedIpList",
               "Get-SES2DeliverabilityDashboardOption",
               "Get-SES2DeliverabilityTestReport",
               "Get-SES2DomainDeliverabilityCampaign",
               "Get-SES2DomainStatisticsReport",
               "Get-SES2EmailIdentity",
               "Get-SES2EmailIdentityPolicy",
               "Get-SES2EmailTemplate",
               "Get-SES2ExportJob",
               "Get-SES2ImportJob",
               "Get-SES2MessageInsight",
               "Get-SES2SuppressedDestination",
               "Get-SES2ConfigurationSetList",
               "Get-SES2ContactListCollection",
               "Get-SES2ContactCollection",
               "Get-SES2CustomVerificationEmailTemplateList",
               "Get-SES2DedicatedIpPoolList",
               "Get-SES2DeliverabilityTestReportList",
               "Get-SES2DomainDeliverabilityCampaignList",
               "Get-SES2EmailIdentityList",
               "Get-SES2EmailTemplateList",
               "Get-SES2ExportJobList",
               "Get-SES2ImportJobList",
               "Get-SES2RecommendationList",
               "Get-SES2SuppressedDestinationList",
               "Get-SES2ResourceTag",
               "Write-SES2AccountDedicatedIpWarmupAttribute",
               "Write-SES2AccountDetail",
               "Write-SES2AccountSendingAttribute",
               "Write-SES2AccountSuppressionAttribute",
               "Write-SES2AccountVdmAttribute",
               "Write-SES2ConfigurationSetDeliveryOption",
               "Write-SES2ConfigurationSetReputationOption",
               "Write-SES2ConfigurationSetSendingOption",
               "Write-SES2ConfigurationSetSuppressionOption",
               "Write-SES2ConfigurationSetTrackingOption",
               "Write-SES2ConfigurationSetVdmOption",
               "Write-SES2DedicatedIpInPool",
               "Write-SES2DedicatedIpPoolScalingAttribute",
               "Write-SES2DedicatedIpWarmupAttribute",
               "Write-SES2DeliverabilityDashboardOption",
               "Write-SES2EmailIdentityConfigurationSetAttribute",
               "Write-SES2EmailIdentityDkimAttribute",
               "Write-SES2EmailIdentityDkimSigningAttribute",
               "Write-SES2EmailIdentityFeedbackAttribute",
               "Write-SES2EmailIdentityMailFromAttribute",
               "Write-SES2SuppressedDestination",
               "Send-SES2BulkEmail",
               "Send-SES2CustomVerificationEmail",
               "Send-SES2Email",
               "Add-SES2ResourceTag",
               "Test-SES2RenderEmailTemplate",
               "Remove-SES2ResourceTag",
               "Update-SES2ConfigurationSetEventDestination",
               "Update-SES2Contact",
               "Update-SES2ContactList",
               "Update-SES2CustomVerificationEmailTemplate",
               "Update-SES2EmailIdentityPolicy",
               "Update-SES2EmailTemplate")
}

_awsArgumentCompleterRegistration $SES2_SelectCompleters $SES2_SelectMap
# Argument completions for service AWS Shield


$SHLD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Shield.AutoRenew
        "Update-SHLDSubscription/AutoRenew"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Shield.ProtectedResourceType
        {
            ($_ -eq "New-SHLDProtectionGroup/ResourceType") -Or
            ($_ -eq "Update-SHLDProtectionGroup/ResourceType")
        }
        {
            $v = "APPLICATION_LOAD_BALANCER","CLASSIC_LOAD_BALANCER","CLOUDFRONT_DISTRIBUTION","ELASTIC_IP_ALLOCATION","GLOBAL_ACCELERATOR","ROUTE_53_HOSTED_ZONE"
            break
        }

        # Amazon.Shield.ProtectionGroupAggregation
        {
            ($_ -eq "New-SHLDProtectionGroup/Aggregation") -Or
            ($_ -eq "Update-SHLDProtectionGroup/Aggregation")
        }
        {
            $v = "MAX","MEAN","SUM"
            break
        }

        # Amazon.Shield.ProtectionGroupPattern
        {
            ($_ -eq "New-SHLDProtectionGroup/Pattern") -Or
            ($_ -eq "Update-SHLDProtectionGroup/Pattern")
        }
        {
            $v = "ALL","ARBITRARY","BY_RESOURCE_TYPE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SHLD_map = @{
    "Aggregation"=@("New-SHLDProtectionGroup","Update-SHLDProtectionGroup")
    "AutoRenew"=@("Update-SHLDSubscription")
    "Pattern"=@("New-SHLDProtectionGroup","Update-SHLDProtectionGroup")
    "ResourceType"=@("New-SHLDProtectionGroup","Update-SHLDProtectionGroup")
}

_awsArgumentCompleterRegistration $SHLD_Completers $SHLD_map

$SHLD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SHLD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SHLD_SelectMap = @{
    "Select"=@("Grant-SHLDDRTLogBucketAssociation",
               "Grant-SHLDDRTRoleAssociation",
               "Add-SHLDHealthCheck",
               "Add-SHLDProactiveEngagementDetail",
               "New-SHLDProtection",
               "New-SHLDProtectionGroup",
               "New-SHLDSubscription",
               "Remove-SHLDProtection",
               "Remove-SHLDProtectionGroup",
               "Remove-SHLDSubscription",
               "Get-SHLDAttack",
               "Get-SHLDAttackStatistic",
               "Get-SHLDDRTAccess",
               "Get-SHLDEmergencyContactSetting",
               "Get-SHLDProtection",
               "Get-SHLDProtectionGroup",
               "Get-SHLDSubscription",
               "Disable-SHLDApplicationLayerAutomaticResponse",
               "Disable-SHLDProactiveEngagement",
               "Revoke-SHLDDRTLogBucketAssociation",
               "Revoke-SHLDDRTRoleAssociation",
               "Remove-SHLDHealthCheck",
               "Enable-SHLDApplicationLayerAutomaticResponse",
               "Enable-SHLDProactiveEngagement",
               "Get-SHLDSubscriptionState",
               "Get-SHLDAttackList",
               "Get-SHLDProtectionGroupList",
               "Get-SHLDProtectionList",
               "Get-SHLDResourcesInProtectionGroupList",
               "Get-SHLDResourceTag",
               "Add-SHLDResourceTag",
               "Remove-SHLDResourceTag",
               "Update-SHLDApplicationLayerAutomaticResponse",
               "Update-SHLDEmergencyContactSetting",
               "Update-SHLDProtectionGroup",
               "Update-SHLDSubscription")
}

_awsArgumentCompleterRegistration $SHLD_SelectCompleters $SHLD_SelectMap
# Argument completions for service AWS SimSpace Weaver


$SSW_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SSW.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SSW_SelectMap = @{
    "Select"=@("New-SSWSnapshot",
               "Remove-SSWApp",
               "Remove-SSWSimulation",
               "Get-SSWApp",
               "Get-SSWSimulation",
               "Get-SSWAppList",
               "Get-SSWSimulationList",
               "Get-SSWResourceTag",
               "Start-SSWApp",
               "Start-SSWClock",
               "Start-SSWSimulation",
               "Stop-SSWApp",
               "Stop-SSWClock",
               "Stop-SSWSimulation",
               "Add-SSWResourceTag",
               "Remove-SSWResourceTag")
}

_awsArgumentCompleterRegistration $SSW_SelectCompleters $SSW_SelectMap
# Argument completions for service AWS Server Migration Service


$SMS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ServerMigrationService.LicenseType
        {
            ($_ -eq "New-SMSReplicationJob/LicenseType") -Or
            ($_ -eq "Update-SMSReplicationJob/LicenseType")
        }
        {
            $v = "AWS","BYOL"
            break
        }

        # Amazon.ServerMigrationService.OutputFormat
        {
            ($_ -eq "New-SMSChangeSet/ChangesetFormat") -Or
            ($_ -eq "New-SMSTemplate/TemplateFormat")
        }
        {
            $v = "JSON","YAML"
            break
        }

        # Amazon.ServerMigrationService.ValidationStatus
        "Write-SMSAppValidationOutput/NotificationContext_Status"
        {
            $v = "FAILED","IN_PROGRESS","PENDING","READY_FOR_VALIDATION","SUCCEEDED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMS_map = @{
    "ChangesetFormat"=@("New-SMSChangeSet")
    "LicenseType"=@("New-SMSReplicationJob","Update-SMSReplicationJob")
    "NotificationContext_Status"=@("Write-SMSAppValidationOutput")
    "TemplateFormat"=@("New-SMSTemplate")
}

_awsArgumentCompleterRegistration $SMS_Completers $SMS_map

$SMS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SMS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMS_SelectMap = @{
    "Select"=@("New-SMSApp",
               "New-SMSReplicationJob",
               "Remove-SMSApp",
               "Remove-SMSAppLaunchConfiguration",
               "Remove-SMSAppReplicationConfiguration",
               "Remove-SMSAppValidationConfiguration",
               "Remove-SMSReplicationJob",
               "Remove-SMSServerCatalog",
               "Unregister-SMSConnector",
               "New-SMSChangeSet",
               "New-SMSTemplate",
               "Get-SMSApp",
               "Get-SMSAppLaunchConfiguration",
               "Get-SMSAppReplicationConfiguration",
               "Get-SMSAppValidationConfiguration",
               "Get-SMSAppValidationOutput",
               "Get-SMSConnector",
               "Get-SMSReplicationJob",
               "Get-SMSReplicationRun",
               "Get-SMSServer",
               "Import-SMSAppCatalog",
               "Import-SMSServerCatalog",
               "Start-SMSApp",
               "Get-SMSAppList",
               "Write-SMSAppValidationOutput",
               "Write-SMSAppLaunchConfiguration",
               "Write-SMSAppReplicationConfiguration",
               "Write-SMSAppValidationConfiguration",
               "Start-SMSAppReplication",
               "Start-SMSOnDemandAppReplication",
               "Start-SMSOnDemandReplicationRun",
               "Stop-SMSAppReplication",
               "Stop-SMSApp",
               "Update-SMSApp",
               "Update-SMSReplicationJob")
}

_awsArgumentCompleterRegistration $SMS_SelectCompleters $SMS_SelectMap
# Argument completions for service AWS Import/Export Snowball


$SNOW_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Snowball.AddressType
        "New-SNOWAddress/Address_Type"
        {
            $v = "AWS_SHIP","CUST_PICKUP"
            break
        }

        # Amazon.Snowball.ImpactLevel
        "New-SNOWJob/ImpactLevel"
        {
            $v = "IL2","IL4","IL5","IL6","IL99"
            break
        }

        # Amazon.Snowball.JobType
        {
            ($_ -eq "New-SNOWCluster/JobType") -Or
            ($_ -eq "New-SNOWJob/JobType")
        }
        {
            $v = "EXPORT","IMPORT","LOCAL_USE"
            break
        }

        # Amazon.Snowball.LongTermPricingType
        "New-SNOWLongTermPricing/LongTermPricingType"
        {
            $v = "OneMonth","OneYear","ThreeYear"
            break
        }

        # Amazon.Snowball.RemoteManagement
        {
            ($_ -eq "New-SNOWCluster/RemoteManagement") -Or
            ($_ -eq "New-SNOWJob/RemoteManagement")
        }
        {
            $v = "INSTALLED_AUTOSTART","INSTALLED_ONLY","NOT_INSTALLED"
            break
        }

        # Amazon.Snowball.ServiceName
        "Get-SNOWServiceVersion/ServiceName"
        {
            $v = "EKS_ANYWHERE","KUBERNETES"
            break
        }

        # Amazon.Snowball.ShipmentState
        "Update-SNOWJobShipmentState/ShipmentState"
        {
            $v = "RECEIVED","RETURNED"
            break
        }

        # Amazon.Snowball.ShippingOption
        {
            ($_ -eq "New-SNOWCluster/ShippingOption") -Or
            ($_ -eq "New-SNOWJob/ShippingOption") -Or
            ($_ -eq "New-SNOWReturnShippingLabel/ShippingOption") -Or
            ($_ -eq "Update-SNOWCluster/ShippingOption") -Or
            ($_ -eq "Update-SNOWJob/ShippingOption")
        }
        {
            $v = "EXPRESS","NEXT_DAY","SECOND_DAY","STANDARD"
            break
        }

        # Amazon.Snowball.SnowballCapacity
        {
            ($_ -eq "New-SNOWCluster/SnowballCapacityPreference") -Or
            ($_ -eq "New-SNOWJob/SnowballCapacityPreference") -Or
            ($_ -eq "Update-SNOWJob/SnowballCapacityPreference")
        }
        {
            $v = "NoPreference","T100","T13","T14","T240","T32","T42","T50","T8","T80","T98"
            break
        }

        # Amazon.Snowball.SnowballType
        {
            ($_ -eq "New-SNOWCluster/SnowballType") -Or
            ($_ -eq "New-SNOWJob/SnowballType") -Or
            ($_ -eq "New-SNOWLongTermPricing/SnowballType")
        }
        {
            $v = "EDGE","EDGE_C","EDGE_CG","EDGE_S","RACK_5U_C","SNC1_HDD","SNC1_SSD","STANDARD","V3_5C","V3_5S"
            break
        }

        # Amazon.Snowball.StorageUnit
        {
            ($_ -eq "New-SNOWCluster/NFSOnDeviceService_StorageUnit") -Or
            ($_ -eq "New-SNOWJob/NFSOnDeviceService_StorageUnit") -Or
            ($_ -eq "Update-SNOWCluster/NFSOnDeviceService_StorageUnit") -Or
            ($_ -eq "Update-SNOWJob/NFSOnDeviceService_StorageUnit") -Or
            ($_ -eq "New-SNOWCluster/S3OnDeviceService_StorageUnit") -Or
            ($_ -eq "New-SNOWJob/S3OnDeviceService_StorageUnit") -Or
            ($_ -eq "Update-SNOWCluster/S3OnDeviceService_StorageUnit") -Or
            ($_ -eq "Update-SNOWJob/S3OnDeviceService_StorageUnit") -Or
            ($_ -eq "New-SNOWCluster/TGWOnDeviceService_StorageUnit") -Or
            ($_ -eq "New-SNOWJob/TGWOnDeviceService_StorageUnit") -Or
            ($_ -eq "Update-SNOWCluster/TGWOnDeviceService_StorageUnit") -Or
            ($_ -eq "Update-SNOWJob/TGWOnDeviceService_StorageUnit")
        }
        {
            $v = "TB"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SNOW_map = @{
    "Address_Type"=@("New-SNOWAddress")
    "ImpactLevel"=@("New-SNOWJob")
    "JobType"=@("New-SNOWCluster","New-SNOWJob")
    "LongTermPricingType"=@("New-SNOWLongTermPricing")
    "NFSOnDeviceService_StorageUnit"=@("New-SNOWCluster","New-SNOWJob","Update-SNOWCluster","Update-SNOWJob")
    "RemoteManagement"=@("New-SNOWCluster","New-SNOWJob")
    "S3OnDeviceService_StorageUnit"=@("New-SNOWCluster","New-SNOWJob","Update-SNOWCluster","Update-SNOWJob")
    "ServiceName"=@("Get-SNOWServiceVersion")
    "ShipmentState"=@("Update-SNOWJobShipmentState")
    "ShippingOption"=@("New-SNOWCluster","New-SNOWJob","New-SNOWReturnShippingLabel","Update-SNOWCluster","Update-SNOWJob")
    "SnowballCapacityPreference"=@("New-SNOWCluster","New-SNOWJob","Update-SNOWJob")
    "SnowballType"=@("New-SNOWCluster","New-SNOWJob","New-SNOWLongTermPricing")
    "TGWOnDeviceService_StorageUnit"=@("New-SNOWCluster","New-SNOWJob","Update-SNOWCluster","Update-SNOWJob")
}

_awsArgumentCompleterRegistration $SNOW_Completers $SNOW_map

$SNOW_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SNOW.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SNOW_SelectMap = @{
    "Select"=@("Stop-SNOWCluster",
               "Stop-SNOWJob",
               "New-SNOWAddress",
               "New-SNOWCluster",
               "New-SNOWJob",
               "New-SNOWLongTermPricing",
               "New-SNOWReturnShippingLabel",
               "Get-SNOWAddress",
               "Get-SNOWAddressList",
               "Get-SNOWCluster",
               "Get-SNOWJob",
               "Get-SNOWReturnShippingLabel",
               "Get-SNOWJobManifest",
               "Get-SNOWJobUnlockCode",
               "Get-SNOWSnowballUsage",
               "Get-SNOWSoftwareUpdate",
               "Get-SNOWClusterJobList",
               "Get-SNOWClusterList",
               "Get-SNOWCompatibleImageList",
               "Get-SNOWJobList",
               "Get-SNOWLongTermPricing",
               "Get-SNOWPickupLocation",
               "Get-SNOWServiceVersion",
               "Update-SNOWCluster",
               "Update-SNOWJob",
               "Update-SNOWJobShipmentState",
               "Update-SNOWLongTermPricing")
}

_awsArgumentCompleterRegistration $SNOW_SelectCompleters $SNOW_SelectMap
# Argument completions for service AWS Snow Device Management


$SDMS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SnowDeviceManagement.ExecutionState
        "Get-SDMSExecutionList/State"
        {
            $v = "CANCELED","FAILED","IN_PROGRESS","QUEUED","REJECTED","SUCCEEDED","TIMED_OUT"
            break
        }

        # Amazon.SnowDeviceManagement.TaskState
        "Get-SDMSTaskList/State"
        {
            $v = "CANCELED","COMPLETED","IN_PROGRESS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SDMS_map = @{
    "State"=@("Get-SDMSExecutionList","Get-SDMSTaskList")
}

_awsArgumentCompleterRegistration $SDMS_Completers $SDMS_map

$SDMS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SDMS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SDMS_SelectMap = @{
    "Select"=@("Stop-SDMSTask",
               "New-SDMSTask",
               "Get-SDMSDevice",
               "Get-SDMSDeviceEc2Instance",
               "Get-SDMSExecution",
               "Get-SDMSTask",
               "Get-SDMSDeviceResourceList",
               "Get-SDMSDeviceList",
               "Get-SDMSExecutionList",
               "Get-SDMSResourceTag",
               "Get-SDMSTaskList",
               "Add-SDMSResourceTag",
               "Remove-SDMSResourceTag")
}

_awsArgumentCompleterRegistration $SDMS_SelectCompleters $SDMS_SelectMap
# Argument completions for service Amazon Simple Notification Service (SNS)


$SNS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SimpleNotificationService.LanguageCodeString
        "New-SNSSMSSandboxPhoneNumber/LanguageCode"
        {
            $v = "de-DE","en-GB","en-US","es-419","es-ES","fr-CA","fr-FR","it-IT","ja-JP","kr-KR","pt-BR","zh-CN","zh-TW"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SNS_map = @{
    "LanguageCode"=@("New-SNSSMSSandboxPhoneNumber")
}

_awsArgumentCompleterRegistration $SNS_Completers $SNS_map

$SNS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SNS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SNS_SelectMap = @{
    "Select"=@("Add-SNSPermission",
               "Test-SNSIfPhoneNumberIsOptedOut",
               "Confirm-SNSSubscription",
               "New-SNSPlatformApplication",
               "New-SNSPlatformEndpoint",
               "New-SNSSMSSandboxPhoneNumber",
               "New-SNSTopic",
               "Remove-SNSEndpoint",
               "Remove-SNSPlatformApplication",
               "Remove-SNSSMSSandboxPhoneNumber",
               "Remove-SNSTopic",
               "Get-SNSDataProtectionPolicy",
               "Get-SNSEndpointAttribute",
               "Get-SNSPlatformApplicationAttribute",
               "Get-SNSSMSAttribute",
               "Get-SNSSMSSandboxAccountStatus",
               "Get-SNSSubscriptionAttribute",
               "Get-SNSTopicAttribute",
               "Get-SNSEndpointsByPlatformApplication",
               "Get-SNSOriginationNumber",
               "Get-SNSPhoneNumbersOptedOut",
               "Get-SNSPlatformApplicationList",
               "Get-SNSSMSSandboxPhoneNumber",
               "Get-SNSSubscription",
               "Get-SNSSubscriptionByTopic",
               "Get-SNSResourceTag",
               "Get-SNSTopic",
               "Enable-SNSPhoneNumber",
               "Publish-SNSMessage",
               "Publish-SNSBatch",
               "Set-SNSDataProtectionPolicy",
               "Remove-SNSPermission",
               "Set-SNSEndpointAttribute",
               "Set-SNSPlatformApplicationAttribute",
               "Set-SNSSMSAttribute",
               "Set-SNSSubscriptionAttribute",
               "Set-SNSTopicAttribute",
               "Connect-SNSNotification",
               "Add-SNSResourceTag",
               "Disconnect-SNSNotification",
               "Remove-SNSResourceTag",
               "Confirm-SNSSMSSandboxPhoneNumber")
}

_awsArgumentCompleterRegistration $SNS_SelectCompleters $SNS_SelectMap
# Argument completions for service AWS End User Messaging Social


$SOCIAL_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SOCIAL.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SOCIAL_SelectMap = @{
    "Select"=@("Connect-SOCIALWhatsAppBusinessAccount",
               "Remove-SOCIALWhatsAppMessageMedia",
               "Disconnect-SOCIALWhatsAppBusinessAccount",
               "Get-SOCIALLinkedWhatsAppBusinessAccount",
               "Get-SOCIALLinkedWhatsAppBusinessAccountPhoneNumber",
               "Get-SOCIALWhatsAppMessageMedia",
               "Get-SOCIALLinkedWhatsAppBusinessAccountList",
               "Get-SOCIALResourceTag",
               "Send-SOCIALWhatsAppMessageMedia",
               "Write-SOCIALWhatsAppBusinessAccountEventDestination",
               "Send-SOCIALWhatsAppMessage",
               "Add-SOCIALResourceTag",
               "Remove-SOCIALResourceTag")
}

_awsArgumentCompleterRegistration $SOCIAL_SelectCompleters $SOCIAL_SelectMap
# Argument completions for service Amazon Simple Queue Service (SQS)


$SQS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SQS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SQS_SelectMap = @{
    "Select"=@("Add-SQSPermission",
               "Stop-SQSMessageMoveTask",
               "Edit-SQSMessageVisibility",
               "Edit-SQSMessageVisibilityBatch",
               "New-SQSQueue",
               "Remove-SQSMessage",
               "Remove-SQSMessageBatch",
               "Remove-SQSQueue",
               "Get-SQSQueueAttribute",
               "Get-SQSQueueUrl",
               "Get-SQSDeadLetterSourceQueue",
               "Get-SQSMessageMoveTask",
               "Get-SQSQueue",
               "Get-SQSResourceTag",
               "Clear-SQSQueue",
               "Receive-SQSMessage",
               "Remove-SQSPermission",
               "Send-SQSMessage",
               "Send-SQSMessageBatch",
               "Set-SQSQueueAttribute",
               "Start-SQSMessageMoveTask",
               "Add-SQSResourceTag",
               "Remove-SQSResourceTag")
}

_awsArgumentCompleterRegistration $SQS_SelectCompleters $SQS_SelectMap
# Argument completions for service AWS Systems Manager


$SSM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SimpleSystemsManagement.AssociationComplianceSeverity
        {
            ($_ -eq "New-SSMAssociation/ComplianceSeverity") -Or
            ($_ -eq "Update-SSMAssociation/ComplianceSeverity")
        }
        {
            $v = "CRITICAL","HIGH","LOW","MEDIUM","UNSPECIFIED"
            break
        }

        # Amazon.SimpleSystemsManagement.AssociationStatusName
        "Update-SSMAssociationStatus/AssociationStatus_Name"
        {
            $v = "Failed","Pending","Success"
            break
        }

        # Amazon.SimpleSystemsManagement.AssociationSyncCompliance
        {
            ($_ -eq "New-SSMAssociation/SyncCompliance") -Or
            ($_ -eq "Update-SSMAssociation/SyncCompliance")
        }
        {
            $v = "AUTO","MANUAL"
            break
        }

        # Amazon.SimpleSystemsManagement.ComplianceUploadType
        "Write-SSMComplianceItem/UploadType"
        {
            $v = "COMPLETE","PARTIAL"
            break
        }

        # Amazon.SimpleSystemsManagement.DocumentFormat
        {
            ($_ -eq "Get-SSMDocument/DocumentFormat") -Or
            ($_ -eq "New-SSMDocument/DocumentFormat") -Or
            ($_ -eq "Update-SSMDocument/DocumentFormat")
        }
        {
            $v = "JSON","TEXT","YAML"
            break
        }

        # Amazon.SimpleSystemsManagement.DocumentHashType
        {
            ($_ -eq "Send-SSMCommand/DocumentHashType") -Or
            ($_ -eq "Register-SSMTaskWithMaintenanceWindow/RunCommand_DocumentHashType") -Or
            ($_ -eq "Update-SSMMaintenanceWindowTask/RunCommand_DocumentHashType")
        }
        {
            $v = "Sha1","Sha256"
            break
        }

        # Amazon.SimpleSystemsManagement.DocumentMetadataEnum
        "Get-SSMDocumentMetadataHistory/Metadata"
        {
            $v = "DocumentReviews"
            break
        }

        # Amazon.SimpleSystemsManagement.DocumentPermissionType
        {
            ($_ -eq "Edit-SSMDocumentPermission/PermissionType") -Or
            ($_ -eq "Get-SSMDocumentPermission/PermissionType")
        }
        {
            $v = "Share"
            break
        }

        # Amazon.SimpleSystemsManagement.DocumentReviewAction
        "Update-SSMDocumentMetadata/DocumentReviews_Action"
        {
            $v = "Approve","Reject","SendForReview","UpdateReview"
            break
        }

        # Amazon.SimpleSystemsManagement.DocumentType
        "New-SSMDocument/DocumentType"
        {
            $v = "ApplicationConfiguration","ApplicationConfigurationSchema","Automation","Automation.ChangeTemplate","ChangeCalendar","CloudFormation","Command","ConformancePackTemplate","DeploymentStrategy","Package","Policy","ProblemAnalysis","ProblemAnalysisTemplate","QuickSetup","Session"
            break
        }

        # Amazon.SimpleSystemsManagement.ExecutionMode
        "Start-SSMAutomationExecution/Mode"
        {
            $v = "Auto","Interactive"
            break
        }

        # Amazon.SimpleSystemsManagement.InventorySchemaDeleteOption
        "Remove-SSMInventory/SchemaDeleteOption"
        {
            $v = "DeleteSchema","DisableSchema"
            break
        }

        # Amazon.SimpleSystemsManagement.MaintenanceWindowResourceType
        {
            ($_ -eq "Get-SSMMaintenanceWindowSchedule/ResourceType") -Or
            ($_ -eq "Get-SSMMaintenanceWindowsForTarget/ResourceType") -Or
            ($_ -eq "Register-SSMTargetWithMaintenanceWindow/ResourceType")
        }
        {
            $v = "INSTANCE","RESOURCE_GROUP"
            break
        }

        # Amazon.SimpleSystemsManagement.MaintenanceWindowTaskCutoffBehavior
        {
            ($_ -eq "Register-SSMTaskWithMaintenanceWindow/CutoffBehavior") -Or
            ($_ -eq "Update-SSMMaintenanceWindowTask/CutoffBehavior")
        }
        {
            $v = "CANCEL_TASK","CONTINUE_TASK"
            break
        }

        # Amazon.SimpleSystemsManagement.MaintenanceWindowTaskType
        "Register-SSMTaskWithMaintenanceWindow/TaskType"
        {
            $v = "AUTOMATION","LAMBDA","RUN_COMMAND","STEP_FUNCTIONS"
            break
        }

        # Amazon.SimpleSystemsManagement.NotificationType
        {
            ($_ -eq "Register-SSMTaskWithMaintenanceWindow/NotificationConfig_NotificationType") -Or
            ($_ -eq "Send-SSMCommand/NotificationConfig_NotificationType") -Or
            ($_ -eq "Update-SSMMaintenanceWindowTask/NotificationConfig_NotificationType")
        }
        {
            $v = "Command","Invocation"
            break
        }

        # Amazon.SimpleSystemsManagement.OperatingSystem
        {
            ($_ -eq "Get-SSMDeployablePatchSnapshotForInstance/BaselineOverride_OperatingSystem") -Or
            ($_ -eq "Get-SSMDefaultPatchBaseline/OperatingSystem") -Or
            ($_ -eq "Get-SSMPatchBaselineForPatchGroup/OperatingSystem") -Or
            ($_ -eq "Get-SSMPatchProperty/OperatingSystem") -Or
            ($_ -eq "New-SSMPatchBaseline/OperatingSystem")
        }
        {
            $v = "ALMA_LINUX","AMAZON_LINUX","AMAZON_LINUX_2","AMAZON_LINUX_2022","AMAZON_LINUX_2023","CENTOS","DEBIAN","MACOS","ORACLE_LINUX","RASPBIAN","REDHAT_ENTERPRISE_LINUX","ROCKY_LINUX","SUSE","UBUNTU","WINDOWS"
            break
        }

        # Amazon.SimpleSystemsManagement.OpsItemStatus
        "Update-SSMOpsItem/Status"
        {
            $v = "Approved","Cancelled","Cancelling","ChangeCalendarOverrideApproved","ChangeCalendarOverrideRejected","Closed","CompletedWithFailure","CompletedWithSuccess","Failed","InProgress","Open","Pending","PendingApproval","PendingChangeCalendarOverride","Rejected","Resolved","RunbookInProgress","Scheduled","TimedOut"
            break
        }

        # Amazon.SimpleSystemsManagement.ParameterTier
        "Write-SSMParameter/Tier"
        {
            $v = "Advanced","Intelligent-Tiering","Standard"
            break
        }

        # Amazon.SimpleSystemsManagement.ParameterType
        "Write-SSMParameter/Type"
        {
            $v = "SecureString","String","StringList"
            break
        }

        # Amazon.SimpleSystemsManagement.PatchAction
        {
            ($_ -eq "Get-SSMDeployablePatchSnapshotForInstance/BaselineOverride_RejectedPatchesAction") -Or
            ($_ -eq "New-SSMPatchBaseline/RejectedPatchesAction") -Or
            ($_ -eq "Update-SSMPatchBaseline/RejectedPatchesAction")
        }
        {
            $v = "ALLOW_AS_DEPENDENCY","BLOCK"
            break
        }

        # Amazon.SimpleSystemsManagement.PatchComplianceLevel
        {
            ($_ -eq "New-SSMPatchBaseline/ApprovedPatchesComplianceLevel") -Or
            ($_ -eq "Update-SSMPatchBaseline/ApprovedPatchesComplianceLevel") -Or
            ($_ -eq "Get-SSMDeployablePatchSnapshotForInstance/BaselineOverride_ApprovedPatchesComplianceLevel")
        }
        {
            $v = "CRITICAL","HIGH","INFORMATIONAL","LOW","MEDIUM","UNSPECIFIED"
            break
        }

        # Amazon.SimpleSystemsManagement.PatchProperty
        "Get-SSMPatchProperty/Property"
        {
            $v = "CLASSIFICATION","MSRC_SEVERITY","PRIORITY","PRODUCT","PRODUCT_FAMILY","SEVERITY"
            break
        }

        # Amazon.SimpleSystemsManagement.PatchSet
        "Get-SSMPatchProperty/PatchSet"
        {
            $v = "APPLICATION","OS"
            break
        }

        # Amazon.SimpleSystemsManagement.ResourceDataSyncS3Format
        "New-SSMResourceDataSync/S3Destination_SyncFormat"
        {
            $v = "JsonSerDe"
            break
        }

        # Amazon.SimpleSystemsManagement.ResourceTypeForTagging
        {
            ($_ -eq "Add-SSMResourceTag/ResourceType") -Or
            ($_ -eq "Get-SSMResourceTag/ResourceType") -Or
            ($_ -eq "Remove-SSMResourceTag/ResourceType")
        }
        {
            $v = "Association","Automation","Document","MaintenanceWindow","ManagedInstance","OpsItem","OpsMetadata","Parameter","PatchBaseline"
            break
        }

        # Amazon.SimpleSystemsManagement.SessionState
        "Get-SSMSession/State"
        {
            $v = "Active","History"
            break
        }

        # Amazon.SimpleSystemsManagement.SignalType
        "Send-SSMAutomationSignal/SignalType"
        {
            $v = "Approve","Reject","Resume","StartStep","StopStep"
            break
        }

        # Amazon.SimpleSystemsManagement.StopType
        "Stop-SSMAutomationExecution/Type"
        {
            $v = "Cancel","Complete"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SSM_map = @{
    "ApprovedPatchesComplianceLevel"=@("New-SSMPatchBaseline","Update-SSMPatchBaseline")
    "AssociationStatus_Name"=@("Update-SSMAssociationStatus")
    "BaselineOverride_ApprovedPatchesComplianceLevel"=@("Get-SSMDeployablePatchSnapshotForInstance")
    "BaselineOverride_OperatingSystem"=@("Get-SSMDeployablePatchSnapshotForInstance")
    "BaselineOverride_RejectedPatchesAction"=@("Get-SSMDeployablePatchSnapshotForInstance")
    "ComplianceSeverity"=@("New-SSMAssociation","Update-SSMAssociation")
    "CutoffBehavior"=@("Register-SSMTaskWithMaintenanceWindow","Update-SSMMaintenanceWindowTask")
    "DocumentFormat"=@("Get-SSMDocument","New-SSMDocument","Update-SSMDocument")
    "DocumentHashType"=@("Send-SSMCommand")
    "DocumentReviews_Action"=@("Update-SSMDocumentMetadata")
    "DocumentType"=@("New-SSMDocument")
    "Metadata"=@("Get-SSMDocumentMetadataHistory")
    "Mode"=@("Start-SSMAutomationExecution")
    "NotificationConfig_NotificationType"=@("Register-SSMTaskWithMaintenanceWindow","Send-SSMCommand","Update-SSMMaintenanceWindowTask")
    "OperatingSystem"=@("Get-SSMDefaultPatchBaseline","Get-SSMPatchBaselineForPatchGroup","Get-SSMPatchProperty","New-SSMPatchBaseline")
    "PatchSet"=@("Get-SSMPatchProperty")
    "PermissionType"=@("Edit-SSMDocumentPermission","Get-SSMDocumentPermission")
    "Property"=@("Get-SSMPatchProperty")
    "RejectedPatchesAction"=@("New-SSMPatchBaseline","Update-SSMPatchBaseline")
    "ResourceType"=@("Add-SSMResourceTag","Get-SSMMaintenanceWindowSchedule","Get-SSMMaintenanceWindowsForTarget","Get-SSMResourceTag","Register-SSMTargetWithMaintenanceWindow","Remove-SSMResourceTag")
    "RunCommand_DocumentHashType"=@("Register-SSMTaskWithMaintenanceWindow","Update-SSMMaintenanceWindowTask")
    "S3Destination_SyncFormat"=@("New-SSMResourceDataSync")
    "SchemaDeleteOption"=@("Remove-SSMInventory")
    "SignalType"=@("Send-SSMAutomationSignal")
    "State"=@("Get-SSMSession")
    "Status"=@("Update-SSMOpsItem")
    "SyncCompliance"=@("New-SSMAssociation","Update-SSMAssociation")
    "TaskType"=@("Register-SSMTaskWithMaintenanceWindow")
    "Tier"=@("Write-SSMParameter")
    "Type"=@("Stop-SSMAutomationExecution","Write-SSMParameter")
    "UploadType"=@("Write-SSMComplianceItem")
}

_awsArgumentCompleterRegistration $SSM_Completers $SSM_map

$SSM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SSM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SSM_SelectMap = @{
    "Select"=@("Add-SSMResourceTag",
               "Register-SSMOpsItemRelatedItem",
               "Stop-SSMCommand",
               "Stop-SSMMaintenanceWindowExecution",
               "New-SSMActivation",
               "New-SSMAssociation",
               "New-SSMAssociationFromBatch",
               "New-SSMDocument",
               "New-SSMMaintenanceWindow",
               "New-SSMOpsItem",
               "New-SSMOpsMetadata",
               "New-SSMPatchBaseline",
               "New-SSMResourceDataSync",
               "Remove-SSMActivation",
               "Remove-SSMAssociation",
               "Remove-SSMDocument",
               "Remove-SSMInventory",
               "Remove-SSMMaintenanceWindow",
               "Remove-SSMOpsItem",
               "Remove-SSMOpsMetadata",
               "Remove-SSMParameter",
               "Remove-SSMParameterCollection",
               "Remove-SSMPatchBaseline",
               "Remove-SSMResourceDataSync",
               "Remove-SSMResourcePolicy",
               "Unregister-SSMManagedInstance",
               "Unregister-SSMPatchBaselineForPatchGroup",
               "Unregister-SSMTargetFromMaintenanceWindow",
               "Unregister-SSMTaskFromMaintenanceWindow",
               "Get-SSMActivation",
               "Get-SSMAssociation",
               "Get-SSMAssociationExecution",
               "Get-SSMAssociationExecutionTarget",
               "Get-SSMAutomationExecutionList",
               "Get-SSMAutomationStepExecution",
               "Get-SSMAvailablePatch",
               "Get-SSMDocumentDescription",
               "Get-SSMDocumentPermission",
               "Get-SSMEffectiveInstanceAssociationList",
               "Get-SSMEffectivePatchesForPatchBaseline",
               "Get-SSMInstanceAssociationsStatus",
               "Get-SSMInstanceInformation",
               "Get-SSMInstancePatch",
               "Get-SSMInstancePatchState",
               "Get-SSMInstancePatchStatesForPatchGroup",
               "Get-SSMInstanceProperty",
               "Get-SSMInventoryDeletionList",
               "Get-SSMMaintenanceWindowExecutionList",
               "Get-SSMMaintenanceWindowExecutionTaskInvocationList",
               "Get-SSMMaintenanceWindowExecutionTaskList",
               "Get-SSMMaintenanceWindowList",
               "Get-SSMMaintenanceWindowSchedule",
               "Get-SSMMaintenanceWindowsForTarget",
               "Get-SSMMaintenanceWindowTarget",
               "Get-SSMMaintenanceWindowTaskList",
               "Get-SSMOpsItemSummary",
               "Get-SSMParameterList",
               "Get-SSMPatchBaseline",
               "Get-SSMPatchGroup",
               "Get-SSMPatchGroupState",
               "Get-SSMPatchProperty",
               "Get-SSMSession",
               "Unregister-SSMOpsItemRelatedItem",
               "Get-SSMAutomationExecution",
               "Get-SSMCalendarState",
               "Get-SSMCommandInvocationDetail",
               "Get-SSMConnectionStatus",
               "Get-SSMDefaultPatchBaseline",
               "Get-SSMDeployablePatchSnapshotForInstance",
               "Get-SSMDocument",
               "Get-SSMInventory",
               "Get-SSMInventorySchema",
               "Get-SSMMaintenanceWindow",
               "Get-SSMMaintenanceWindowExecution",
               "Get-SSMMaintenanceWindowExecutionTask",
               "Get-SSMMaintenanceWindowExecutionTaskInvocation",
               "Get-SSMMaintenanceWindowTask",
               "Get-SSMOpsItem",
               "Get-SSMOpsMetadata",
               "Get-SSMOpsSummary",
               "Get-SSMParameter",
               "Get-SSMParameterHistory",
               "Get-SSMParameterValue",
               "Get-SSMParametersByPath",
               "Get-SSMPatchBaselineDetail",
               "Get-SSMPatchBaselineForPatchGroup",
               "Get-SSMResourcePolicy",
               "Get-SSMServiceSetting",
               "Set-SSMParameterVersionLabel",
               "Get-SSMAssociationList",
               "Get-SSMAssociationVersionList",
               "Get-SSMCommandInvocation",
               "Get-SSMCommand",
               "Get-SSMComplianceItemList",
               "Get-SSMComplianceSummaryList",
               "Get-SSMDocumentMetadataHistory",
               "Get-SSMDocumentList",
               "Get-SSMDocumentVersionList",
               "Get-SSMInventoryEntryList",
               "Get-SSMOpsItemEvent",
               "Get-SSMOpsItemRelatedItem",
               "Get-SSMOpsMetadataList",
               "Get-SSMResourceComplianceSummaryList",
               "Get-SSMResourceDataSync",
               "Get-SSMResourceTag",
               "Edit-SSMDocumentPermission",
               "Write-SSMComplianceItem",
               "Write-SSMInventory",
               "Write-SSMParameter",
               "Write-SSMResourcePolicy",
               "Register-SSMDefaultPatchBaseline",
               "Register-SSMPatchBaselineForPatchGroup",
               "Register-SSMTargetWithMaintenanceWindow",
               "Register-SSMTaskWithMaintenanceWindow",
               "Remove-SSMResourceTag",
               "Reset-SSMServiceSetting",
               "Resume-SSMSession",
               "Send-SSMAutomationSignal",
               "Send-SSMCommand",
               "Start-SSMAssociationsOnce",
               "Start-SSMAutomationExecution",
               "Start-SSMChangeRequestExecution",
               "Start-SSMSession",
               "Stop-SSMAutomationExecution",
               "Stop-SSMSession",
               "Reset-SSMParameterVersionLabel",
               "Update-SSMAssociation",
               "Update-SSMAssociationStatus",
               "Update-SSMDocument",
               "Update-SSMDocumentDefaultVersion",
               "Update-SSMDocumentMetadata",
               "Update-SSMMaintenanceWindow",
               "Update-SSMMaintenanceWindowTarget",
               "Update-SSMMaintenanceWindowTask",
               "Update-SSMManagedInstanceRole",
               "Update-SSMOpsItem",
               "Update-SSMOpsMetadata",
               "Update-SSMPatchBaseline",
               "Update-SSMResourceDataSync",
               "Update-SSMServiceSetting",
               "Get-SSMLatestEC2Image")
}

_awsArgumentCompleterRegistration $SSM_SelectCompleters $SSM_SelectMap
# Argument completions for service AWS Systems Manager Incident Manager Contacts


$SMC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SSMContacts.AcceptCodeValidation
        "Confirm-SMCPage/AcceptCodeValidation"
        {
            $v = "ENFORCE","IGNORE"
            break
        }

        # Amazon.SSMContacts.AcceptType
        "Confirm-SMCPage/AcceptType"
        {
            $v = "DELIVERED","READ"
            break
        }

        # Amazon.SSMContacts.ChannelType
        "New-SMCContactChannel/Type"
        {
            $v = "EMAIL","SMS","VOICE"
            break
        }

        # Amazon.SSMContacts.ContactType
        {
            ($_ -eq "Get-SMCContactList/Type") -Or
            ($_ -eq "New-SMCContact/Type")
        }
        {
            $v = "ESCALATION","ONCALL_SCHEDULE","PERSONAL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMC_map = @{
    "AcceptCodeValidation"=@("Confirm-SMCPage")
    "AcceptType"=@("Confirm-SMCPage")
    "Type"=@("Get-SMCContactList","New-SMCContact","New-SMCContactChannel")
}

_awsArgumentCompleterRegistration $SMC_Completers $SMC_map

$SMC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SMC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMC_SelectMap = @{
    "Select"=@("Confirm-SMCPage",
               "Enable-SMCContactChannel",
               "New-SMCContact",
               "New-SMCContactChannel",
               "New-SMCRotation",
               "New-SMCRotationOverride",
               "Disable-SMCContactChannel",
               "Remove-SMCContact",
               "Remove-SMCContactChannel",
               "Remove-SMCRotation",
               "Remove-SMCRotationOverride",
               "Get-SMCEngagement",
               "Get-SMCPage",
               "Get-SMCContact",
               "Get-SMCContactChannel",
               "Get-SMCContactPolicy",
               "Get-SMCRotation",
               "Get-SMCRotationOverride",
               "Get-SMCContactChannelList",
               "Get-SMCContactList",
               "Get-SMCEngagementList",
               "Get-SMCPageReceiptList",
               "Get-SMCPageResolutionList",
               "Get-SMCPagesByContactList",
               "Get-SMCPagesByEngagementList",
               "Get-SMCPreviewRotationShiftList",
               "Get-SMCRotationOverrideList",
               "Get-SMCRotationList",
               "Get-SMCRotationShiftList",
               "Get-SMCResourceTag",
               "Write-SMCContactPolicy",
               "Send-SMCActivationCode",
               "Start-SMCEngagement",
               "Stop-SMCEngagement",
               "Add-SMCResourceTag",
               "Remove-SMCResourceTag",
               "Update-SMCContact",
               "Update-SMCContactChannel",
               "Update-SMCRotation")
}

_awsArgumentCompleterRegistration $SMC_SelectCompleters $SMC_SelectMap
# Argument completions for service AWS Systems Manager Incident Manager


$SSMI_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SSMIncidents.IncidentRecordStatus
        "Update-SSMIIncidentRecord/Status"
        {
            $v = "OPEN","RESOLVED"
            break
        }

        # Amazon.SSMIncidents.ItemType
        {
            ($_ -eq "Update-SSMIRelatedItem/Identifier_Type") -Or
            ($_ -eq "Update-SSMIRelatedItem/ItemToRemove_Type")
        }
        {
            $v = "ANALYSIS","ATTACHMENT","AUTOMATION","INCIDENT","INVOLVED_RESOURCE","METRIC","OTHER","PARENT","TASK"
            break
        }

        # Amazon.SSMIncidents.SortOrder
        "Get-SSMITimelineEventList/SortOrder"
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.SSMIncidents.TimelineEventSort
        "Get-SSMITimelineEventList/SortBy"
        {
            $v = "EVENT_TIME"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SSMI_map = @{
    "Identifier_Type"=@("Update-SSMIRelatedItem")
    "ItemToRemove_Type"=@("Update-SSMIRelatedItem")
    "SortBy"=@("Get-SSMITimelineEventList")
    "SortOrder"=@("Get-SSMITimelineEventList")
    "Status"=@("Update-SSMIIncidentRecord")
}

_awsArgumentCompleterRegistration $SSMI_Completers $SSMI_map

$SSMI_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SSMI.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SSMI_SelectMap = @{
    "Select"=@("Get-SSMIBatchIncidentFinding",
               "New-SSMIReplicationSet",
               "New-SSMIResponsePlan",
               "New-SSMITimelineEvent",
               "Remove-SSMIIncidentRecord",
               "Remove-SSMIReplicationSet",
               "Remove-SSMIResourcePolicy",
               "Remove-SSMIResponsePlan",
               "Remove-SSMITimelineEvent",
               "Get-SSMIIncidentRecord",
               "Get-SSMIReplicationSet",
               "Get-SSMIResourcePolicy",
               "Get-SSMIResponsePlan",
               "Get-SSMITimelineEvent",
               "Get-SSMIIncidentFindingList",
               "Get-SSMIIncidentRecordList",
               "Get-SSMIRelatedItemList",
               "Get-SSMIReplicationSetList",
               "Get-SSMIResponsePlanList",
               "Get-SSMIResourceTag",
               "Get-SSMITimelineEventList",
               "Write-SSMIResourcePolicy",
               "Start-SSMIIncident",
               "Add-SSMIResourceTag",
               "Remove-SSMIResourceTag",
               "Update-SSMIDeletionProtection",
               "Update-SSMIIncidentRecord",
               "Update-SSMIRelatedItem",
               "Update-SSMIReplicationSet",
               "Update-SSMIResponsePlan",
               "Update-SSMITimelineEvent")
}

_awsArgumentCompleterRegistration $SSMI_SelectCompleters $SSMI_SelectMap
# Argument completions for service AWS Systems Manager QuickSetup


$SSMQS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SSMQS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SSMQS_SelectMap = @{
    "Select"=@("New-SSMQSConfigurationManager",
               "Remove-SSMQSConfigurationManager",
               "Get-SSMQSConfigurationManager",
               "Get-SSMQSServiceSetting",
               "Get-SSMQSConfigurationManagerList",
               "Get-SSMQSQuickSetupTypeList",
               "Get-SSMQSResourceTag",
               "Add-SSMQSResourceTag",
               "Remove-SSMQSResourceTag",
               "Update-SSMQSConfigurationDefinition",
               "Update-SSMQSConfigurationManager",
               "Update-SSMQSServiceSetting")
}

_awsArgumentCompleterRegistration $SSMQS_SelectCompleters $SSMQS_SelectMap
# Argument completions for service AWS Systems Manager for SAP


$SMSAP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SsmSap.ApplicationType
        "Register-SMSAPApplication/ApplicationType"
        {
            $v = "HANA","SAP_ABAP"
            break
        }

        # Amazon.SsmSap.BackintMode
        "Update-SMSAPApplicationSetting/Backint_BackintMode"
        {
            $v = "AWSBackup"
            break
        }

        # Amazon.SsmSap.ConnectedEntityType
        "Stop-SMSAPApplication/StopConnectedEntity"
        {
            $v = "DBMS"
            break
        }

        # Amazon.SsmSap.PermissionActionType
        {
            ($_ -eq "Get-SMSAPResourcePermission/ActionType") -Or
            ($_ -eq "Remove-SMSAPResourcePermission/ActionType") -Or
            ($_ -eq "Write-SMSAPResourcePermission/ActionType")
        }
        {
            $v = "RESTORE"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMSAP_map = @{
    "ActionType"=@("Get-SMSAPResourcePermission","Remove-SMSAPResourcePermission","Write-SMSAPResourcePermission")
    "ApplicationType"=@("Register-SMSAPApplication")
    "Backint_BackintMode"=@("Update-SMSAPApplicationSetting")
    "StopConnectedEntity"=@("Stop-SMSAPApplication")
}

_awsArgumentCompleterRegistration $SMSAP_Completers $SMSAP_map

$SMSAP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SMSAP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SMSAP_SelectMap = @{
    "Select"=@("Remove-SMSAPResourcePermission",
               "Unregister-SMSAPApplication",
               "Get-SMSAPApplication",
               "Get-SMSAPComponent",
               "Get-SMSAPDatabase",
               "Get-SMSAPOperation",
               "Get-SMSAPResourcePermission",
               "Get-SMSAPApplicationList",
               "Get-SMSAPComponentList",
               "Get-SMSAPDatabasisList",
               "Get-SMSAPOperationEventList",
               "Get-SMSAPOperationList",
               "Get-SMSAPResourceTag",
               "Write-SMSAPResourcePermission",
               "Register-SMSAPApplication",
               "Start-SMSAPApplication",
               "Start-SMSAPApplicationRefresh",
               "Stop-SMSAPApplication",
               "Add-SMSAPResourceTag",
               "Remove-SMSAPResourceTag",
               "Update-SMSAPApplicationSetting")
}

_awsArgumentCompleterRegistration $SMSAP_SelectCompleters $SMSAP_SelectMap
# Argument completions for service AWS Single Sign-On


$SSO_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SSO.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SSO_SelectMap = @{
    "Select"=@("Get-SSORoleCredential",
               "Get-SSOAccountRoleList",
               "Get-SSOAccountList",
               "Close-SSOSession")
}

_awsArgumentCompleterRegistration $SSO_SelectCompleters $SSO_SelectMap
# Argument completions for service AWS Single Sign-On Admin


$SSOADMN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SSOAdmin.ApplicationStatus
        {
            ($_ -eq "New-SSOADMNApplication/Status") -Or
            ($_ -eq "Update-SSOADMNApplication/Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.SSOAdmin.ApplicationVisibility
        "New-SSOADMNApplication/PortalOptions_Visibility"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.SSOAdmin.AuthenticationMethodType
        {
            ($_ -eq "Get-SSOADMNApplicationAuthenticationMethod/AuthenticationMethodType") -Or
            ($_ -eq "Remove-SSOADMNApplicationAuthenticationMethod/AuthenticationMethodType") -Or
            ($_ -eq "Write-SSOADMNApplicationAuthenticationMethod/AuthenticationMethodType")
        }
        {
            $v = "IAM"
            break
        }

        # Amazon.SSOAdmin.GrantType
        {
            ($_ -eq "Get-SSOADMNApplicationGrant/GrantType") -Or
            ($_ -eq "Remove-SSOADMNApplicationGrant/GrantType") -Or
            ($_ -eq "Write-SSOADMNApplicationGrant/GrantType")
        }
        {
            $v = "authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:jwt-bearer","urn:ietf:params:oauth:grant-type:token-exchange"
            break
        }

        # Amazon.SSOAdmin.JwksRetrievalOption
        {
            ($_ -eq "New-SSOADMNTrustedTokenIssuer/OidcJwtConfiguration_JwksRetrievalOption") -Or
            ($_ -eq "Update-SSOADMNTrustedTokenIssuer/OidcJwtConfiguration_JwksRetrievalOption")
        }
        {
            $v = "OPEN_ID_DISCOVERY"
            break
        }

        # Amazon.SSOAdmin.PrincipalType
        {
            ($_ -eq "Get-SSOADMNAccountAssignmentsForPrincipalList/PrincipalType") -Or
            ($_ -eq "Get-SSOADMNApplicationAssignment/PrincipalType") -Or
            ($_ -eq "Get-SSOADMNApplicationAssignmentsForPrincipalList/PrincipalType") -Or
            ($_ -eq "New-SSOADMNAccountAssignment/PrincipalType") -Or
            ($_ -eq "New-SSOADMNApplicationAssignment/PrincipalType") -Or
            ($_ -eq "Remove-SSOADMNAccountAssignment/PrincipalType") -Or
            ($_ -eq "Remove-SSOADMNApplicationAssignment/PrincipalType")
        }
        {
            $v = "GROUP","USER"
            break
        }

        # Amazon.SSOAdmin.ProvisioningStatus
        {
            ($_ -eq "Get-SSOADMNAccountsForProvisionedPermissionSetList/ProvisioningStatus") -Or
            ($_ -eq "Get-SSOADMNPermissionSetsProvisionedToAccountList/ProvisioningStatus")
        }
        {
            $v = "LATEST_PERMISSION_SET_NOT_PROVISIONED","LATEST_PERMISSION_SET_PROVISIONED"
            break
        }

        # Amazon.SSOAdmin.ProvisionTargetType
        "Add-SSOADMNPermissionSetProvision/TargetType"
        {
            $v = "ALL_PROVISIONED_ACCOUNTS","AWS_ACCOUNT"
            break
        }

        # Amazon.SSOAdmin.SignInOrigin
        {
            ($_ -eq "New-SSOADMNApplication/SignInOptions_Origin") -Or
            ($_ -eq "Update-SSOADMNApplication/SignInOptions_Origin")
        }
        {
            $v = "APPLICATION","IDENTITY_CENTER"
            break
        }

        # Amazon.SSOAdmin.StatusValues
        {
            ($_ -eq "Get-SSOADMNAccountAssignmentCreationStatusList/Filter_Status") -Or
            ($_ -eq "Get-SSOADMNAccountAssignmentDeletionStatusList/Filter_Status") -Or
            ($_ -eq "Get-SSOADMNPermissionSetProvisioningStatusList/Filter_Status")
        }
        {
            $v = "FAILED","IN_PROGRESS","SUCCEEDED"
            break
        }

        # Amazon.SSOAdmin.TargetType
        {
            ($_ -eq "New-SSOADMNAccountAssignment/TargetType") -Or
            ($_ -eq "Remove-SSOADMNAccountAssignment/TargetType")
        }
        {
            $v = "AWS_ACCOUNT"
            break
        }

        # Amazon.SSOAdmin.TrustedTokenIssuerType
        "New-SSOADMNTrustedTokenIssuer/TrustedTokenIssuerType"
        {
            $v = "OIDC_JWT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SSOADMN_map = @{
    "AuthenticationMethodType"=@("Get-SSOADMNApplicationAuthenticationMethod","Remove-SSOADMNApplicationAuthenticationMethod","Write-SSOADMNApplicationAuthenticationMethod")
    "Filter_Status"=@("Get-SSOADMNAccountAssignmentCreationStatusList","Get-SSOADMNAccountAssignmentDeletionStatusList","Get-SSOADMNPermissionSetProvisioningStatusList")
    "GrantType"=@("Get-SSOADMNApplicationGrant","Remove-SSOADMNApplicationGrant","Write-SSOADMNApplicationGrant")
    "OidcJwtConfiguration_JwksRetrievalOption"=@("New-SSOADMNTrustedTokenIssuer","Update-SSOADMNTrustedTokenIssuer")
    "PortalOptions_Visibility"=@("New-SSOADMNApplication")
    "PrincipalType"=@("Get-SSOADMNAccountAssignmentsForPrincipalList","Get-SSOADMNApplicationAssignment","Get-SSOADMNApplicationAssignmentsForPrincipalList","New-SSOADMNAccountAssignment","New-SSOADMNApplicationAssignment","Remove-SSOADMNAccountAssignment","Remove-SSOADMNApplicationAssignment")
    "ProvisioningStatus"=@("Get-SSOADMNAccountsForProvisionedPermissionSetList","Get-SSOADMNPermissionSetsProvisionedToAccountList")
    "SignInOptions_Origin"=@("New-SSOADMNApplication","Update-SSOADMNApplication")
    "Status"=@("New-SSOADMNApplication","Update-SSOADMNApplication")
    "TargetType"=@("Add-SSOADMNPermissionSetProvision","New-SSOADMNAccountAssignment","Remove-SSOADMNAccountAssignment")
    "TrustedTokenIssuerType"=@("New-SSOADMNTrustedTokenIssuer")
}

_awsArgumentCompleterRegistration $SSOADMN_Completers $SSOADMN_map

$SSOADMN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SSOADMN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SSOADMN_SelectMap = @{
    "Select"=@("Mount-SSOADMNCustomerManagedPolicyReferenceToPermissionSet",
               "Mount-SSOADMNManagedPolicyToPermissionSet",
               "New-SSOADMNAccountAssignment",
               "New-SSOADMNApplication",
               "New-SSOADMNApplicationAssignment",
               "New-SSOADMNInstance",
               "New-SSOADMNInstanceAccessControlAttributeConfiguration",
               "New-SSOADMNPermissionSet",
               "New-SSOADMNTrustedTokenIssuer",
               "Remove-SSOADMNAccountAssignment",
               "Remove-SSOADMNApplication",
               "Remove-SSOADMNApplicationAccessScope",
               "Remove-SSOADMNApplicationAssignment",
               "Remove-SSOADMNApplicationAuthenticationMethod",
               "Remove-SSOADMNApplicationGrant",
               "Remove-SSOADMNInlinePolicyFromPermissionSet",
               "Remove-SSOADMNInstance",
               "Remove-SSOADMNInstanceAccessControlAttributeConfiguration",
               "Remove-SSOADMNPermissionsBoundaryFromPermissionSet",
               "Remove-SSOADMNPermissionSet",
               "Remove-SSOADMNTrustedTokenIssuer",
               "Get-SSOADMNAccountAssignmentCreationStatus",
               "Get-SSOADMNAccountAssignmentDeletionStatus",
               "Get-SSOADMNApplication",
               "Get-SSOADMNApplicationAssignment",
               "Get-SSOADMNApplicationProvider",
               "Get-SSOADMNInstance",
               "Get-SSOADMNInstanceAccessControlAttributeConfiguration",
               "Get-SSOADMNPermissionSet",
               "Get-SSOADMNPermissionSetProvisioningStatus",
               "Get-SSOADMNTrustedTokenIssuer",
               "Dismount-SSOADMNCustomerManagedPolicyReferenceFromPermissionSet",
               "Dismount-SSOADMNManagedPolicyFromPermissionSet",
               "Get-SSOADMNApplicationAccessScope",
               "Get-SSOADMNApplicationAssignmentConfiguration",
               "Get-SSOADMNApplicationAuthenticationMethod",
               "Get-SSOADMNApplicationGrant",
               "Get-SSOADMNInlinePolicyForPermissionSet",
               "Get-SSOADMNPermissionsBoundaryForPermissionSet",
               "Get-SSOADMNAccountAssignmentCreationStatusList",
               "Get-SSOADMNAccountAssignmentDeletionStatusList",
               "Get-SSOADMNAccountAssignmentList",
               "Get-SSOADMNAccountAssignmentsForPrincipalList",
               "Get-SSOADMNAccountsForProvisionedPermissionSetList",
               "Get-SSOADMNApplicationAccessScopeList",
               "Get-SSOADMNApplicationAssignmentList",
               "Get-SSOADMNApplicationAssignmentsForPrincipalList",
               "Get-SSOADMNApplicationAuthenticationMethodList",
               "Get-SSOADMNApplicationGrantList",
               "Get-SSOADMNApplicationProviderList",
               "Get-SSOADMNApplicationList",
               "Get-SSOADMNCustomerManagedPolicyReferencesInPermissionSetList",
               "Get-SSOADMNInstanceList",
               "Get-SSOADMNManagedPoliciesInPermissionSetList",
               "Get-SSOADMNPermissionSetProvisioningStatusList",
               "Get-SSOADMNPermissionSetList",
               "Get-SSOADMNPermissionSetsProvisionedToAccountList",
               "Get-SSOADMNResourceTag",
               "Get-SSOADMNTrustedTokenIssuerList",
               "Add-SSOADMNPermissionSetProvision",
               "Write-SSOADMNApplicationAccessScope",
               "Write-SSOADMNApplicationAssignmentConfiguration",
               "Write-SSOADMNApplicationAuthenticationMethod",
               "Write-SSOADMNApplicationGrant",
               "Write-SSOADMNInlinePolicyToPermissionSet",
               "Write-SSOADMNPermissionsBoundaryToPermissionSet",
               "Add-SSOADMNResourceTag",
               "Remove-SSOADMNResourceTag",
               "Update-SSOADMNApplication",
               "Update-SSOADMNInstance",
               "Update-SSOADMNInstanceAccessControlAttributeConfiguration",
               "Update-SSOADMNPermissionSet",
               "Update-SSOADMNTrustedTokenIssuer")
}

_awsArgumentCompleterRegistration $SSOADMN_SelectCompleters $SSOADMN_SelectMap
# Argument completions for service AWS Single Sign-On OIDC


$SSOOIDC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SSOOIDC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SSOOIDC_SelectMap = @{
    "Select"=@("New-SSOOIDCToken",
               "New-SSOOIDCTokenWithIAM",
               "Register-SSOOIDCClient",
               "Start-SSOOIDCDeviceAuthorization")
}

_awsArgumentCompleterRegistration $SSOOIDC_SelectCompleters $SSOOIDC_SelectMap
# Argument completions for service AWS Step Functions


$SFN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.StepFunctions.EncryptionType
        {
            ($_ -eq "New-SFNActivity/EncryptionConfiguration_Type") -Or
            ($_ -eq "New-SFNStateMachine/EncryptionConfiguration_Type") -Or
            ($_ -eq "Update-SFNStateMachine/EncryptionConfiguration_Type")
        }
        {
            $v = "AWS_OWNED_KEY","CUSTOMER_MANAGED_KMS_KEY"
            break
        }

        # Amazon.StepFunctions.ExecutionRedriveFilter
        "Get-SFNExecutionList/RedriveFilter"
        {
            $v = "NOT_REDRIVEN","REDRIVEN"
            break
        }

        # Amazon.StepFunctions.ExecutionStatus
        "Get-SFNExecutionList/StatusFilter"
        {
            $v = "ABORTED","FAILED","PENDING_REDRIVE","RUNNING","SUCCEEDED","TIMED_OUT"
            break
        }

        # Amazon.StepFunctions.IncludedData
        {
            ($_ -eq "Get-SFNExecution/IncludedData") -Or
            ($_ -eq "Get-SFNStateMachine/IncludedData") -Or
            ($_ -eq "Get-SFNStateMachineForExecution/IncludedData") -Or
            ($_ -eq "Start-SFNSyncExecution/IncludedData")
        }
        {
            $v = "ALL_DATA","METADATA_ONLY"
            break
        }

        # Amazon.StepFunctions.InspectionLevel
        "Test-SFNState/InspectionLevel"
        {
            $v = "DEBUG","INFO","TRACE"
            break
        }

        # Amazon.StepFunctions.LogLevel
        {
            ($_ -eq "New-SFNStateMachine/LoggingConfiguration_Level") -Or
            ($_ -eq "Update-SFNStateMachine/LoggingConfiguration_Level")
        }
        {
            $v = "ALL","ERROR","FATAL","OFF"
            break
        }

        # Amazon.StepFunctions.StateMachineType
        {
            ($_ -eq "New-SFNStateMachine/Type") -Or
            ($_ -eq "Test-SFNStateMachineDefinitionValidation/Type")
        }
        {
            $v = "EXPRESS","STANDARD"
            break
        }

        # Amazon.StepFunctions.ValidateStateMachineDefinitionSeverity
        "Test-SFNStateMachineDefinitionValidation/Severity"
        {
            $v = "ERROR","WARNING"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SFN_map = @{
    "EncryptionConfiguration_Type"=@("New-SFNActivity","New-SFNStateMachine","Update-SFNStateMachine")
    "IncludedData"=@("Get-SFNExecution","Get-SFNStateMachine","Get-SFNStateMachineForExecution","Start-SFNSyncExecution")
    "InspectionLevel"=@("Test-SFNState")
    "LoggingConfiguration_Level"=@("New-SFNStateMachine","Update-SFNStateMachine")
    "RedriveFilter"=@("Get-SFNExecutionList")
    "Severity"=@("Test-SFNStateMachineDefinitionValidation")
    "StatusFilter"=@("Get-SFNExecutionList")
    "Type"=@("New-SFNStateMachine","Test-SFNStateMachineDefinitionValidation")
}

_awsArgumentCompleterRegistration $SFN_Completers $SFN_map

$SFN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SFN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SFN_SelectMap = @{
    "Select"=@("New-SFNActivity",
               "New-SFNStateMachine",
               "New-SFNStateMachineAlias",
               "Remove-SFNActivity",
               "Remove-SFNStateMachine",
               "Remove-SFNStateMachineAlias",
               "Remove-SFNStateMachineVersion",
               "Get-SFNActivity",
               "Get-SFNExecution",
               "Get-SFNMapRun",
               "Get-SFNStateMachine",
               "Get-SFNStateMachineAlias",
               "Get-SFNStateMachineForExecution",
               "Get-SFNActivityTask",
               "Get-SFNExecutionHistory",
               "Get-SFNActivityList",
               "Get-SFNExecutionList",
               "Get-SFNMapRunList",
               "Get-SFNStateMachineAliasList",
               "Get-SFNStateMachineList",
               "Get-SFNStateMachineVersionList",
               "Get-SFNResourceTag",
               "Publish-SFNStateMachineVersion",
               "Restart-SFNExecution",
               "Send-SFNTaskFailure",
               "Send-SFNTaskHeartbeat",
               "Send-SFNTaskSuccess",
               "Start-SFNExecution",
               "Start-SFNSyncExecution",
               "Stop-SFNExecution",
               "Add-SFNResourceTag",
               "Test-SFNState",
               "Remove-SFNResourceTag",
               "Update-SFNMapRun",
               "Update-SFNStateMachine",
               "Update-SFNStateMachineAlias",
               "Test-SFNStateMachineDefinitionValidation")
}

_awsArgumentCompleterRegistration $SFN_SelectCompleters $SFN_SelectMap
# Argument completions for service AWS Storage Gateway


$SG_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.StorageGateway.AutomaticUpdatePolicy
        "Update-SGMaintenanceStartTime/SoftwareUpdatePreferences_AutomaticUpdatePolicy"
        {
            $v = "ALL_VERSIONS","EMERGENCY_VERSIONS_ONLY"
            break
        }

        # Amazon.StorageGateway.CaseSensitivity
        {
            ($_ -eq "New-SGSMBFileShare/CaseSensitivity") -Or
            ($_ -eq "Update-SGSMBFileShare/CaseSensitivity")
        }
        {
            $v = "CaseSensitive","ClientSpecified"
            break
        }

        # Amazon.StorageGateway.EncryptionType
        {
            ($_ -eq "New-SGNFSFileShare/EncryptionType") -Or
            ($_ -eq "New-SGSMBFileShare/EncryptionType") -Or
            ($_ -eq "Update-SGNFSFileShare/EncryptionType") -Or
            ($_ -eq "Update-SGSMBFileShare/EncryptionType")
        }
        {
            $v = "DsseKms","SseKms","SseS3"
            break
        }

        # Amazon.StorageGateway.GatewayCapacity
        "Update-SGGatewayInformation/GatewayCapacity"
        {
            $v = "Large","Medium","Small"
            break
        }

        # Amazon.StorageGateway.ObjectACL
        {
            ($_ -eq "New-SGNFSFileShare/ObjectACL") -Or
            ($_ -eq "New-SGSMBFileShare/ObjectACL") -Or
            ($_ -eq "Update-SGNFSFileShare/ObjectACL") -Or
            ($_ -eq "Update-SGSMBFileShare/ObjectACL")
        }
        {
            $v = "authenticated-read","aws-exec-read","bucket-owner-full-control","bucket-owner-read","private","public-read","public-read-write"
            break
        }

        # Amazon.StorageGateway.RetentionLockType
        "New-SGTapePool/RetentionLockType"
        {
            $v = "COMPLIANCE","GOVERNANCE","NONE"
            break
        }

        # Amazon.StorageGateway.SMBSecurityStrategy
        "Update-SGSMBSecurityStrategy/SMBSecurityStrategy"
        {
            $v = "ClientSpecified","MandatoryEncryption","MandatoryEncryptionNoAes128","MandatorySigning"
            break
        }

        # Amazon.StorageGateway.TapeStorageClass
        "New-SGTapePool/StorageClass"
        {
            $v = "DEEP_ARCHIVE","GLACIER"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SG_map = @{
    "CaseSensitivity"=@("New-SGSMBFileShare","Update-SGSMBFileShare")
    "EncryptionType"=@("New-SGNFSFileShare","New-SGSMBFileShare","Update-SGNFSFileShare","Update-SGSMBFileShare")
    "GatewayCapacity"=@("Update-SGGatewayInformation")
    "ObjectACL"=@("New-SGNFSFileShare","New-SGSMBFileShare","Update-SGNFSFileShare","Update-SGSMBFileShare")
    "RetentionLockType"=@("New-SGTapePool")
    "SMBSecurityStrategy"=@("Update-SGSMBSecurityStrategy")
    "SoftwareUpdatePreferences_AutomaticUpdatePolicy"=@("Update-SGMaintenanceStartTime")
    "StorageClass"=@("New-SGTapePool")
}

_awsArgumentCompleterRegistration $SG_Completers $SG_map

$SG_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SG.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SG_SelectMap = @{
    "Select"=@("Enable-SGGateway",
               "Add-SGCache",
               "Add-SGResourceTag",
               "Add-SGUploadBuffer",
               "Add-SGWorkingStorage",
               "Add-SGTapeToTapePool",
               "New-SGSGFileSystemAssociation",
               "Mount-SGVolume",
               "Stop-SGArchival",
               "Stop-SGRetrieval",
               "New-SGCachediSCSIVolume",
               "New-SGNFSFileShare",
               "New-SGSMBFileShare",
               "New-SGSnapshot",
               "New-SGSnapshotFromVolumeRecoveryPoint",
               "New-SGStorediSCSIVolume",
               "New-SGTapePool",
               "New-SGTape",
               "New-SGTapeWithBarcode",
               "Remove-SGAutomaticTapeCreationPolicy",
               "Remove-SGBandwidthRateLimit",
               "Remove-SGChapCredential",
               "Remove-SGFileShare",
               "Remove-SGGateway",
               "Remove-SGSnapshotSchedule",
               "Remove-SGTape",
               "Remove-SGTapeArchive",
               "Remove-SGTapePool",
               "Remove-SGVolume",
               "Get-SGAvailabilityMonitorTest",
               "Get-SGBandwidthRateLimit",
               "Get-SGBandwidthRateLimitSchedule",
               "Get-SGCache",
               "Get-SGCachediSCSIVolume",
               "Get-SGChapCredential",
               "Get-SGSGFileSystemAssociation",
               "Get-SGGatewayInformation",
               "Get-SGMaintenanceStartTime",
               "Get-SGNFSFileShareList",
               "Get-SGSMBFileShare",
               "Get-SGSMBSetting",
               "Get-SGSnapshotSchedule",
               "Get-SGStorediSCSIVolume",
               "Get-SGTapeArchiveList",
               "Get-SGTapeRecoveryPointList",
               "Get-SGTapeList",
               "Get-SGUploadBuffer",
               "Get-SGVTLDevice",
               "Get-SGWorkingStorage",
               "Dismount-SGVolume",
               "Disable-SGGateway",
               "Remove-SGSGFileSystemAssociation",
               "Join-SGDomain",
               "Get-SGAutomaticTapeCreationPolicy",
               "Get-SGFileShareList",
               "Get-SGSGFileSystemAssociationList",
               "Get-SGGateway",
               "Get-SGLocalDisk",
               "Get-SGResourceTag",
               "Get-SGTapePool",
               "Get-SGTape",
               "Get-SGVolumeInitiatorList",
               "Get-SGVolumeRecoveryPoint",
               "Get-SGVolume",
               "Send-SGUploadedNotification",
               "Invoke-SGCacheRefresh",
               "Remove-SGResourceTag",
               "Reset-SGCache",
               "Get-SGTapeArchive",
               "Get-SGTapeRecoveryPoint",
               "Set-SGLocalConsolePassword",
               "Set-SGSMBGuestPassword",
               "Stop-SGGateway",
               "Start-SGAvailabilityMonitorTest",
               "Start-SGGateway",
               "Update-SGAutomaticTapeCreationPolicy",
               "Update-SGBandwidthRateLimit",
               "Update-SGBandwidthRateLimitSchedule",
               "Update-SGChapCredential",
               "Update-SGSGFileSystemAssociation",
               "Update-SGGatewayInformation",
               "Update-SGGatewaySoftwareNow",
               "Update-SGMaintenanceStartTime",
               "Update-SGNFSFileShare",
               "Update-SGSMBFileShare",
               "Update-SGSMBFileShareVisibility",
               "Update-SGSGSMBLocalGroup",
               "Update-SGSMBSecurityStrategy",
               "Update-SGSnapshotSchedule",
               "Update-SGVTLDeviceType")
}

_awsArgumentCompleterRegistration $SG_SelectCompleters $SG_SelectMap
# Argument completions for service AWS Security Token Service (STS)


$STS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.STS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$STS_SelectMap = @{
    "Select"=@("Use-STSRole",
               "Convert-STSAuthorizationMessage",
               "Get-STSAccessKeyInfo",
               "Get-STSCallerIdentity",
               "Get-STSFederationToken",
               "Get-STSSessionToken",
               "Use-STSRoleWithSAML",
               "Use-STSWebIdentityRole")
}

_awsArgumentCompleterRegistration $STS_SelectCompleters $STS_SelectMap
# Argument completions for service AWS Supply Chain


$SUPCH_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SupplyChain.DataIntegrationEventType
        "Send-SUPCHDataIntegrationEvent/EventType"
        {
            $v = "scn.data.forecast","scn.data.inboundorder","scn.data.inboundorderline","scn.data.inboundorderlineschedule","scn.data.inventorylevel","scn.data.outboundorderline","scn.data.outboundshipment","scn.data.processheader","scn.data.processoperation","scn.data.processproduct","scn.data.reservation","scn.data.shipment","scn.data.shipmentstop","scn.data.shipmentstoporder","scn.data.supplyplan"
            break
        }

        # Amazon.SupplyChain.DataIntegrationFlowFileType
        {
            ($_ -eq "New-SUPCHDataIntegrationFlow/Options_FileType") -Or
            ($_ -eq "Update-SUPCHDataIntegrationFlow/Options_FileType")
        }
        {
            $v = "CSV","JSON","PARQUET"
            break
        }

        # Amazon.SupplyChain.DataIntegrationFlowLoadType
        {
            ($_ -eq "New-SUPCHDataIntegrationFlow/Options_LoadType") -Or
            ($_ -eq "Update-SUPCHDataIntegrationFlow/Options_LoadType")
        }
        {
            $v = "INCREMENTAL","REPLACE"
            break
        }

        # Amazon.SupplyChain.DataIntegrationFlowTargetType
        {
            ($_ -eq "New-SUPCHDataIntegrationFlow/Target_TargetType") -Or
            ($_ -eq "Update-SUPCHDataIntegrationFlow/Target_TargetType")
        }
        {
            $v = "DATASET","S3"
            break
        }

        # Amazon.SupplyChain.DataIntegrationFlowTransformationType
        {
            ($_ -eq "New-SUPCHDataIntegrationFlow/Transformation_TransformationType") -Or
            ($_ -eq "Update-SUPCHDataIntegrationFlow/Transformation_TransformationType")
        }
        {
            $v = "NONE","SQL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SUPCH_map = @{
    "EventType"=@("Send-SUPCHDataIntegrationEvent")
    "Options_FileType"=@("New-SUPCHDataIntegrationFlow","Update-SUPCHDataIntegrationFlow")
    "Options_LoadType"=@("New-SUPCHDataIntegrationFlow","Update-SUPCHDataIntegrationFlow")
    "Target_TargetType"=@("New-SUPCHDataIntegrationFlow","Update-SUPCHDataIntegrationFlow")
    "Transformation_TransformationType"=@("New-SUPCHDataIntegrationFlow","Update-SUPCHDataIntegrationFlow")
}

_awsArgumentCompleterRegistration $SUPCH_Completers $SUPCH_map

$SUPCH_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SUPCH.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SUPCH_SelectMap = @{
    "Select"=@("New-SUPCHBillOfMaterialsImportJob",
               "New-SUPCHDataIntegrationFlow",
               "New-SUPCHDataLakeDataset",
               "New-SUPCHInstance",
               "Remove-SUPCHDataIntegrationFlow",
               "Remove-SUPCHDataLakeDataset",
               "Remove-SUPCHInstance",
               "Get-SUPCHBillOfMaterialsImportJob",
               "Get-SUPCHDataIntegrationFlow",
               "Get-SUPCHDataLakeDataset",
               "Get-SUPCHInstance",
               "Get-SUPCHDataIntegrationFlowList",
               "Get-SUPCHDataLakeDatasetList",
               "Get-SUPCHInstanceList",
               "Get-SUPCHResourceTag",
               "Send-SUPCHDataIntegrationEvent",
               "Add-SUPCHResourceTag",
               "Remove-SUPCHResourceTag",
               "Update-SUPCHDataIntegrationFlow",
               "Update-SUPCHDataLakeDataset",
               "Update-SUPCHInstance")
}

_awsArgumentCompleterRegistration $SUPCH_SelectCompleters $SUPCH_SelectMap
# Argument completions for service AWS Support


$ASA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.ASA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$ASA_SelectMap = @{
    "Select"=@("Add-ASAAttachmentsToSet",
               "Add-ASACommunicationToCase",
               "New-ASACase",
               "Get-ASAAttachment",
               "Get-ASACase",
               "Get-ASACommunication",
               "Get-ASACreateCaseOption",
               "Get-ASAService",
               "Get-ASASeverityLevel",
               "Get-ASASupportedLanguage",
               "Get-ASATrustedAdvisorCheckRefreshStatus",
               "Get-ASATrustedAdvisorCheckResult",
               "Get-ASATrustedAdvisorCheck",
               "Get-ASATrustedAdvisorCheckSummary",
               "Request-ASATrustedAdvisorCheckRefresh",
               "Resolve-ASACase")
}

_awsArgumentCompleterRegistration $ASA_SelectCompleters $ASA_SelectMap
# Argument completions for service AWS Support App


$SUP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SupportApp.NotificationSeverityLevel
        {
            ($_ -eq "New-SUPSlackChannelConfiguration/NotifyOnCaseSeverity") -Or
            ($_ -eq "Update-SUPSlackChannelConfiguration/NotifyOnCaseSeverity")
        }
        {
            $v = "all","high","none"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SUP_map = @{
    "NotifyOnCaseSeverity"=@("New-SUPSlackChannelConfiguration","Update-SUPSlackChannelConfiguration")
}

_awsArgumentCompleterRegistration $SUP_Completers $SUP_map

$SUP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SUP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SUP_SelectMap = @{
    "Select"=@("New-SUPSlackChannelConfiguration",
               "Remove-SUPAccountAlias",
               "Remove-SUPSlackChannelConfiguration",
               "Remove-SUPSlackWorkspaceConfiguration",
               "Get-SUPAccountAlias",
               "Get-SUPSlackChannelConfigurationList",
               "Get-SUPSlackWorkspaceConfigurationList",
               "Set-SUPAccountAlias",
               "Register-SUPSlackWorkspaceForOrganization",
               "Update-SUPSlackChannelConfiguration")
}

_awsArgumentCompleterRegistration $SUP_SelectCompleters $SUP_SelectMap
# Argument completions for service AWS Simple Workflow Service (SWF)


$SWF_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.SimpleWorkflow.ChildPolicy
        {
            ($_ -eq "Start-SWFWorkflowExecution/ChildPolicy") -Or
            ($_ -eq "Stop-SWFWorkflowExecution/ChildPolicy") -Or
            ($_ -eq "New-SWFWorkflowType/DefaultChildPolicy")
        }
        {
            $v = "ABANDON","REQUEST_CANCEL","TERMINATE"
            break
        }

        # Amazon.SimpleWorkflow.CloseStatus
        {
            ($_ -eq "Get-SWFClosedWorkflowExecutionCount/CloseStatusFilter_Status") -Or
            ($_ -eq "Get-SWFClosedWorkflowExecutionList/CloseStatusFilter_Status")
        }
        {
            $v = "CANCELED","COMPLETED","CONTINUED_AS_NEW","FAILED","TERMINATED","TIMED_OUT"
            break
        }

        # Amazon.SimpleWorkflow.RegistrationStatus
        {
            ($_ -eq "Get-SWFActivityTypeList/RegistrationStatus") -Or
            ($_ -eq "Get-SWFDomainList/RegistrationStatus") -Or
            ($_ -eq "Get-SWFWorkflowTypeList/RegistrationStatus")
        }
        {
            $v = "DEPRECATED","REGISTERED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SWF_map = @{
    "ChildPolicy"=@("Start-SWFWorkflowExecution","Stop-SWFWorkflowExecution")
    "CloseStatusFilter_Status"=@("Get-SWFClosedWorkflowExecutionCount","Get-SWFClosedWorkflowExecutionList")
    "DefaultChildPolicy"=@("New-SWFWorkflowType")
    "RegistrationStatus"=@("Get-SWFActivityTypeList","Get-SWFDomainList","Get-SWFWorkflowTypeList")
}

_awsArgumentCompleterRegistration $SWF_Completers $SWF_map

$SWF_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.SWF.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$SWF_SelectMap = @{
    "Select"=@("Get-SWFClosedWorkflowExecutionCount",
               "Get-SWFOpenWorkflowExecutionCount",
               "Get-SWFPendingActivityTaskCount",
               "Get-SWFPendingDecisionTaskCount",
               "Uninstall-SWFActivityType",
               "Uninstall-SWFWorkflowType",
               "Remove-SWFActivityType",
               "Remove-SWFDomain",
               "Remove-SWFWorkflowType",
               "Get-SWFActivityType",
               "Get-SWFDomain",
               "Get-SWFWorkflowExecution",
               "Get-SWFWorkflowType",
               "Get-SWFWorkflowExecutionHistory",
               "Get-SWFActivityTypeList",
               "Get-SWFClosedWorkflowExecutionList",
               "Get-SWFDomainList",
               "Get-SWFResourceTag",
               "Get-SWFWorkflowTypeList",
               "New-SWFActivityType",
               "New-SWFDomain",
               "New-SWFWorkflowType",
               "Request-SWFCancelWorkflowExecution",
               "Send-SWFSignalToWorkflowExecution",
               "Start-SWFWorkflowExecution",
               "Add-SWFResourceTag",
               "Stop-SWFWorkflowExecution",
               "Restore-SWFActivityType",
               "Restore-SWFDomain",
               "Restore-SWFWorkflowType",
               "Remove-SWFResourceTag")
}

_awsArgumentCompleterRegistration $SWF_SelectCompleters $SWF_SelectMap
# Argument completions for service Amazon CloudWatch Synthetics


$CWSYN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Synthetics.EncryptionMode
        {
            ($_ -eq "New-CWSYNCanary/S3Encryption_EncryptionMode") -Or
            ($_ -eq "Update-CWSYNCanary/S3Encryption_EncryptionMode")
        }
        {
            $v = "SSE_KMS","SSE_S3"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWSYN_map = @{
    "S3Encryption_EncryptionMode"=@("New-CWSYNCanary","Update-CWSYNCanary")
}

_awsArgumentCompleterRegistration $CWSYN_Completers $CWSYN_map

$CWSYN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.CWSYN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$CWSYN_SelectMap = @{
    "Select"=@("Add-CWSYNResource",
               "New-CWSYNCanary",
               "New-CWSYNGroup",
               "Remove-CWSYNCanary",
               "Remove-CWSYNGroup",
               "Get-CWSYNCanaryList",
               "Get-CWSYNCanariesLastRun",
               "Get-CWSYNRuntimeVersion",
               "Remove-CWSYNResource",
               "Get-CWSYNCanary",
               "Get-CWSYNCanaryRun",
               "Get-CWSYNGroup",
               "Get-CWSYNAssociatedGroupList",
               "Get-CWSYNGroupResourceList",
               "Get-CWSYNGroupList",
               "Get-CWSYNResourceTag",
               "Start-CWSYNCanary",
               "Stop-CWSYNCanary",
               "Add-CWSYNResourceTag",
               "Remove-CWSYNResourceTag",
               "Update-CWSYNCanary")
}

_awsArgumentCompleterRegistration $CWSYN_SelectCompleters $CWSYN_SelectMap
# Argument completions for service AWS Tax Settings


$TSA_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.TaxSettings.Industries
        {
            ($_ -eq "Write-TSATaxRegistration/TurkeyAdditionalInfo_Industry") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/TurkeyAdditionalInfo_Industry")
        }
        {
            $v = "Banks","CirculatingOrg","DevelopmentAgencies","Insurance","PensionAndBenefitFunds","ProfessionalOrg"
            break
        }

        # Amazon.TaxSettings.IsraelCustomerType
        {
            ($_ -eq "Write-TSATaxRegistration/IsraelAdditionalInfo_CustomerType") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/IsraelAdditionalInfo_CustomerType")
        }
        {
            $v = "Business","Individual"
            break
        }

        # Amazon.TaxSettings.IsraelDealerType
        {
            ($_ -eq "Write-TSATaxRegistration/IsraelAdditionalInfo_DealerType") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/IsraelAdditionalInfo_DealerType")
        }
        {
            $v = "Authorized","Non-authorized"
            break
        }

        # Amazon.TaxSettings.PersonType
        {
            ($_ -eq "Write-TSATaxRegistration/GeorgiaAdditionalInfo_PersonType") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/GeorgiaAdditionalInfo_PersonType") -Or
            ($_ -eq "Write-TSATaxRegistration/KenyaAdditionalInfo_PersonType") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/KenyaAdditionalInfo_PersonType")
        }
        {
            $v = "Business","Legal Person","Physical Person"
            break
        }

        # Amazon.TaxSettings.RegistrationType
        {
            ($_ -eq "Write-TSATaxRegistration/SpainAdditionalInfo_RegistrationType") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/SpainAdditionalInfo_RegistrationType")
        }
        {
            $v = "Intra-EU","Local"
            break
        }

        # Amazon.TaxSettings.SaudiArabiaTaxRegistrationNumberType
        {
            ($_ -eq "Write-TSATaxRegistration/SaudiArabiaAdditionalInfo_TaxRegistrationNumberType") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/SaudiArabiaAdditionalInfo_TaxRegistrationNumberType")
        }
        {
            $v = "CommercialRegistrationNumber","TaxIdentificationNumber","TaxRegistrationNumber"
            break
        }

        # Amazon.TaxSettings.Sector
        {
            ($_ -eq "Write-TSATaxRegistration/TaxRegistrationEntry_Sector") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/TaxRegistrationEntry_Sector")
        }
        {
            $v = "Business","Government","Individual"
            break
        }

        # Amazon.TaxSettings.TaxRegistrationNumberType
        {
            ($_ -eq "Write-TSATaxRegistration/RomaniaAdditionalInfo_TaxRegistrationNumberType") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/RomaniaAdditionalInfo_TaxRegistrationNumberType")
        }
        {
            $v = "LocalRegistrationNumber","TaxRegistrationNumber"
            break
        }

        # Amazon.TaxSettings.TaxRegistrationType
        {
            ($_ -eq "Write-TSATaxRegistration/TaxRegistrationEntry_RegistrationType") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/TaxRegistrationEntry_RegistrationType")
        }
        {
            $v = "CNPJ","CPF","GST","SST","VAT"
            break
        }

        # Amazon.TaxSettings.UkraineTrnType
        {
            ($_ -eq "Write-TSATaxRegistration/UkraineAdditionalInfo_UkraineTrnType") -Or
            ($_ -eq "Write-TSATaxRegistrationBatch/UkraineAdditionalInfo_UkraineTrnType")
        }
        {
            $v = "Business","Individual"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TSA_map = @{
    "GeorgiaAdditionalInfo_PersonType"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
    "IsraelAdditionalInfo_CustomerType"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
    "IsraelAdditionalInfo_DealerType"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
    "KenyaAdditionalInfo_PersonType"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
    "RomaniaAdditionalInfo_TaxRegistrationNumberType"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
    "SaudiArabiaAdditionalInfo_TaxRegistrationNumberType"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
    "SpainAdditionalInfo_RegistrationType"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
    "TaxRegistrationEntry_RegistrationType"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
    "TaxRegistrationEntry_Sector"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
    "TurkeyAdditionalInfo_Industry"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
    "UkraineAdditionalInfo_UkraineTrnType"=@("Write-TSATaxRegistration","Write-TSATaxRegistrationBatch")
}

_awsArgumentCompleterRegistration $TSA_Completers $TSA_map

$TSA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.TSA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TSA_SelectMap = @{
    "Select"=@("Remove-TSATaxRegistrationBatch",
               "Write-TSATaxRegistrationBatch",
               "Remove-TSATaxRegistration",
               "Get-TSATaxRegistration",
               "Get-TSATaxRegistrationDocument",
               "Get-TSATaxRegistrationList",
               "Write-TSATaxRegistration")
}

_awsArgumentCompleterRegistration $TSA_SelectCompleters $TSA_SelectMap
# Argument completions for service Amazon Textract


$TXT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Textract.AutoUpdate
        {
            ($_ -eq "New-TXTAdapter/AutoUpdate") -Or
            ($_ -eq "Update-TXTAdapter/AutoUpdate")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TXT_map = @{
    "AutoUpdate"=@("New-TXTAdapter","Update-TXTAdapter")
}

_awsArgumentCompleterRegistration $TXT_Completers $TXT_map

$TXT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.TXT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TXT_SelectMap = @{
    "Select"=@("Invoke-TXTDocumentAnalysis",
               "Invoke-TXTExpenseAnalysis",
               "Invoke-TXTAnalyzeID",
               "New-TXTAdapter",
               "New-TXTAdapterVersion",
               "Remove-TXTAdapter",
               "Remove-TXTAdapterVersion",
               "Find-TXTDocumentText",
               "Get-TXTAdapter",
               "Get-TXTAdapterVersion",
               "Get-TXTDocumentAnalysis",
               "Get-TXTDocumentTextDetection",
               "Get-TXTExpenseAnalysis",
               "Get-TXTLendingAnalysis",
               "Get-TXTLendingAnalysisSummary",
               "Get-TXTAdapterList",
               "Get-TXTAdapterVersionList",
               "Get-TXTResourceTag",
               "Start-TXTDocumentAnalysis",
               "Start-TXTDocumentTextDetection",
               "Start-TXTExpenseAnalysis",
               "Start-TXTLendingAnalysis",
               "Add-TXTResourceTag",
               "Remove-TXTResourceTag",
               "Update-TXTAdapter")
}

_awsArgumentCompleterRegistration $TXT_SelectCompleters $TXT_SelectMap
# Argument completions for service Amazon Timestream InfluxDB


$TIDB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.TimestreamInfluxDB.DbInstanceType
        {
            ($_ -eq "New-TIDBDbInstance/DbInstanceType") -Or
            ($_ -eq "Update-TIDBDbInstance/DbInstanceType")
        }
        {
            $v = "db.influx.12xlarge","db.influx.16xlarge","db.influx.2xlarge","db.influx.4xlarge","db.influx.8xlarge","db.influx.large","db.influx.medium","db.influx.xlarge"
            break
        }

        # Amazon.TimestreamInfluxDB.DbStorageType
        "New-TIDBDbInstance/DbStorageType"
        {
            $v = "InfluxIOIncludedT1","InfluxIOIncludedT2","InfluxIOIncludedT3"
            break
        }

        # Amazon.TimestreamInfluxDB.DeploymentType
        {
            ($_ -eq "New-TIDBDbInstance/DeploymentType") -Or
            ($_ -eq "Update-TIDBDbInstance/DeploymentType")
        }
        {
            $v = "SINGLE_AZ","WITH_MULTIAZ_STANDBY"
            break
        }

        # Amazon.TimestreamInfluxDB.DurationType
        {
            ($_ -eq "New-TIDBDbParameterGroup/HttpIdleTimeout_DurationType") -Or
            ($_ -eq "New-TIDBDbParameterGroup/HttpReadHeaderTimeout_DurationType") -Or
            ($_ -eq "New-TIDBDbParameterGroup/HttpReadTimeout_DurationType") -Or
            ($_ -eq "New-TIDBDbParameterGroup/HttpWriteTimeout_DurationType") -Or
            ($_ -eq "New-TIDBDbParameterGroup/StorageCacheSnapshotWriteColdDuration_DurationType") -Or
            ($_ -eq "New-TIDBDbParameterGroup/StorageCompactFullWriteColdDuration_DurationType") -Or
            ($_ -eq "New-TIDBDbParameterGroup/StorageRetentionCheckInterval_DurationType") -Or
            ($_ -eq "New-TIDBDbParameterGroup/StorageWalMaxWriteDelay_DurationType")
        }
        {
            $v = "hours","milliseconds","minutes","seconds"
            break
        }

        # Amazon.TimestreamInfluxDB.LogLevel
        "New-TIDBDbParameterGroup/InfluxDBv2_LogLevel"
        {
            $v = "debug","error","info"
            break
        }

        # Amazon.TimestreamInfluxDB.TracingType
        "New-TIDBDbParameterGroup/InfluxDBv2_TracingType"
        {
            $v = "jaeger","log"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TIDB_map = @{
    "DbInstanceType"=@("New-TIDBDbInstance","Update-TIDBDbInstance")
    "DbStorageType"=@("New-TIDBDbInstance")
    "DeploymentType"=@("New-TIDBDbInstance","Update-TIDBDbInstance")
    "HttpIdleTimeout_DurationType"=@("New-TIDBDbParameterGroup")
    "HttpReadHeaderTimeout_DurationType"=@("New-TIDBDbParameterGroup")
    "HttpReadTimeout_DurationType"=@("New-TIDBDbParameterGroup")
    "HttpWriteTimeout_DurationType"=@("New-TIDBDbParameterGroup")
    "InfluxDBv2_LogLevel"=@("New-TIDBDbParameterGroup")
    "InfluxDBv2_TracingType"=@("New-TIDBDbParameterGroup")
    "StorageCacheSnapshotWriteColdDuration_DurationType"=@("New-TIDBDbParameterGroup")
    "StorageCompactFullWriteColdDuration_DurationType"=@("New-TIDBDbParameterGroup")
    "StorageRetentionCheckInterval_DurationType"=@("New-TIDBDbParameterGroup")
    "StorageWalMaxWriteDelay_DurationType"=@("New-TIDBDbParameterGroup")
}

_awsArgumentCompleterRegistration $TIDB_Completers $TIDB_map

$TIDB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.TIDB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TIDB_SelectMap = @{
    "Select"=@("New-TIDBDbInstance",
               "New-TIDBDbParameterGroup",
               "Remove-TIDBDbInstance",
               "Get-TIDBDbInstance",
               "Get-TIDBDbParameterGroup",
               "Get-TIDBDbInstanceList",
               "Get-TIDBDbParameterGroupList",
               "Get-TIDBResourceTag",
               "Add-TIDBResourceTag",
               "Remove-TIDBResourceTag",
               "Update-TIDBDbInstance")
}

_awsArgumentCompleterRegistration $TIDB_SelectCompleters $TIDB_SelectMap
# Argument completions for service Amazon Timestream Query


$TSQ_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.TimestreamQuery.QueryInsightsMode
        "Invoke-TSQQuery/QueryInsights_Mode"
        {
            $v = "DISABLED","ENABLED_WITH_RATE_CONTROL"
            break
        }

        # Amazon.TimestreamQuery.QueryPricingModel
        "Update-TSQAccountSetting/QueryPricingModel"
        {
            $v = "BYTES_SCANNED","COMPUTE_UNITS"
            break
        }

        # Amazon.TimestreamQuery.S3EncryptionOption
        "New-TSQScheduledQuery/S3Configuration_EncryptionOption"
        {
            $v = "SSE_KMS","SSE_S3"
            break
        }

        # Amazon.TimestreamQuery.ScheduledQueryInsightsMode
        "Start-TSQScheduledQuery/QueryInsights_Mode"
        {
            $v = "DISABLED","ENABLED_WITH_RATE_CONTROL"
            break
        }

        # Amazon.TimestreamQuery.ScheduledQueryState
        "Update-TSQScheduledQuery/State"
        {
            $v = "DISABLED","ENABLED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TSQ_map = @{
    "QueryInsights_Mode"=@("Invoke-TSQQuery","Start-TSQScheduledQuery")
    "QueryPricingModel"=@("Update-TSQAccountSetting")
    "S3Configuration_EncryptionOption"=@("New-TSQScheduledQuery")
    "State"=@("Update-TSQScheduledQuery")
}

_awsArgumentCompleterRegistration $TSQ_Completers $TSQ_map

$TSQ_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.TSQ.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TSQ_SelectMap = @{
    "Select"=@("Stop-TSQQuery",
               "New-TSQScheduledQuery",
               "Remove-TSQScheduledQuery",
               "Get-TSQAccountSetting",
               "Get-TSQEndpointList",
               "Get-TSQScheduledQuery",
               "Start-TSQScheduledQuery",
               "Get-TSQScheduledQueryList",
               "Get-TSQResourceTag",
               "Initialize-TSQQuery",
               "Invoke-TSQQuery",
               "Add-TSQResourceTag",
               "Remove-TSQResourceTag",
               "Update-TSQAccountSetting",
               "Update-TSQScheduledQuery")
}

_awsArgumentCompleterRegistration $TSQ_SelectCompleters $TSQ_SelectMap
# Argument completions for service Amazon Timestream Write


$TSW_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.TimestreamWrite.BatchLoadDataFormat
        "New-TSWBatchLoadTask/DataSourceConfiguration_DataFormat"
        {
            $v = "CSV"
            break
        }

        # Amazon.TimestreamWrite.BatchLoadStatus
        "Get-TSWBatchLoadTaskList/TaskStatus"
        {
            $v = "CREATED","FAILED","IN_PROGRESS","PENDING_RESUME","PROGRESS_STOPPED","SUCCEEDED"
            break
        }

        # Amazon.TimestreamWrite.MeasureValueType
        "Write-TSWRecord/CommonAttributes_MeasureValueType"
        {
            $v = "BIGINT","BOOLEAN","DOUBLE","MULTI","TIMESTAMP","VARCHAR"
            break
        }

        # Amazon.TimestreamWrite.S3EncryptionOption
        {
            ($_ -eq "New-TSWBatchLoadTask/ReportS3Configuration_EncryptionOption") -Or
            ($_ -eq "New-TSWTable/S3Configuration_EncryptionOption") -Or
            ($_ -eq "Update-TSWTable/S3Configuration_EncryptionOption")
        }
        {
            $v = "SSE_KMS","SSE_S3"
            break
        }

        # Amazon.TimestreamWrite.TimeUnit
        {
            ($_ -eq "Write-TSWRecord/CommonAttributes_TimeUnit") -Or
            ($_ -eq "New-TSWBatchLoadTask/DataModel_TimeUnit")
        }
        {
            $v = "MICROSECONDS","MILLISECONDS","NANOSECONDS","SECONDS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TSW_map = @{
    "CommonAttributes_MeasureValueType"=@("Write-TSWRecord")
    "CommonAttributes_TimeUnit"=@("Write-TSWRecord")
    "DataModel_TimeUnit"=@("New-TSWBatchLoadTask")
    "DataSourceConfiguration_DataFormat"=@("New-TSWBatchLoadTask")
    "ReportS3Configuration_EncryptionOption"=@("New-TSWBatchLoadTask")
    "S3Configuration_EncryptionOption"=@("New-TSWTable","Update-TSWTable")
    "TaskStatus"=@("Get-TSWBatchLoadTaskList")
}

_awsArgumentCompleterRegistration $TSW_Completers $TSW_map

$TSW_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.TSW.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TSW_SelectMap = @{
    "Select"=@("New-TSWBatchLoadTask",
               "New-TSWDatabase",
               "New-TSWTable",
               "Remove-TSWDatabase",
               "Remove-TSWTable",
               "Get-TSWBatchLoadTask",
               "Get-TSWDatabase",
               "Get-TSWEndpointList",
               "Get-TSWTable",
               "Get-TSWBatchLoadTaskList",
               "Get-TSWDatabaseList",
               "Get-TSWTableList",
               "Get-TSWResourceTagList",
               "Resume-TSWBatchLoadTask",
               "Add-TSWResourceTag",
               "Remove-TSWResourceTag",
               "Update-TSWDatabase",
               "Update-TSWTable",
               "Write-TSWRecord")
}

_awsArgumentCompleterRegistration $TSW_SelectCompleters $TSW_SelectMap
# Argument completions for service AWS Telco Network Builder


$TNB_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Tnb.DescriptorContentType
        "Get-TNBSolFunctionPackageDescriptor/Accept"
        {
            $v = "text/plain"
            break
        }

        # Amazon.Tnb.NsdOperationalState
        "Update-TNBSolNetworkPackage/NsdOperationalState"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Tnb.OperationalState
        "Update-TNBSolFunctionPackage/OperationalState"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Tnb.PackageContentType
        {
            ($_ -eq "Get-TNBSolFunctionPackageContent/Accept") -Or
            ($_ -eq "Get-TNBSolNetworkPackageContent/Accept") -Or
            ($_ -eq "Test-TNBSolFunctionPackageContent/ContentType") -Or
            ($_ -eq "Test-TNBSolNetworkPackageContent/ContentType") -Or
            ($_ -eq "Write-TNBSolFunctionPackageContent/ContentType") -Or
            ($_ -eq "Write-TNBSolNetworkPackageContent/ContentType")
        }
        {
            $v = "application/zip"
            break
        }

        # Amazon.Tnb.UpdateSolNetworkType
        "Update-TNBSolNetworkInstance/UpdateType"
        {
            $v = "MODIFY_VNF_INFORMATION","UPDATE_NS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TNB_map = @{
    "Accept"=@("Get-TNBSolFunctionPackageContent","Get-TNBSolFunctionPackageDescriptor","Get-TNBSolNetworkPackageContent")
    "ContentType"=@("Test-TNBSolFunctionPackageContent","Test-TNBSolNetworkPackageContent","Write-TNBSolFunctionPackageContent","Write-TNBSolNetworkPackageContent")
    "NsdOperationalState"=@("Update-TNBSolNetworkPackage")
    "OperationalState"=@("Update-TNBSolFunctionPackage")
    "UpdateType"=@("Update-TNBSolNetworkInstance")
}

_awsArgumentCompleterRegistration $TNB_Completers $TNB_map

$TNB_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.TNB.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TNB_SelectMap = @{
    "Select"=@("Stop-TNBSolNetworkOperation",
               "New-TNBSolFunctionPackage",
               "New-TNBSolNetworkInstance",
               "New-TNBSolNetworkPackage",
               "Remove-TNBSolFunctionPackage",
               "Remove-TNBSolNetworkInstance",
               "Remove-TNBSolNetworkPackage",
               "Get-TNBSolFunctionInstance",
               "Get-TNBSolFunctionPackage",
               "Get-TNBSolFunctionPackageContent",
               "Get-TNBSolFunctionPackageDescriptor",
               "Get-TNBSolNetworkInstance",
               "Get-TNBSolNetworkOperation",
               "Get-TNBSolNetworkPackage",
               "Get-TNBSolNetworkPackageContent",
               "Get-TNBSolNetworkPackageDescriptor",
               "Start-TNBSolNetworkInstance",
               "Get-TNBSolFunctionInstanceList",
               "Get-TNBSolFunctionPackageList",
               "Get-TNBSolNetworkInstanceList",
               "Get-TNBSolNetworkOperationList",
               "Get-TNBSolNetworkPackageList",
               "Get-TNBResourceTag",
               "Write-TNBSolFunctionPackageContent",
               "Write-TNBSolNetworkPackageContent",
               "Add-TNBResourceTag",
               "Stop-TNBSolNetworkInstance",
               "Remove-TNBResourceTag",
               "Update-TNBSolFunctionPackage",
               "Update-TNBSolNetworkInstance",
               "Update-TNBSolNetworkPackage",
               "Test-TNBSolFunctionPackageContent",
               "Test-TNBSolNetworkPackageContent")
}

_awsArgumentCompleterRegistration $TNB_SelectCompleters $TNB_SelectMap
# Argument completions for service Amazon Transcribe Service


$TRS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.TranscribeService.BaseModelName
        "New-TRSLanguageModel/BaseModelName"
        {
            $v = "NarrowBand","WideBand"
            break
        }

        # Amazon.TranscribeService.CallAnalyticsJobStatus
        "Get-TRSCallAnalyticsJobList/Status"
        {
            $v = "COMPLETED","FAILED","IN_PROGRESS","QUEUED"
            break
        }

        # Amazon.TranscribeService.CLMLanguageCode
        "New-TRSLanguageModel/LanguageCode"
        {
            $v = "de-DE","en-AU","en-GB","en-US","es-US","hi-IN","ja-JP"
            break
        }

        # Amazon.TranscribeService.InputType
        {
            ($_ -eq "New-TRSCallAnalyticsCategory/InputType") -Or
            ($_ -eq "Update-TRSCallAnalyticsCategory/InputType")
        }
        {
            $v = "POST_CALL","REAL_TIME"
            break
        }

        # Amazon.TranscribeService.LanguageCode
        {
            ($_ -eq "New-TRSMedicalVocabulary/LanguageCode") -Or
            ($_ -eq "New-TRSVocabulary/LanguageCode") -Or
            ($_ -eq "New-TRSVocabularyFilter/LanguageCode") -Or
            ($_ -eq "Start-TRSMedicalTranscriptionJob/LanguageCode") -Or
            ($_ -eq "Start-TRSTranscriptionJob/LanguageCode") -Or
            ($_ -eq "Update-TRSMedicalVocabulary/LanguageCode") -Or
            ($_ -eq "Update-TRSVocabulary/LanguageCode")
        }
        {
            $v = "ab-GE","af-ZA","ar-AE","ar-SA","ast-ES","az-AZ","ba-RU","be-BY","bg-BG","bn-IN","bs-BA","ca-ES","ckb-IQ","ckb-IR","cs-CZ","cy-WL","da-DK","de-CH","de-DE","el-GR","en-AB","en-AU","en-GB","en-IE","en-IN","en-NZ","en-US","en-WL","en-ZA","es-ES","es-US","et-ET","eu-ES","fa-IR","fi-FI","fr-CA","fr-FR","gl-ES","gu-IN","ha-NG","he-IL","hi-IN","hr-HR","hu-HU","hy-AM","id-ID","is-IS","it-IT","ja-JP","ka-GE","kab-DZ","kk-KZ","kn-IN","ko-KR","ky-KG","lg-IN","lt-LT","lv-LV","mhr-RU","mi-NZ","mk-MK","ml-IN","mn-MN","mr-IN","ms-MY","mt-MT","nl-NL","no-NO","or-IN","pa-IN","pl-PL","ps-AF","pt-BR","pt-PT","ro-RO","ru-RU","rw-RW","si-LK","sk-SK","sl-SI","so-SO","sr-RS","su-ID","sv-SE","sw-BI","sw-KE","sw-RW","sw-TZ","sw-UG","ta-IN","te-IN","th-TH","tl-PH","tr-TR","tt-RU","ug-CN","uk-UA","uz-UZ","vi-VN","wo-SN","zh-CN","zh-TW","zu-ZA"
            break
        }

        # Amazon.TranscribeService.MediaFormat
        {
            ($_ -eq "Start-TRSMedicalTranscriptionJob/MediaFormat") -Or
            ($_ -eq "Start-TRSTranscriptionJob/MediaFormat")
        }
        {
            $v = "amr","flac","m4a","mp3","mp4","ogg","wav","webm"
            break
        }

        # Amazon.TranscribeService.MedicalContentIdentificationType
        "Start-TRSMedicalTranscriptionJob/ContentIdentificationType"
        {
            $v = "PHI"
            break
        }

        # Amazon.TranscribeService.MedicalScribeJobStatus
        "Get-TRSMedicalScribeJobList/Status"
        {
            $v = "COMPLETED","FAILED","IN_PROGRESS","QUEUED"
            break
        }

        # Amazon.TranscribeService.ModelStatus
        "Get-TRSLanguageModelList/StatusEqual"
        {
            $v = "COMPLETED","FAILED","IN_PROGRESS"
            break
        }

        # Amazon.TranscribeService.RedactionOutput
        {
            ($_ -eq "Start-TRSCallAnalyticsJob/ContentRedaction_RedactionOutput") -Or
            ($_ -eq "Start-TRSTranscriptionJob/ContentRedaction_RedactionOutput")
        }
        {
            $v = "redacted","redacted_and_unredacted"
            break
        }

        # Amazon.TranscribeService.RedactionType
        {
            ($_ -eq "Start-TRSCallAnalyticsJob/ContentRedaction_RedactionType") -Or
            ($_ -eq "Start-TRSTranscriptionJob/ContentRedaction_RedactionType")
        }
        {
            $v = "PII"
            break
        }

        # Amazon.TranscribeService.Specialty
        "Start-TRSMedicalTranscriptionJob/Specialty"
        {
            $v = "PRIMARYCARE"
            break
        }

        # Amazon.TranscribeService.TranscriptionJobStatus
        {
            ($_ -eq "Get-TRSMedicalTranscriptionJobList/Status") -Or
            ($_ -eq "Get-TRSTranscriptionJobList/Status")
        }
        {
            $v = "COMPLETED","FAILED","IN_PROGRESS","QUEUED"
            break
        }

        # Amazon.TranscribeService.Type
        "Start-TRSMedicalTranscriptionJob/Type"
        {
            $v = "CONVERSATION","DICTATION"
            break
        }

        # Amazon.TranscribeService.VocabularyFilterMethod
        {
            ($_ -eq "Start-TRSCallAnalyticsJob/Settings_VocabularyFilterMethod") -Or
            ($_ -eq "Start-TRSMedicalScribeJob/Settings_VocabularyFilterMethod") -Or
            ($_ -eq "Start-TRSTranscriptionJob/Settings_VocabularyFilterMethod")
        }
        {
            $v = "mask","remove","tag"
            break
        }

        # Amazon.TranscribeService.VocabularyState
        {
            ($_ -eq "Get-TRSMedicalVocabularyList/StateEqual") -Or
            ($_ -eq "Get-TRSVocabularyList/StateEqual")
        }
        {
            $v = "FAILED","PENDING","READY"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TRS_map = @{
    "BaseModelName"=@("New-TRSLanguageModel")
    "ContentIdentificationType"=@("Start-TRSMedicalTranscriptionJob")
    "ContentRedaction_RedactionOutput"=@("Start-TRSCallAnalyticsJob","Start-TRSTranscriptionJob")
    "ContentRedaction_RedactionType"=@("Start-TRSCallAnalyticsJob","Start-TRSTranscriptionJob")
    "InputType"=@("New-TRSCallAnalyticsCategory","Update-TRSCallAnalyticsCategory")
    "LanguageCode"=@("New-TRSLanguageModel","New-TRSMedicalVocabulary","New-TRSVocabulary","New-TRSVocabularyFilter","Start-TRSMedicalTranscriptionJob","Start-TRSTranscriptionJob","Update-TRSMedicalVocabulary","Update-TRSVocabulary")
    "MediaFormat"=@("Start-TRSMedicalTranscriptionJob","Start-TRSTranscriptionJob")
    "Settings_VocabularyFilterMethod"=@("Start-TRSCallAnalyticsJob","Start-TRSMedicalScribeJob","Start-TRSTranscriptionJob")
    "Specialty"=@("Start-TRSMedicalTranscriptionJob")
    "StateEqual"=@("Get-TRSMedicalVocabularyList","Get-TRSVocabularyList")
    "Status"=@("Get-TRSCallAnalyticsJobList","Get-TRSMedicalScribeJobList","Get-TRSMedicalTranscriptionJobList","Get-TRSTranscriptionJobList")
    "StatusEqual"=@("Get-TRSLanguageModelList")
    "Type"=@("Start-TRSMedicalTranscriptionJob")
}

_awsArgumentCompleterRegistration $TRS_Completers $TRS_map

$TRS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.TRS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TRS_SelectMap = @{
    "Select"=@("New-TRSCallAnalyticsCategory",
               "New-TRSLanguageModel",
               "New-TRSMedicalVocabulary",
               "New-TRSVocabulary",
               "New-TRSVocabularyFilter",
               "Remove-TRSCallAnalyticsCategory",
               "Remove-TRSCallAnalyticsJob",
               "Remove-TRSLanguageModel",
               "Remove-TRSMedicalScribeJob",
               "Remove-TRSMedicalTranscriptionJob",
               "Remove-TRSMedicalVocabulary",
               "Remove-TRSTranscriptionJob",
               "Remove-TRSVocabulary",
               "Remove-TRSVocabularyFilter",
               "Get-TRSLanguageModel",
               "Get-TRSCallAnalyticsCategory",
               "Get-TRSCallAnalyticsJob",
               "Get-TRSMedicalScribeJob",
               "Get-TRSMedicalTranscriptionJob",
               "Get-TRSMedicalVocabulary",
               "Get-TRSTranscriptionJob",
               "Get-TRSVocabulary",
               "Get-TRSVocabularyFilter",
               "Get-TRSCallAnalyticsCategoryList",
               "Get-TRSCallAnalyticsJobList",
               "Get-TRSLanguageModelList",
               "Get-TRSMedicalScribeJobList",
               "Get-TRSMedicalTranscriptionJobList",
               "Get-TRSMedicalVocabularyList",
               "Get-TRSResourceTag",
               "Get-TRSTranscriptionJobList",
               "Get-TRSVocabularyList",
               "Get-TRSVocabularyFilterList",
               "Start-TRSCallAnalyticsJob",
               "Start-TRSMedicalScribeJob",
               "Start-TRSMedicalTranscriptionJob",
               "Start-TRSTranscriptionJob",
               "Add-TRSResourceTag",
               "Remove-TRSResourceTag",
               "Update-TRSCallAnalyticsCategory",
               "Update-TRSMedicalVocabulary",
               "Update-TRSVocabulary",
               "Update-TRSVocabularyFilter")
}

_awsArgumentCompleterRegistration $TRS_SelectCompleters $TRS_SelectMap
# Argument completions for service AWS Transfer for SFTP


$TFR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Transfer.AgreementStatusType
        {
            ($_ -eq "New-TFRAgreement/Status") -Or
            ($_ -eq "Update-TFRAgreement/Status")
        }
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.Transfer.CertificateUsageType
        "Import-TFRCertificate/Usage"
        {
            $v = "ENCRYPTION","SIGNING","TLS"
            break
        }

        # Amazon.Transfer.CompressionEnum
        {
            ($_ -eq "New-TFRConnector/As2Config_Compression") -Or
            ($_ -eq "Update-TFRConnector/As2Config_Compression")
        }
        {
            $v = "DISABLED","ZLIB"
            break
        }

        # Amazon.Transfer.CustomStepStatus
        "Send-TFRWorkflowStepState/Status"
        {
            $v = "FAILURE","SUCCESS"
            break
        }

        # Amazon.Transfer.DirectoryListingOptimization
        {
            ($_ -eq "New-TFRServer/S3StorageOptions_DirectoryListingOptimization") -Or
            ($_ -eq "Update-TFRServer/S3StorageOptions_DirectoryListingOptimization")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.Transfer.Domain
        "New-TFRServer/Domain"
        {
            $v = "EFS","S3"
            break
        }

        # Amazon.Transfer.EncryptionAlg
        {
            ($_ -eq "New-TFRConnector/As2Config_EncryptionAlgorithm") -Or
            ($_ -eq "Update-TFRConnector/As2Config_EncryptionAlgorithm")
        }
        {
            $v = "AES128_CBC","AES192_CBC","AES256_CBC","DES_EDE3_CBC","NONE"
            break
        }

        # Amazon.Transfer.EndpointType
        {
            ($_ -eq "New-TFRServer/EndpointType") -Or
            ($_ -eq "Update-TFRServer/EndpointType")
        }
        {
            $v = "PUBLIC","VPC","VPC_ENDPOINT"
            break
        }

        # Amazon.Transfer.HomeDirectoryType
        {
            ($_ -eq "New-TFRAccess/HomeDirectoryType") -Or
            ($_ -eq "New-TFRUser/HomeDirectoryType") -Or
            ($_ -eq "Update-TFRAccess/HomeDirectoryType") -Or
            ($_ -eq "Update-TFRUser/HomeDirectoryType")
        }
        {
            $v = "LOGICAL","PATH"
            break
        }

        # Amazon.Transfer.IdentityProviderType
        "New-TFRServer/IdentityProviderType"
        {
            $v = "API_GATEWAY","AWS_DIRECTORY_SERVICE","AWS_LAMBDA","SERVICE_MANAGED"
            break
        }

        # Amazon.Transfer.MdnResponse
        {
            ($_ -eq "New-TFRConnector/As2Config_MdnResponse") -Or
            ($_ -eq "Update-TFRConnector/As2Config_MdnResponse")
        }
        {
            $v = "NONE","SYNC"
            break
        }

        # Amazon.Transfer.MdnSigningAlg
        {
            ($_ -eq "New-TFRConnector/As2Config_MdnSigningAlgorithm") -Or
            ($_ -eq "Update-TFRConnector/As2Config_MdnSigningAlgorithm")
        }
        {
            $v = "DEFAULT","NONE","SHA1","SHA256","SHA384","SHA512"
            break
        }

        # Amazon.Transfer.ProfileType
        {
            ($_ -eq "Get-TFRProfileList/ProfileType") -Or
            ($_ -eq "New-TFRProfile/ProfileType")
        }
        {
            $v = "LOCAL","PARTNER"
            break
        }

        # Amazon.Transfer.Protocol
        "Test-TFRIdentityProvider/ServerProtocol"
        {
            $v = "AS2","FTP","FTPS","SFTP"
            break
        }

        # Amazon.Transfer.SetStatOption
        {
            ($_ -eq "New-TFRServer/ProtocolDetails_SetStatOption") -Or
            ($_ -eq "Update-TFRServer/ProtocolDetails_SetStatOption")
        }
        {
            $v = "DEFAULT","ENABLE_NO_OP"
            break
        }

        # Amazon.Transfer.SftpAuthenticationMethods
        {
            ($_ -eq "New-TFRServer/IdentityProviderDetails_SftpAuthenticationMethod") -Or
            ($_ -eq "Update-TFRServer/IdentityProviderDetails_SftpAuthenticationMethod")
        }
        {
            $v = "PASSWORD","PUBLIC_KEY","PUBLIC_KEY_AND_PASSWORD","PUBLIC_KEY_OR_PASSWORD"
            break
        }

        # Amazon.Transfer.SigningAlg
        {
            ($_ -eq "New-TFRConnector/As2Config_SigningAlgorithm") -Or
            ($_ -eq "Update-TFRConnector/As2Config_SigningAlgorithm")
        }
        {
            $v = "NONE","SHA1","SHA256","SHA384","SHA512"
            break
        }

        # Amazon.Transfer.TlsSessionResumptionMode
        {
            ($_ -eq "New-TFRServer/ProtocolDetails_TlsSessionResumptionMode") -Or
            ($_ -eq "Update-TFRServer/ProtocolDetails_TlsSessionResumptionMode")
        }
        {
            $v = "DISABLED","ENABLED","ENFORCED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TFR_map = @{
    "As2Config_Compression"=@("New-TFRConnector","Update-TFRConnector")
    "As2Config_EncryptionAlgorithm"=@("New-TFRConnector","Update-TFRConnector")
    "As2Config_MdnResponse"=@("New-TFRConnector","Update-TFRConnector")
    "As2Config_MdnSigningAlgorithm"=@("New-TFRConnector","Update-TFRConnector")
    "As2Config_SigningAlgorithm"=@("New-TFRConnector","Update-TFRConnector")
    "Domain"=@("New-TFRServer")
    "EndpointType"=@("New-TFRServer","Update-TFRServer")
    "HomeDirectoryType"=@("New-TFRAccess","New-TFRUser","Update-TFRAccess","Update-TFRUser")
    "IdentityProviderDetails_SftpAuthenticationMethod"=@("New-TFRServer","Update-TFRServer")
    "IdentityProviderType"=@("New-TFRServer")
    "ProfileType"=@("Get-TFRProfileList","New-TFRProfile")
    "ProtocolDetails_SetStatOption"=@("New-TFRServer","Update-TFRServer")
    "ProtocolDetails_TlsSessionResumptionMode"=@("New-TFRServer","Update-TFRServer")
    "S3StorageOptions_DirectoryListingOptimization"=@("New-TFRServer","Update-TFRServer")
    "ServerProtocol"=@("Test-TFRIdentityProvider")
    "Status"=@("New-TFRAgreement","Send-TFRWorkflowStepState","Update-TFRAgreement")
    "Usage"=@("Import-TFRCertificate")
}

_awsArgumentCompleterRegistration $TFR_Completers $TFR_map

$TFR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.TFR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TFR_SelectMap = @{
    "Select"=@("New-TFRAccess",
               "New-TFRAgreement",
               "New-TFRConnector",
               "New-TFRProfile",
               "New-TFRServer",
               "New-TFRUser",
               "New-TFRWorkflow",
               "Remove-TFRAccess",
               "Remove-TFRAgreement",
               "Remove-TFRCertificate",
               "Remove-TFRConnector",
               "Remove-TFRHostKey",
               "Remove-TFRProfile",
               "Remove-TFRServer",
               "Remove-TFRSshPublicKey",
               "Remove-TFRUser",
               "Remove-TFRWorkflow",
               "Get-TFRAccess",
               "Get-TFRAgreement",
               "Get-TFRCertificate",
               "Get-TFRConnector",
               "Get-TFRExecution",
               "Get-TFRHostKey",
               "Get-TFRProfile",
               "Get-TFRSecurityPolicy",
               "Get-TFRServer",
               "Get-TFRUser",
               "Get-TFRWorkflow",
               "Import-TFRCertificate",
               "Import-TFRHostKey",
               "Import-TFRSshPublicKey",
               "Get-TFRAccessList",
               "Get-TFRAgreementList",
               "Get-TFRCertificateList",
               "Get-TFRConnectorList",
               "Get-TFRExecutionList",
               "Get-TFRFileTransferResultList",
               "Get-TFRHostKeyList",
               "Get-TFRProfileList",
               "Get-TFRSecurityPolicyList",
               "Get-TFRServerList",
               "Get-TFRResourceTagList",
               "Get-TFRUserList",
               "Get-TFRWorkflowList",
               "Send-TFRWorkflowStepState",
               "Start-TFRDirectoryListing",
               "Start-TFRFileTransfer",
               "Start-TFRServer",
               "Stop-TFRServer",
               "Add-TFRResourceTag",
               "Test-TFRConnection",
               "Test-TFRIdentityProvider",
               "Remove-TFRResourceTag",
               "Update-TFRAccess",
               "Update-TFRAgreement",
               "Update-TFRCertificate",
               "Update-TFRConnector",
               "Update-TFRHostKey",
               "Update-TFRProfile",
               "Update-TFRServer",
               "Update-TFRUser")
}

_awsArgumentCompleterRegistration $TFR_SelectCompleters $TFR_SelectMap
# Argument completions for service Amazon Translate


$TRN_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.Translate.Brevity
        {
            ($_ -eq "ConvertTo-TRNDocument/Settings_Brevity") -Or
            ($_ -eq "ConvertTo-TRNTargetLanguage/Settings_Brevity") -Or
            ($_ -eq "Start-TRNTextTranslationJob/Settings_Brevity")
        }
        {
            $v = "ON"
            break
        }

        # Amazon.Translate.Directionality
        "Import-TRNTerminology/TerminologyData_Directionality"
        {
            $v = "MULTI","UNI"
            break
        }

        # Amazon.Translate.DisplayLanguageCode
        "Get-TRNLanguageList/DisplayLanguageCode"
        {
            $v = "de","en","es","fr","it","ja","ko","pt","zh","zh-TW"
            break
        }

        # Amazon.Translate.EncryptionKeyType
        {
            ($_ -eq "Import-TRNTerminology/EncryptionKey_Type") -Or
            ($_ -eq "New-TRNParallelData/EncryptionKey_Type") -Or
            ($_ -eq "Start-TRNTextTranslationJob/EncryptionKey_Type")
        }
        {
            $v = "KMS"
            break
        }

        # Amazon.Translate.Formality
        {
            ($_ -eq "ConvertTo-TRNDocument/Settings_Formality") -Or
            ($_ -eq "ConvertTo-TRNTargetLanguage/Settings_Formality") -Or
            ($_ -eq "Start-TRNTextTranslationJob/Settings_Formality")
        }
        {
            $v = "FORMAL","INFORMAL"
            break
        }

        # Amazon.Translate.JobStatus
        "Get-TRNTextTranslationJobList/Filter_JobStatus"
        {
            $v = "COMPLETED","COMPLETED_WITH_ERROR","FAILED","IN_PROGRESS","STOPPED","STOP_REQUESTED","SUBMITTED"
            break
        }

        # Amazon.Translate.MergeStrategy
        "Import-TRNTerminology/MergeStrategy"
        {
            $v = "OVERWRITE"
            break
        }

        # Amazon.Translate.ParallelDataFormat
        {
            ($_ -eq "New-TRNParallelData/ParallelDataConfig_Format") -Or
            ($_ -eq "Update-TRNParallelData/ParallelDataConfig_Format")
        }
        {
            $v = "CSV","TMX","TSV"
            break
        }

        # Amazon.Translate.Profanity
        {
            ($_ -eq "ConvertTo-TRNDocument/Settings_Profanity") -Or
            ($_ -eq "ConvertTo-TRNTargetLanguage/Settings_Profanity") -Or
            ($_ -eq "Start-TRNTextTranslationJob/Settings_Profanity")
        }
        {
            $v = "MASK"
            break
        }

        # Amazon.Translate.TerminologyDataFormat
        {
            ($_ -eq "Import-TRNTerminology/TerminologyData_Format") -Or
            ($_ -eq "Get-TRNTerminology/TerminologyDataFormat")
        }
        {
            $v = "CSV","TMX","TSV"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TRN_map = @{
    "DisplayLanguageCode"=@("Get-TRNLanguageList")
    "EncryptionKey_Type"=@("Import-TRNTerminology","New-TRNParallelData","Start-TRNTextTranslationJob")
    "Filter_JobStatus"=@("Get-TRNTextTranslationJobList")
    "MergeStrategy"=@("Import-TRNTerminology")
    "ParallelDataConfig_Format"=@("New-TRNParallelData","Update-TRNParallelData")
    "Settings_Brevity"=@("ConvertTo-TRNDocument","ConvertTo-TRNTargetLanguage","Start-TRNTextTranslationJob")
    "Settings_Formality"=@("ConvertTo-TRNDocument","ConvertTo-TRNTargetLanguage","Start-TRNTextTranslationJob")
    "Settings_Profanity"=@("ConvertTo-TRNDocument","ConvertTo-TRNTargetLanguage","Start-TRNTextTranslationJob")
    "TerminologyData_Directionality"=@("Import-TRNTerminology")
    "TerminologyData_Format"=@("Import-TRNTerminology")
    "TerminologyDataFormat"=@("Get-TRNTerminology")
}

_awsArgumentCompleterRegistration $TRN_Completers $TRN_map

$TRN_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.TRN.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TRN_SelectMap = @{
    "Select"=@("New-TRNParallelData",
               "Remove-TRNParallelData",
               "Remove-TRNTerminology",
               "Get-TRNTextTranslationJob",
               "Get-TRNParallelData",
               "Get-TRNTerminology",
               "Import-TRNTerminology",
               "Get-TRNLanguageList",
               "Get-TRNParallelDataList",
               "Get-TRNResourceTag",
               "Get-TRNTerminologyList",
               "Get-TRNTextTranslationJobList",
               "Start-TRNTextTranslationJob",
               "Stop-TRNTextTranslationJob",
               "Add-TRNResourceTag",
               "ConvertTo-TRNDocument",
               "ConvertTo-TRNTargetLanguage",
               "Remove-TRNResourceTag",
               "Update-TRNParallelData")
}

_awsArgumentCompleterRegistration $TRN_SelectCompleters $TRN_SelectMap
# Argument completions for service Trusted Advisor


$TA_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.TrustedAdvisor.ExclusionStatus
        {
            ($_ -eq "Get-TAOrganizationRecommendationResourceList/ExclusionStatus") -Or
            ($_ -eq "Get-TARecommendationResourceList/ExclusionStatus")
        }
        {
            $v = "excluded","included"
            break
        }

        # Amazon.TrustedAdvisor.RecommendationLanguage
        "Get-TACheckList/Language"
        {
            $v = "de","en","es","fr","id","it","ja","ko","pt_BR","zh","zh_TW"
            break
        }

        # Amazon.TrustedAdvisor.RecommendationPillar
        {
            ($_ -eq "Get-TACheckList/Pillar") -Or
            ($_ -eq "Get-TAOrganizationRecommendationList/Pillar") -Or
            ($_ -eq "Get-TARecommendationList/Pillar")
        }
        {
            $v = "cost_optimizing","fault_tolerance","operational_excellence","performance","security","service_limits"
            break
        }

        # Amazon.TrustedAdvisor.RecommendationSource
        {
            ($_ -eq "Get-TACheckList/Source") -Or
            ($_ -eq "Get-TAOrganizationRecommendationList/Source") -Or
            ($_ -eq "Get-TARecommendationList/Source")
        }
        {
            $v = "aws_config","compute_optimizer","cost_explorer","lse","manual","pse","rds","resilience","resilience_hub","security_hub","stir","ta_check","well_architected"
            break
        }

        # Amazon.TrustedAdvisor.RecommendationStatus
        {
            ($_ -eq "Get-TAOrganizationRecommendationList/Status") -Or
            ($_ -eq "Get-TARecommendationList/Status")
        }
        {
            $v = "error","ok","warning"
            break
        }

        # Amazon.TrustedAdvisor.RecommendationType
        {
            ($_ -eq "Get-TAOrganizationRecommendationList/Type") -Or
            ($_ -eq "Get-TARecommendationList/Type")
        }
        {
            $v = "priority","standard"
            break
        }

        # Amazon.TrustedAdvisor.ResourceStatus
        {
            ($_ -eq "Get-TAOrganizationRecommendationResourceList/Status") -Or
            ($_ -eq "Get-TARecommendationResourceList/Status")
        }
        {
            $v = "error","ok","warning"
            break
        }

        # Amazon.TrustedAdvisor.UpdateRecommendationLifecycleStage
        {
            ($_ -eq "Update-TAOrganizationRecommendationLifecycle/LifecycleStage") -Or
            ($_ -eq "Update-TARecommendationLifecycle/LifecycleStage")
        }
        {
            $v = "dismissed","in_progress","pending_response","resolved"
            break
        }

        # Amazon.TrustedAdvisor.UpdateRecommendationLifecycleStageReasonCode
        {
            ($_ -eq "Update-TAOrganizationRecommendationLifecycle/UpdateReasonCode") -Or
            ($_ -eq "Update-TARecommendationLifecycle/UpdateReasonCode")
        }
        {
            $v = "low_priority","non_critical_account","not_applicable","other","other_methods_available","temporary_account","valid_business_case"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TA_map = @{
    "ExclusionStatus"=@("Get-TAOrganizationRecommendationResourceList","Get-TARecommendationResourceList")
    "Language"=@("Get-TACheckList")
    "LifecycleStage"=@("Update-TAOrganizationRecommendationLifecycle","Update-TARecommendationLifecycle")
    "Pillar"=@("Get-TACheckList","Get-TAOrganizationRecommendationList","Get-TARecommendationList")
    "Source"=@("Get-TACheckList","Get-TAOrganizationRecommendationList","Get-TARecommendationList")
    "Status"=@("Get-TAOrganizationRecommendationList","Get-TAOrganizationRecommendationResourceList","Get-TARecommendationList","Get-TARecommendationResourceList")
    "Type"=@("Get-TAOrganizationRecommendationList","Get-TARecommendationList")
    "UpdateReasonCode"=@("Update-TAOrganizationRecommendationLifecycle","Update-TARecommendationLifecycle")
}

_awsArgumentCompleterRegistration $TA_Completers $TA_map

$TA_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.TA.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$TA_SelectMap = @{
    "Select"=@("Update-TAUpdateRecommendationResourceExclusionBatch",
               "Get-TAOrganizationRecommendation",
               "Get-TARecommendation",
               "Get-TACheckList",
               "Get-TAOrganizationRecommendationAccountList",
               "Get-TAOrganizationRecommendationResourceList",
               "Get-TAOrganizationRecommendationList",
               "Get-TARecommendationResourceList",
               "Get-TARecommendationList",
               "Update-TAOrganizationRecommendationLifecycle",
               "Update-TARecommendationLifecycle")
}

_awsArgumentCompleterRegistration $TA_SelectCompleters $TA_SelectMap
# Argument completions for service Amazon Verified Permissions


$AVP_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.VerifiedPermissions.PolicyType
        "Get-AVPPolicyList/Filter_PolicyType"
        {
            $v = "STATIC","TEMPLATE_LINKED"
            break
        }

        # Amazon.VerifiedPermissions.ValidationMode
        {
            ($_ -eq "New-AVPPolicyStore/ValidationSettings_Mode") -Or
            ($_ -eq "Update-AVPPolicyStore/ValidationSettings_Mode")
        }
        {
            $v = "OFF","STRICT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AVP_map = @{
    "Filter_PolicyType"=@("Get-AVPPolicyList")
    "ValidationSettings_Mode"=@("New-AVPPolicyStore","Update-AVPPolicyStore")
}

_awsArgumentCompleterRegistration $AVP_Completers $AVP_map

$AVP_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.AVP.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$AVP_SelectMap = @{
    "Select"=@("Test-AVPBatchAuthorization",
               "Get-AVPBatchIsAuthorizedWithToken",
               "New-AVPIdentitySource",
               "New-AVPPolicy",
               "New-AVPPolicyStore",
               "New-AVPPolicyTemplate",
               "Remove-AVPIdentitySource",
               "Remove-AVPPolicy",
               "Remove-AVPPolicyStore",
               "Remove-AVPPolicyTemplate",
               "Get-AVPIdentitySource",
               "Get-AVPPolicy",
               "Get-AVPPolicyStore",
               "Get-AVPPolicyTemplate",
               "Get-AVPSchema",
               "Test-AVPAuthorization",
               "Test-AVPTokenAuthorization",
               "Get-AVPIdentitySourceList",
               "Get-AVPPolicyList",
               "Get-AVPPolicyStoreList",
               "Get-AVPPolicyTemplateList",
               "Write-AVPSchema",
               "Update-AVPIdentitySource",
               "Update-AVPPolicy",
               "Update-AVPPolicyStore",
               "Update-AVPPolicyTemplate")
}

_awsArgumentCompleterRegistration $AVP_SelectCompleters $AVP_SelectMap
# Argument completions for service Amazon Voice ID


$VID_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.VoiceID.DuplicateRegistrationAction
        "Start-VIDFraudsterRegistrationJob/RegistrationConfig_DuplicateRegistrationAction"
        {
            $v = "REGISTER_AS_NEW","SKIP"
            break
        }

        # Amazon.VoiceID.ExistingEnrollmentAction
        "Start-VIDSpeakerEnrollmentJob/EnrollmentConfig_ExistingEnrollmentAction"
        {
            $v = "OVERWRITE","SKIP"
            break
        }

        # Amazon.VoiceID.FraudDetectionAction
        "Start-VIDSpeakerEnrollmentJob/FraudDetectionConfig_FraudDetectionAction"
        {
            $v = "FAIL","IGNORE"
            break
        }

        # Amazon.VoiceID.FraudsterRegistrationJobStatus
        "Get-VIDFraudsterRegistrationJobList/JobStatus"
        {
            $v = "COMPLETED","COMPLETED_WITH_ERRORS","FAILED","IN_PROGRESS","SUBMITTED"
            break
        }

        # Amazon.VoiceID.SpeakerEnrollmentJobStatus
        "Get-VIDSpeakerEnrollmentJobList/JobStatus"
        {
            $v = "COMPLETED","COMPLETED_WITH_ERRORS","FAILED","IN_PROGRESS","SUBMITTED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$VID_map = @{
    "EnrollmentConfig_ExistingEnrollmentAction"=@("Start-VIDSpeakerEnrollmentJob")
    "FraudDetectionConfig_FraudDetectionAction"=@("Start-VIDSpeakerEnrollmentJob")
    "JobStatus"=@("Get-VIDFraudsterRegistrationJobList","Get-VIDSpeakerEnrollmentJobList")
    "RegistrationConfig_DuplicateRegistrationAction"=@("Start-VIDFraudsterRegistrationJob")
}

_awsArgumentCompleterRegistration $VID_Completers $VID_map

$VID_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.VID.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$VID_SelectMap = @{
    "Select"=@("Add-VIDFraudsterAssociation",
               "New-VIDDomain",
               "New-VIDWatchlist",
               "Remove-VIDDomain",
               "Remove-VIDFraudster",
               "Remove-VIDSpeaker",
               "Remove-VIDWatchlist",
               "Get-VIDDomain",
               "Get-VIDFraudster",
               "Get-VIDFraudsterRegistrationJob",
               "Get-VIDSpeaker",
               "Get-VIDSpeakerEnrollmentJob",
               "Get-VIDWatchlist",
               "Remove-VIDFraudsterAssociation",
               "Get-VIDSessionEvaluation",
               "Get-VIDDomainList",
               "Get-VIDFraudsterRegistrationJobList",
               "Get-VIDFraudsterList",
               "Get-VIDSpeakerEnrollmentJobList",
               "Get-VIDSpeakerList",
               "Get-VIDResourceTag",
               "Get-VIDWatchlistList",
               "Set-VIDOptOutSpeaker",
               "Start-VIDFraudsterRegistrationJob",
               "Start-VIDSpeakerEnrollmentJob",
               "Add-VIDResourceTag",
               "Remove-VIDResourceTag",
               "Edit-VIDDomain",
               "Update-VIDWatchlist")
}

_awsArgumentCompleterRegistration $VID_SelectCompleters $VID_SelectMap
# Argument completions for service VPC Lattice


$VPCL_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.VPCLattice.AuthType
        {
            ($_ -eq "New-VPCLService/AuthType") -Or
            ($_ -eq "New-VPCLServiceNetwork/AuthType") -Or
            ($_ -eq "Update-VPCLService/AuthType") -Or
            ($_ -eq "Update-VPCLServiceNetwork/AuthType")
        }
        {
            $v = "AWS_IAM","NONE"
            break
        }

        # Amazon.VPCLattice.HealthCheckProtocolVersion
        {
            ($_ -eq "New-VPCLTargetGroup/HealthCheck_ProtocolVersion") -Or
            ($_ -eq "Update-VPCLTargetGroup/HealthCheck_ProtocolVersion")
        }
        {
            $v = "HTTP1","HTTP2"
            break
        }

        # Amazon.VPCLattice.IpAddressType
        "New-VPCLTargetGroup/Config_IpAddressType"
        {
            $v = "IPV4","IPV6"
            break
        }

        # Amazon.VPCLattice.LambdaEventStructureVersion
        "New-VPCLTargetGroup/Config_LambdaEventStructureVersion"
        {
            $v = "V1","V2"
            break
        }

        # Amazon.VPCLattice.ListenerProtocol
        "New-VPCLListener/Protocol"
        {
            $v = "HTTP","HTTPS","TLS_PASSTHROUGH"
            break
        }

        # Amazon.VPCLattice.TargetGroupProtocol
        {
            ($_ -eq "New-VPCLTargetGroup/Config_Protocol") -Or
            ($_ -eq "New-VPCLTargetGroup/HealthCheck_Protocol") -Or
            ($_ -eq "Update-VPCLTargetGroup/HealthCheck_Protocol")
        }
        {
            $v = "HTTP","HTTPS","TCP"
            break
        }

        # Amazon.VPCLattice.TargetGroupProtocolVersion
        "New-VPCLTargetGroup/Config_ProtocolVersion"
        {
            $v = "GRPC","HTTP1","HTTP2"
            break
        }

        # Amazon.VPCLattice.TargetGroupType
        {
            ($_ -eq "Get-VPCLTargetGroupList/TargetGroupType") -Or
            ($_ -eq "New-VPCLTargetGroup/Type")
        }
        {
            $v = "ALB","INSTANCE","IP","LAMBDA"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$VPCL_map = @{
    "AuthType"=@("New-VPCLService","New-VPCLServiceNetwork","Update-VPCLService","Update-VPCLServiceNetwork")
    "Config_IpAddressType"=@("New-VPCLTargetGroup")
    "Config_LambdaEventStructureVersion"=@("New-VPCLTargetGroup")
    "Config_Protocol"=@("New-VPCLTargetGroup")
    "Config_ProtocolVersion"=@("New-VPCLTargetGroup")
    "HealthCheck_Protocol"=@("New-VPCLTargetGroup","Update-VPCLTargetGroup")
    "HealthCheck_ProtocolVersion"=@("New-VPCLTargetGroup","Update-VPCLTargetGroup")
    "Protocol"=@("New-VPCLListener")
    "TargetGroupType"=@("Get-VPCLTargetGroupList")
    "Type"=@("New-VPCLTargetGroup")
}

_awsArgumentCompleterRegistration $VPCL_Completers $VPCL_map

$VPCL_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.VPCL.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$VPCL_SelectMap = @{
    "Select"=@("Update-VPCLRuleList",
               "New-VPCLAccessLogSubscription",
               "New-VPCLListener",
               "New-VPCLRule",
               "New-VPCLService",
               "New-VPCLServiceNetwork",
               "New-VPCLServiceNetworkServiceAssociation",
               "New-VPCLServiceNetworkVpcAssociation",
               "New-VPCLTargetGroup",
               "Remove-VPCLAccessLogSubscription",
               "Remove-VPCLAuthPolicy",
               "Remove-VPCLListener",
               "Remove-VPCLResourcePolicy",
               "Remove-VPCLRule",
               "Remove-VPCLService",
               "Remove-VPCLServiceNetwork",
               "Remove-VPCLServiceNetworkServiceAssociation",
               "Remove-VPCLServiceNetworkVpcAssociation",
               "Remove-VPCLTargetGroup",
               "Unregister-VPCLTarget",
               "Get-VPCLAccessLogSubscription",
               "Get-VPCLAuthPolicy",
               "Get-VPCLListener",
               "Get-VPCLResourcePolicy",
               "Get-VPCLRule",
               "Get-VPCLService",
               "Get-VPCLServiceNetwork",
               "Get-VPCLServiceNetworkServiceAssociation",
               "Get-VPCLServiceNetworkVpcAssociation",
               "Get-VPCLTargetGroup",
               "Get-VPCLAccessLogSubscriptionList",
               "Get-VPCLListenerList",
               "Get-VPCLRuleList",
               "Get-VPCLServiceNetworkList",
               "Get-VPCLServiceNetworkServiceAssociationList",
               "Get-VPCLServiceNetworkVpcAssociationList",
               "Get-VPCLServiceList",
               "Get-VPCLResourceTag",
               "Get-VPCLTargetGroupList",
               "Get-VPCLTargetList",
               "Write-VPCLAuthPolicy",
               "Write-VPCLResourcePolicy",
               "Register-VPCLTarget",
               "Add-VPCLResourceTag",
               "Remove-VPCLResourceTag",
               "Update-VPCLAccessLogSubscription",
               "Update-VPCLListener",
               "Update-VPCLRule",
               "Update-VPCLService",
               "Update-VPCLServiceNetwork",
               "Update-VPCLServiceNetworkVpcAssociation",
               "Update-VPCLTargetGroup")
}

_awsArgumentCompleterRegistration $VPCL_SelectCompleters $VPCL_SelectMap
# Argument completions for service AWS WAF


$WAF_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.WAF.RateKey
        "New-WAFRateBasedRule/RateKey"
        {
            $v = "IP"
            break
        }

        # Amazon.WAF.WafActionType
        {
            ($_ -eq "New-WAFWebACL/DefaultAction_Type") -Or
            ($_ -eq "Update-WAFWebACL/DefaultAction_Type")
        }
        {
            $v = "ALLOW","BLOCK","COUNT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WAF_map = @{
    "DefaultAction_Type"=@("New-WAFWebACL","Update-WAFWebACL")
    "RateKey"=@("New-WAFRateBasedRule")
}

_awsArgumentCompleterRegistration $WAF_Completers $WAF_map

$WAF_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WAF.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WAF_SelectMap = @{
    "Select"=@("New-WAFByteMatchSet",
               "New-WAFGeoMatchSet",
               "New-WAFIPSet",
               "New-WAFRateBasedRule",
               "New-WAFRegexMatchSet",
               "New-WAFRegexPatternSet",
               "New-WAFRule",
               "New-WAFRuleGroup",
               "New-WAFSizeConstraintSet",
               "New-WAFSqlInjectionMatchSet",
               "New-WAFWebACL",
               "New-WAFWebACLMigrationStack",
               "New-WAFXssMatchSet",
               "Remove-WAFByteMatchSet",
               "Remove-WAFGeoMatchSet",
               "Remove-WAFIPSet",
               "Remove-WAFLoggingConfiguration",
               "Remove-WAFPermissionPolicy",
               "Remove-WAFRateBasedRule",
               "Remove-WAFRegexMatchSet",
               "Remove-WAFRegexPatternSet",
               "Remove-WAFRule",
               "Remove-WAFRuleGroup",
               "Remove-WAFSizeConstraintSet",
               "Remove-WAFSqlInjectionMatchSet",
               "Remove-WAFWebACL",
               "Remove-WAFXssMatchSet",
               "Get-WAFByteMatchSet",
               "Get-WAFChangeToken",
               "Get-WAFChangeTokenStatus",
               "Get-WAFGeoMatchSet",
               "Get-WAFIPSet",
               "Get-WAFLoggingConfiguration",
               "Get-WAFPermissionPolicy",
               "Get-WAFRateBasedRule",
               "Get-WAFRateBasedRuleManagedKey",
               "Get-WAFRegexMatchSet",
               "Get-WAFRegexPatternSet",
               "Get-WAFRule",
               "Get-WAFRuleGroup",
               "Get-WAFSampledRequestList",
               "Get-WAFSizeConstraintSet",
               "Get-WAFSqlInjectionMatchSet",
               "Get-WAFWebACL",
               "Get-WAFXssMatchSet",
               "Get-WAFActivatedRulesInRuleGroupList",
               "Get-WAFByteMatchSetList",
               "Get-WAFGeoMatchSetList",
               "Get-WAFIPSetList",
               "Get-WAFLoggingConfigurationList",
               "Get-WAFRateBasedRuleList",
               "Get-WAFRegexMatchSetList",
               "Get-WAFRegexPatternSetList",
               "Get-WAFRuleGroupList",
               "Get-WAFRuleList",
               "Get-WAFSizeConstraintSetList",
               "Get-WAFSqlInjectionMatchSetList",
               "Get-WAFSubscribedRuleGroupList",
               "Get-WAFResourceTag",
               "Get-WAFWebACLList",
               "Get-WAFXssMatchSetList",
               "Write-WAFLoggingConfiguration",
               "Write-WAFPermissionPolicy",
               "Add-WAFResourceTag",
               "Remove-WAFResourceTag",
               "Update-WAFByteMatchSet",
               "Update-WAFGeoMatchSet",
               "Update-WAFIPSet",
               "Update-WAFRateBasedRule",
               "Update-WAFRegexMatchSet",
               "Update-WAFRegexPatternSet",
               "Update-WAFRule",
               "Update-WAFRuleGroup",
               "Update-WAFSizeConstraintSet",
               "Update-WAFSqlInjectionMatchSet",
               "Update-WAFWebACL",
               "Update-WAFXssMatchSet")
}

_awsArgumentCompleterRegistration $WAF_SelectCompleters $WAF_SelectMap
# Argument completions for service AWS WAF Regional


$WAFR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.WAFRegional.RateKey
        "New-WAFRRateBasedRule/RateKey"
        {
            $v = "IP"
            break
        }

        # Amazon.WAFRegional.ResourceType
        "Get-WAFRResourceForWebACLList/ResourceType"
        {
            $v = "API_GATEWAY","APPLICATION_LOAD_BALANCER"
            break
        }

        # Amazon.WAFRegional.WafActionType
        {
            ($_ -eq "New-WAFRWebACL/DefaultAction_Type") -Or
            ($_ -eq "Update-WAFRWebACL/DefaultAction_Type")
        }
        {
            $v = "ALLOW","BLOCK","COUNT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WAFR_map = @{
    "DefaultAction_Type"=@("New-WAFRWebACL","Update-WAFRWebACL")
    "RateKey"=@("New-WAFRRateBasedRule")
    "ResourceType"=@("Get-WAFRResourceForWebACLList")
}

_awsArgumentCompleterRegistration $WAFR_Completers $WAFR_map

$WAFR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WAFR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WAFR_SelectMap = @{
    "Select"=@("Register-WAFRWebACL",
               "New-WAFRByteMatchSet",
               "New-WAFRGeoMatchSet",
               "New-WAFRIPSet",
               "New-WAFRRateBasedRule",
               "New-WAFRRegexMatchSet",
               "New-WAFRRegexPatternSet",
               "New-WAFRRule",
               "New-WAFRRuleGroup",
               "New-WAFRSizeConstraintSet",
               "New-WAFRSqlInjectionMatchSet",
               "New-WAFRWebACL",
               "New-WAFRWebACLMigrationStack",
               "New-WAFRXssMatchSet",
               "Remove-WAFRByteMatchSet",
               "Remove-WAFRGeoMatchSet",
               "Remove-WAFRIPSet",
               "Remove-WAFRLoggingConfiguration",
               "Remove-WAFRPermissionPolicy",
               "Remove-WAFRRateBasedRule",
               "Remove-WAFRRegexMatchSet",
               "Remove-WAFRRegexPatternSet",
               "Remove-WAFRRule",
               "Remove-WAFRRuleGroup",
               "Remove-WAFRSizeConstraintSet",
               "Remove-WAFRSqlInjectionMatchSet",
               "Remove-WAFRWebACL",
               "Remove-WAFRXssMatchSet",
               "Unregister-WAFRWebACL",
               "Get-WAFRByteMatchSet",
               "Get-WAFRChangeToken",
               "Get-WAFRChangeTokenStatus",
               "Get-WAFRGeoMatchSet",
               "Get-WAFRIPSet",
               "Get-WAFRLoggingConfiguration",
               "Get-WAFRPermissionPolicy",
               "Get-WAFRRateBasedRule",
               "Get-WAFRRateBasedRuleManagedKey",
               "Get-WAFRRegexMatchSet",
               "Get-WAFRRegexPatternSet",
               "Get-WAFRRule",
               "Get-WAFRRuleGroup",
               "Get-WAFRSampledRequestList",
               "Get-WAFRSizeConstraintSet",
               "Get-WAFRSqlInjectionMatchSet",
               "Get-WAFRWebACL",
               "Get-WAFRWebACLForResource",
               "Get-WAFRXssMatchSet",
               "Get-WAFRActivatedRulesInRuleGroupList",
               "Get-WAFRByteMatchSetList",
               "Get-WAFRGeoMatchSetList",
               "Get-WAFRIPSetList",
               "Get-WAFRLoggingConfigurationList",
               "Get-WAFRRateBasedRuleList",
               "Get-WAFRRegexMatchSetList",
               "Get-WAFRRegexPatternSetList",
               "Get-WAFRResourceForWebACLList",
               "Get-WAFRRuleGroupList",
               "Get-WAFRRuleList",
               "Get-WAFRSizeConstraintSetList",
               "Get-WAFRSqlInjectionMatchSetList",
               "Get-WAFRSubscribedRuleGroup",
               "Get-WAFRResourceTag",
               "Get-WAFRWebACLList",
               "Get-WAFRXssMatchSetList",
               "Write-WAFRLoggingConfiguration",
               "Write-WAFRPermissionPolicy",
               "Add-WAFRResourceTag",
               "Remove-WAFRResourceTag",
               "Update-WAFRByteMatchSet",
               "Update-WAFRGeoMatchSet",
               "Update-WAFRIPSet",
               "Update-WAFRRateBasedRule",
               "Update-WAFRRegexMatchSet",
               "Update-WAFRRegexPatternSet",
               "Update-WAFRRule",
               "Update-WAFRRuleGroup",
               "Update-WAFRSizeConstraintSet",
               "Update-WAFRSqlInjectionMatchSet",
               "Update-WAFRWebACL",
               "Update-WAFRXssMatchSet")
}

_awsArgumentCompleterRegistration $WAFR_SelectCompleters $WAFR_SelectMap
# Argument completions for service AWS WAF V2


$WAF2_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.WAFV2.FilterBehavior
        "Write-WAF2LoggingConfiguration/LoggingFilter_DefaultBehavior"
        {
            $v = "DROP","KEEP"
            break
        }

        # Amazon.WAFV2.IPAddressVersion
        "New-WAF2IPSet/IPAddressVersion"
        {
            $v = "IPV4","IPV6"
            break
        }

        # Amazon.WAFV2.LogScope
        {
            ($_ -eq "Write-WAF2LoggingConfiguration/LoggingConfiguration_LogScope") -Or
            ($_ -eq "Get-WAF2LoggingConfiguration/LogScope") -Or
            ($_ -eq "Get-WAF2LoggingConfigurationList/LogScope") -Or
            ($_ -eq "Remove-WAF2LoggingConfiguration/LogScope")
        }
        {
            $v = "CUSTOMER","SECURITY_LAKE"
            break
        }

        # Amazon.WAFV2.LogType
        {
            ($_ -eq "Write-WAF2LoggingConfiguration/LoggingConfiguration_LogType") -Or
            ($_ -eq "Get-WAF2LoggingConfiguration/LogType") -Or
            ($_ -eq "Remove-WAF2LoggingConfiguration/LogType")
        }
        {
            $v = "WAF_LOGS"
            break
        }

        # Amazon.WAFV2.Platform
        {
            ($_ -eq "Get-WAF2MobileSdkRelease/Platform") -Or
            ($_ -eq "Get-WAF2MobileSdkReleaseList/Platform") -Or
            ($_ -eq "New-WAF2MobileSdkReleaseUrl/Platform")
        }
        {
            $v = "ANDROID","IOS"
            break
        }

        # Amazon.WAFV2.ResourceType
        "Get-WAF2ResourcesForWebACLList/ResourceType"
        {
            $v = "API_GATEWAY","APPLICATION_LOAD_BALANCER","APPSYNC","APP_RUNNER_SERVICE","COGNITO_USER_POOL","VERIFIED_ACCESS_INSTANCE"
            break
        }

        # Amazon.WAFV2.Scope
        {
            ($_ -eq "Get-WAF2AllManagedProduct/Scope") -Or
            ($_ -eq "Get-WAF2APIKeyList/Scope") -Or
            ($_ -eq "Get-WAF2AvailableManagedRuleGroupList/Scope") -Or
            ($_ -eq "Get-WAF2AvailableManagedRuleGroupVersionList/Scope") -Or
            ($_ -eq "Get-WAF2DecryptedAPIKey/Scope") -Or
            ($_ -eq "Get-WAF2IPSet/Scope") -Or
            ($_ -eq "Get-WAF2IPSetList/Scope") -Or
            ($_ -eq "Get-WAF2LoggingConfigurationList/Scope") -Or
            ($_ -eq "Get-WAF2ManagedProductsByVendor/Scope") -Or
            ($_ -eq "Get-WAF2ManagedRuleGroup/Scope") -Or
            ($_ -eq "Get-WAF2ManagedRuleSet/Scope") -Or
            ($_ -eq "Get-WAF2ManagedRuleSetList/Scope") -Or
            ($_ -eq "Get-WAF2RateBasedStatementManagedKey/Scope") -Or
            ($_ -eq "Get-WAF2RegexPatternSet/Scope") -Or
            ($_ -eq "Get-WAF2RegexPatternSetList/Scope") -Or
            ($_ -eq "Get-WAF2RuleGroup/Scope") -Or
            ($_ -eq "Get-WAF2RuleGroupList/Scope") -Or
            ($_ -eq "Get-WAF2SampledRequest/Scope") -Or
            ($_ -eq "Get-WAF2WebACL/Scope") -Or
            ($_ -eq "Get-WAF2WebACLsList/Scope") -Or
            ($_ -eq "New-WAF2APIKey/Scope") -Or
            ($_ -eq "New-WAF2IPSet/Scope") -Or
            ($_ -eq "New-WAF2RegexPatternSet/Scope") -Or
            ($_ -eq "New-WAF2RuleGroup/Scope") -Or
            ($_ -eq "New-WAF2WebACL/Scope") -Or
            ($_ -eq "Remove-WAF2APIKey/Scope") -Or
            ($_ -eq "Remove-WAF2IPSet/Scope") -Or
            ($_ -eq "Remove-WAF2RegexPatternSet/Scope") -Or
            ($_ -eq "Remove-WAF2RuleGroup/Scope") -Or
            ($_ -eq "Remove-WAF2WebACL/Scope") -Or
            ($_ -eq "Test-WAF2Capacity/Scope") -Or
            ($_ -eq "Update-WAF2IPSet/Scope") -Or
            ($_ -eq "Update-WAF2ManagedRuleSetVersionExpiryDate/Scope") -Or
            ($_ -eq "Update-WAF2RegexPatternSet/Scope") -Or
            ($_ -eq "Update-WAF2RuleGroup/Scope") -Or
            ($_ -eq "Update-WAF2WebACL/Scope") -Or
            ($_ -eq "Write-WAF2ManagedRuleSetVersion/Scope")
        }
        {
            $v = "CLOUDFRONT","REGIONAL"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WAF2_map = @{
    "IPAddressVersion"=@("New-WAF2IPSet")
    "LoggingConfiguration_LogScope"=@("Write-WAF2LoggingConfiguration")
    "LoggingConfiguration_LogType"=@("Write-WAF2LoggingConfiguration")
    "LoggingFilter_DefaultBehavior"=@("Write-WAF2LoggingConfiguration")
    "LogScope"=@("Get-WAF2LoggingConfiguration","Get-WAF2LoggingConfigurationList","Remove-WAF2LoggingConfiguration")
    "LogType"=@("Get-WAF2LoggingConfiguration","Remove-WAF2LoggingConfiguration")
    "Platform"=@("Get-WAF2MobileSdkRelease","Get-WAF2MobileSdkReleaseList","New-WAF2MobileSdkReleaseUrl")
    "ResourceType"=@("Get-WAF2ResourcesForWebACLList")
    "Scope"=@("Get-WAF2AllManagedProduct","Get-WAF2APIKeyList","Get-WAF2AvailableManagedRuleGroupList","Get-WAF2AvailableManagedRuleGroupVersionList","Get-WAF2DecryptedAPIKey","Get-WAF2IPSet","Get-WAF2IPSetList","Get-WAF2LoggingConfigurationList","Get-WAF2ManagedProductsByVendor","Get-WAF2ManagedRuleGroup","Get-WAF2ManagedRuleSet","Get-WAF2ManagedRuleSetList","Get-WAF2RateBasedStatementManagedKey","Get-WAF2RegexPatternSet","Get-WAF2RegexPatternSetList","Get-WAF2RuleGroup","Get-WAF2RuleGroupList","Get-WAF2SampledRequest","Get-WAF2WebACL","Get-WAF2WebACLsList","New-WAF2APIKey","New-WAF2IPSet","New-WAF2RegexPatternSet","New-WAF2RuleGroup","New-WAF2WebACL","Remove-WAF2APIKey","Remove-WAF2IPSet","Remove-WAF2RegexPatternSet","Remove-WAF2RuleGroup","Remove-WAF2WebACL","Test-WAF2Capacity","Update-WAF2IPSet","Update-WAF2ManagedRuleSetVersionExpiryDate","Update-WAF2RegexPatternSet","Update-WAF2RuleGroup","Update-WAF2WebACL","Write-WAF2ManagedRuleSetVersion")
}

_awsArgumentCompleterRegistration $WAF2_Completers $WAF2_map

$WAF2_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WAF2.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WAF2_SelectMap = @{
    "Select"=@("Add-WAF2WebACLToResource",
               "Test-WAF2Capacity",
               "New-WAF2APIKey",
               "New-WAF2IPSet",
               "New-WAF2RegexPatternSet",
               "New-WAF2RuleGroup",
               "New-WAF2WebACL",
               "Remove-WAF2APIKey",
               "Remove-WAF2FirewallManagerRuleGroup",
               "Remove-WAF2IPSet",
               "Remove-WAF2LoggingConfiguration",
               "Remove-WAF2PermissionPolicy",
               "Remove-WAF2RegexPatternSet",
               "Remove-WAF2RuleGroup",
               "Remove-WAF2WebACL",
               "Get-WAF2AllManagedProduct",
               "Get-WAF2ManagedProductsByVendor",
               "Get-WAF2ManagedRuleGroup",
               "Remove-WAF2WebACLFromResource",
               "New-WAF2MobileSdkReleaseUrl",
               "Get-WAF2DecryptedAPIKey",
               "Get-WAF2IPSet",
               "Get-WAF2LoggingConfiguration",
               "Get-WAF2ManagedRuleSet",
               "Get-WAF2MobileSdkRelease",
               "Get-WAF2PermissionPolicy",
               "Get-WAF2RateBasedStatementManagedKey",
               "Get-WAF2RegexPatternSet",
               "Get-WAF2RuleGroup",
               "Get-WAF2SampledRequest",
               "Get-WAF2WebACL",
               "Get-WAF2WebACLForResource",
               "Get-WAF2APIKeyList",
               "Get-WAF2AvailableManagedRuleGroupList",
               "Get-WAF2AvailableManagedRuleGroupVersionList",
               "Get-WAF2IPSetList",
               "Get-WAF2LoggingConfigurationList",
               "Get-WAF2ManagedRuleSetList",
               "Get-WAF2MobileSdkReleaseList",
               "Get-WAF2RegexPatternSetList",
               "Get-WAF2ResourcesForWebACLList",
               "Get-WAF2RuleGroupList",
               "Get-WAF2ResourceTag",
               "Get-WAF2WebACLsList",
               "Write-WAF2LoggingConfiguration",
               "Write-WAF2ManagedRuleSetVersion",
               "Write-WAF2PermissionPolicy",
               "Add-WAF2ResourceTag",
               "Remove-WAF2ResourceTag",
               "Update-WAF2IPSet",
               "Update-WAF2ManagedRuleSetVersionExpiryDate",
               "Update-WAF2RegexPatternSet",
               "Update-WAF2RuleGroup",
               "Update-WAF2WebACL")
}

_awsArgumentCompleterRegistration $WAF2_SelectCompleters $WAF2_SelectMap
# Argument completions for service AWS Well-Architected Tool


$WAT_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.WellArchitected.AccountJiraIssueManagementStatus
        "Update-WATGlobalSetting/JiraConfiguration_IssueManagementStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.WellArchitected.AnswerReason
        {
            ($_ -eq "Update-WATAnswer/Reason") -Or
            ($_ -eq "Update-WATReviewTemplateAnswer/Reason")
        }
        {
            $v = "ARCHITECTURE_CONSTRAINTS","BUSINESS_PRIORITIES","NONE","OTHER","OUT_OF_SCOPE"
            break
        }

        # Amazon.WellArchitected.DiscoveryIntegrationStatus
        "Update-WATGlobalSetting/DiscoveryIntegrationStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.WellArchitected.IntegratingService
        "Update-WATIntegration/IntegratingService"
        {
            $v = "JIRA"
            break
        }

        # Amazon.WellArchitected.IntegrationStatusInput
        "Update-WATGlobalSetting/JiraConfiguration_IntegrationStatus"
        {
            $v = "NOT_CONFIGURED"
            break
        }

        # Amazon.WellArchitected.IssueManagementType
        {
            ($_ -eq "New-WATWorkload/JiraConfiguration_IssueManagementType") -Or
            ($_ -eq "Update-WATGlobalSetting/JiraConfiguration_IssueManagementType") -Or
            ($_ -eq "Update-WATWorkload/JiraConfiguration_IssueManagementType")
        }
        {
            $v = "AUTO","MANUAL"
            break
        }

        # Amazon.WellArchitected.LensStatusType
        {
            ($_ -eq "Get-WATLensList/LensStatus") -Or
            ($_ -eq "Remove-WATLens/LensStatus")
        }
        {
            $v = "ALL","DRAFT","PUBLISHED"
            break
        }

        # Amazon.WellArchitected.LensType
        "Get-WATLensList/LensType"
        {
            $v = "AWS_OFFICIAL","CUSTOM_SELF","CUSTOM_SHARED"
            break
        }

        # Amazon.WellArchitected.OrganizationSharingStatus
        "Update-WATGlobalSetting/OrganizationSharingStatus"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.WellArchitected.PermissionType
        {
            ($_ -eq "New-WATWorkloadShare/PermissionType") -Or
            ($_ -eq "Update-WATWorkloadShare/PermissionType")
        }
        {
            $v = "CONTRIBUTOR","READONLY"
            break
        }

        # Amazon.WellArchitected.ProfileOwnerType
        "Get-WATProfileList/ProfileOwnerType"
        {
            $v = "SELF","SHARED"
            break
        }

        # Amazon.WellArchitected.QuestionPriority
        {
            ($_ -eq "Get-WATAnswerList/QuestionPriority") -Or
            ($_ -eq "Get-WATLensReviewImprovementList/QuestionPriority")
        }
        {
            $v = "NONE","PRIORITIZED"
            break
        }

        # Amazon.WellArchitected.ReportFormat
        "Get-WATConsolidatedReport/Format"
        {
            $v = "JSON","PDF"
            break
        }

        # Amazon.WellArchitected.ShareInvitationAction
        "Update-WATShareInvitation/ShareInvitationAction"
        {
            $v = "ACCEPT","REJECT"
            break
        }

        # Amazon.WellArchitected.ShareResourceType
        "Get-WATShareInvitationList/ShareResourceType"
        {
            $v = "LENS","PROFILE","TEMPLATE","WORKLOAD"
            break
        }

        # Amazon.WellArchitected.ShareStatus
        {
            ($_ -eq "Get-WATLensShareList/Status") -Or
            ($_ -eq "Get-WATProfileShareList/Status") -Or
            ($_ -eq "Get-WATTemplateShareList/Status") -Or
            ($_ -eq "Get-WATWorkloadShareList/Status")
        }
        {
            $v = "ACCEPTED","ASSOCIATED","ASSOCIATING","EXPIRED","FAILED","PENDING","REJECTED","REVOKED"
            break
        }

        # Amazon.WellArchitected.TrustedAdvisorIntegrationStatus
        {
            ($_ -eq "New-WATWorkload/DiscoveryConfig_TrustedAdvisorIntegrationStatus") -Or
            ($_ -eq "Update-WATWorkload/DiscoveryConfig_TrustedAdvisorIntegrationStatus")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.WellArchitected.WorkloadEnvironment
        {
            ($_ -eq "New-WATWorkload/Environment") -Or
            ($_ -eq "Update-WATWorkload/Environment")
        }
        {
            $v = "PREPRODUCTION","PRODUCTION"
            break
        }

        # Amazon.WellArchitected.WorkloadImprovementStatus
        "Update-WATWorkload/ImprovementStatus"
        {
            $v = "COMPLETE","IN_PROGRESS","NOT_APPLICABLE","NOT_STARTED","RISK_ACKNOWLEDGED"
            break
        }

        # Amazon.WellArchitected.WorkloadIssueManagementStatus
        {
            ($_ -eq "New-WATWorkload/JiraConfiguration_IssueManagementStatus") -Or
            ($_ -eq "Update-WATWorkload/JiraConfiguration_IssueManagementStatus")
        }
        {
            $v = "DISABLED","ENABLED","INHERIT"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WAT_map = @{
    "DiscoveryConfig_TrustedAdvisorIntegrationStatus"=@("New-WATWorkload","Update-WATWorkload")
    "DiscoveryIntegrationStatus"=@("Update-WATGlobalSetting")
    "Environment"=@("New-WATWorkload","Update-WATWorkload")
    "Format"=@("Get-WATConsolidatedReport")
    "ImprovementStatus"=@("Update-WATWorkload")
    "IntegratingService"=@("Update-WATIntegration")
    "JiraConfiguration_IntegrationStatus"=@("Update-WATGlobalSetting")
    "JiraConfiguration_IssueManagementStatus"=@("New-WATWorkload","Update-WATGlobalSetting","Update-WATWorkload")
    "JiraConfiguration_IssueManagementType"=@("New-WATWorkload","Update-WATGlobalSetting","Update-WATWorkload")
    "LensStatus"=@("Get-WATLensList","Remove-WATLens")
    "LensType"=@("Get-WATLensList")
    "OrganizationSharingStatus"=@("Update-WATGlobalSetting")
    "PermissionType"=@("New-WATWorkloadShare","Update-WATWorkloadShare")
    "ProfileOwnerType"=@("Get-WATProfileList")
    "QuestionPriority"=@("Get-WATAnswerList","Get-WATLensReviewImprovementList")
    "Reason"=@("Update-WATAnswer","Update-WATReviewTemplateAnswer")
    "ShareInvitationAction"=@("Update-WATShareInvitation")
    "ShareResourceType"=@("Get-WATShareInvitationList")
    "Status"=@("Get-WATLensShareList","Get-WATProfileShareList","Get-WATTemplateShareList","Get-WATWorkloadShareList")
}

_awsArgumentCompleterRegistration $WAT_Completers $WAT_map

$WAT_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WAT.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WAT_SelectMap = @{
    "Select"=@("Register-WATLens",
               "Register-WATProfile",
               "New-WATLensShare",
               "New-WATLensVersion",
               "New-WATMilestone",
               "New-WATProfile",
               "New-WATProfileShare",
               "New-WATReviewTemplate",
               "New-WATTemplateShare",
               "New-WATWorkload",
               "New-WATWorkloadShare",
               "Remove-WATLens",
               "Remove-WATLensShare",
               "Remove-WATProfile",
               "Remove-WATProfileShare",
               "Remove-WATReviewTemplate",
               "Remove-WATTemplateShare",
               "Remove-WATWorkload",
               "Remove-WATWorkloadShare",
               "Unregister-WATLens",
               "Unregister-WATProfile",
               "Export-WATLens",
               "Get-WATAnswer",
               "Get-WATConsolidatedReport",
               "Get-WATGlobalSetting",
               "Get-WATLens",
               "Get-WATLensReview",
               "Get-WATLensReviewReport",
               "Get-WATLensVersionDifference",
               "Get-WATMilestone",
               "Get-WATProfile",
               "Get-WATProfileTemplate",
               "Get-WATReviewTemplate",
               "Get-WATReviewTemplateAnswer",
               "Get-WATReviewTemplateLensReview",
               "Get-WATWorkload",
               "Import-WATLens",
               "Get-WATAnswerList",
               "Get-WATCheckDetailList",
               "Get-WATCheckSummaryList",
               "Get-WATLensList",
               "Get-WATLensReviewImprovementList",
               "Get-WATLensReviewList",
               "Get-WATLensShareList",
               "Get-WATMilestoneList",
               "Get-WATNotificationList",
               "Get-WATProfileNotificationList",
               "Get-WATProfileList",
               "Get-WATProfileShareList",
               "Get-WATReviewTemplateAnswerList",
               "Get-WATReviewTemplateList",
               "Get-WATShareInvitationList",
               "Get-WATResourceTag",
               "Get-WATTemplateShareList",
               "Get-WATWorkloadList",
               "Get-WATWorkloadShareList",
               "Add-WATResourceTag",
               "Remove-WATResourceTag",
               "Update-WATAnswer",
               "Update-WATGlobalSetting",
               "Update-WATIntegration",
               "Update-WATLensReview",
               "Update-WATProfile",
               "Update-WATReviewTemplate",
               "Update-WATReviewTemplateAnswer",
               "Update-WATReviewTemplateLensReview",
               "Update-WATShareInvitation",
               "Update-WATWorkload",
               "Update-WATWorkloadShare",
               "Convert-WATLensReview",
               "Update-WATProfileVersion",
               "Convert-WATReviewTemplateLensReview")
}

_awsArgumentCompleterRegistration $WAT_SelectCompleters $WAT_SelectMap
# Argument completions for service Amazon Connect Wisdom Service


$WSDM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.ConnectWisdomService.AssistantType
        "New-WSDMAssistant/Type"
        {
            $v = "AGENT"
            break
        }

        # Amazon.ConnectWisdomService.AssociationType
        "New-WSDMAssistantAssociation/AssociationType"
        {
            $v = "KNOWLEDGE_BASE"
            break
        }

        # Amazon.ConnectWisdomService.ExternalSource
        "Start-WSDMImportJob/ExternalSourceConfiguration_Source"
        {
            $v = "AMAZON_CONNECT"
            break
        }

        # Amazon.ConnectWisdomService.ImportJobType
        "Start-WSDMImportJob/ImportJobType"
        {
            $v = "QUICK_RESPONSES"
            break
        }

        # Amazon.ConnectWisdomService.KnowledgeBaseType
        "New-WSDMKnowledgeBase/KnowledgeBaseType"
        {
            $v = "CUSTOM","EXTERNAL","QUICK_RESPONSES"
            break
        }

        # Amazon.ConnectWisdomService.Order
        "Search-WSDMQuickResponse/OrderOnField_Order"
        {
            $v = "ASC","DESC"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WSDM_map = @{
    "AssociationType"=@("New-WSDMAssistantAssociation")
    "ExternalSourceConfiguration_Source"=@("Start-WSDMImportJob")
    "ImportJobType"=@("Start-WSDMImportJob")
    "KnowledgeBaseType"=@("New-WSDMKnowledgeBase")
    "OrderOnField_Order"=@("Search-WSDMQuickResponse")
    "Type"=@("New-WSDMAssistant")
}

_awsArgumentCompleterRegistration $WSDM_Completers $WSDM_map

$WSDM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WSDM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WSDM_SelectMap = @{
    "Select"=@("New-WSDMAssistant",
               "New-WSDMAssistantAssociation",
               "New-WSDMContent",
               "New-WSDMKnowledgeBase",
               "New-WSDMQuickResponse",
               "New-WSDMSession",
               "Remove-WSDMAssistant",
               "Remove-WSDMAssistantAssociation",
               "Remove-WSDMContent",
               "Remove-WSDMImportJob",
               "Remove-WSDMKnowledgeBase",
               "Remove-WSDMQuickResponse",
               "Get-WSDMAssistant",
               "Get-WSDMAssistantAssociation",
               "Get-WSDMContent",
               "Get-WSDMContentSummary",
               "Get-WSDMImportJob",
               "Get-WSDMKnowledgeBase",
               "Get-WSDMQuickResponse",
               "Get-WSDMRecommendation",
               "Get-WSDMSession",
               "Get-WSDMAssistantAssociationList",
               "Get-WSDMAssistantList",
               "Get-WSDMContentList",
               "Get-WSDMImportJobList",
               "Get-WSDMKnowledgeBasisList",
               "Get-WSDMQuickResponseList",
               "Get-WSDMResourceTag",
               "Remove-WSDMRecommendationsReceived",
               "Search-WSDMAssistant",
               "Remove-WSDMKnowledgeBaseTemplateUri",
               "Search-WSDMContent",
               "Search-WSDMQuickResponse",
               "Search-WSDMSession",
               "Start-WSDMContentUpload",
               "Start-WSDMImportJob",
               "Add-WSDMResourceTag",
               "Remove-WSDMResourceTag",
               "Update-WSDMContent",
               "Update-WSDMKnowledgeBaseTemplateUri",
               "Update-WSDMQuickResponse")
}

_awsArgumentCompleterRegistration $WSDM_SelectCompleters $WSDM_SelectMap
# Argument completions for service Amazon WorkDocs


$WD_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.WorkDocs.BooleanEnumType
        "Update-WDUser/GrantPoweruserPrivilege"
        {
            $v = "FALSE","TRUE"
            break
        }

        # Amazon.WorkDocs.CommentVisibilityType
        "New-WDComment/Visibility"
        {
            $v = "PRIVATE","PUBLIC"
            break
        }

        # Amazon.WorkDocs.DocumentVersionStatus
        "Update-WDDocumentVersion/VersionStatus"
        {
            $v = "ACTIVE"
            break
        }

        # Amazon.WorkDocs.FolderContentType
        "Get-WDFolderContent/Type"
        {
            $v = "ALL","DOCUMENT","FOLDER"
            break
        }

        # Amazon.WorkDocs.LocaleType
        "Update-WDUser/Locale"
        {
            $v = "de","default","en","es","fr","ja","ko","pt_BR","ru","zh_CN","zh_TW"
            break
        }

        # Amazon.WorkDocs.OrderType
        {
            ($_ -eq "Get-WDFolderContent/Order") -Or
            ($_ -eq "Get-WDUserList/Order")
        }
        {
            $v = "ASCENDING","DESCENDING"
            break
        }

        # Amazon.WorkDocs.PrincipalType
        "Remove-WDResourcePermission/PrincipalType"
        {
            $v = "ANONYMOUS","GROUP","INVITE","ORGANIZATION","USER"
            break
        }

        # Amazon.WorkDocs.ResourceCollectionType
        "Get-WDResource/CollectionType"
        {
            $v = "SHARED_WITH_ME"
            break
        }

        # Amazon.WorkDocs.ResourceSortType
        "Get-WDFolderContent/Sort"
        {
            $v = "DATE","NAME"
            break
        }

        # Amazon.WorkDocs.ResourceStateType
        {
            ($_ -eq "Update-WDDocument/ResourceState") -Or
            ($_ -eq "Update-WDFolder/ResourceState")
        }
        {
            $v = "ACTIVE","RECYCLED","RECYCLING","RESTORING"
            break
        }

        # Amazon.WorkDocs.StorageType
        {
            ($_ -eq "New-WDUser/StorageRule_StorageType") -Or
            ($_ -eq "Update-WDUser/StorageRule_StorageType")
        }
        {
            $v = "QUOTA","UNLIMITED"
            break
        }

        # Amazon.WorkDocs.SubscriptionProtocolType
        "New-WDNotificationSubscription/Protocol"
        {
            $v = "HTTPS","SQS"
            break
        }

        # Amazon.WorkDocs.SubscriptionType
        "New-WDNotificationSubscription/SubscriptionType"
        {
            $v = "ALL"
            break
        }

        # Amazon.WorkDocs.UserFilterType
        "Get-WDUserList/Include"
        {
            $v = "ACTIVE_PENDING","ALL"
            break
        }

        # Amazon.WorkDocs.UserSortType
        "Get-WDUserList/Sort"
        {
            $v = "FULL_NAME","STORAGE_LIMIT","STORAGE_USED","USER_NAME","USER_STATUS"
            break
        }

        # Amazon.WorkDocs.UserType
        "Update-WDUser/Type"
        {
            $v = "ADMIN","MINIMALUSER","POWERUSER","USER","WORKSPACESUSER"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WD_map = @{
    "CollectionType"=@("Get-WDResource")
    "GrantPoweruserPrivilege"=@("Update-WDUser")
    "Include"=@("Get-WDUserList")
    "Locale"=@("Update-WDUser")
    "Order"=@("Get-WDFolderContent","Get-WDUserList")
    "PrincipalType"=@("Remove-WDResourcePermission")
    "Protocol"=@("New-WDNotificationSubscription")
    "ResourceState"=@("Update-WDDocument","Update-WDFolder")
    "Sort"=@("Get-WDFolderContent","Get-WDUserList")
    "StorageRule_StorageType"=@("New-WDUser","Update-WDUser")
    "SubscriptionType"=@("New-WDNotificationSubscription")
    "Type"=@("Get-WDFolderContent","Update-WDUser")
    "VersionStatus"=@("Update-WDDocumentVersion")
    "Visibility"=@("New-WDComment")
}

_awsArgumentCompleterRegistration $WD_Completers $WD_map

$WD_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WD.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WD_SelectMap = @{
    "Select"=@("Stop-WDDocumentVersionUpload",
               "Enable-WDUser",
               "Add-WDResourcePermission",
               "New-WDComment",
               "New-WDCustomMetadata",
               "New-WDFolder",
               "New-WDLabel",
               "New-WDNotificationSubscription",
               "New-WDUser",
               "Disable-WDUser",
               "Remove-WDComment",
               "Remove-WDCustomMetadata",
               "Remove-WDDocument",
               "Remove-WDDocumentVersion",
               "Remove-WDFolder",
               "Remove-WDFolderContent",
               "Remove-WDLabel",
               "Remove-WDNotificationSubscription",
               "Remove-WDUser",
               "Get-WDActivity",
               "Get-WDComment",
               "Get-WDDocumentVersionList",
               "Get-WDFolderContent",
               "Get-WDGroup",
               "Get-WDNotificationSubscriptionList",
               "Get-WDResourcePermissionList",
               "Get-WDRootFolder",
               "Get-WDUserList",
               "Get-WDCurrentUser",
               "Get-WDDocument",
               "Get-WDDocumentPath",
               "Get-WDDocumentVersion",
               "Get-WDFolder",
               "Get-WDFolderPath",
               "Get-WDResource",
               "Start-WDDocumentVersionUpload",
               "Remove-WDResourcePermission",
               "Restore-WDDocumentVersion",
               "Search-WDResource",
               "Update-WDDocument",
               "Update-WDDocumentVersion",
               "Update-WDFolder",
               "Update-WDUser")
}

_awsArgumentCompleterRegistration $WD_SelectCompleters $WD_SelectMap
# Argument completions for service Amazon WorkMail


$WM_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.WorkMail.AccessControlRuleEffect
        "Write-WMAccessControlRule/Effect"
        {
            $v = "ALLOW","DENY"
            break
        }

        # Amazon.WorkMail.EntityState
        {
            ($_ -eq "Get-WMGroupList/Filters_State") -Or
            ($_ -eq "Get-WMResourceList/Filters_State") -Or
            ($_ -eq "Get-WMUserList/Filters_State")
        }
        {
            $v = "DELETED","DISABLED","ENABLED"
            break
        }

        # Amazon.WorkMail.IdentityProviderAuthenticationMode
        "Write-WMIdentityProviderConfiguration/AuthenticationMode"
        {
            $v = "IDENTITY_PROVIDER_AND_DIRECTORY","IDENTITY_PROVIDER_ONLY"
            break
        }

        # Amazon.WorkMail.ImpersonationRoleType
        {
            ($_ -eq "New-WMImpersonationRole/Type") -Or
            ($_ -eq "Update-WMImpersonationRole/Type")
        }
        {
            $v = "FULL_ACCESS","READ_ONLY"
            break
        }

        # Amazon.WorkMail.MobileDeviceAccessRuleEffect
        {
            ($_ -eq "New-WMMobileDeviceAccessRule/Effect") -Or
            ($_ -eq "Update-WMMobileDeviceAccessRule/Effect") -Or
            ($_ -eq "Write-WMMobileDeviceAccessOverride/Effect")
        }
        {
            $v = "ALLOW","DENY"
            break
        }

        # Amazon.WorkMail.PersonalAccessTokenConfigurationStatus
        "Write-WMIdentityProviderConfiguration/PersonalAccessTokenConfiguration_Status"
        {
            $v = "ACTIVE","INACTIVE"
            break
        }

        # Amazon.WorkMail.ResourceType
        {
            ($_ -eq "New-WMResource/Type") -Or
            ($_ -eq "Update-WMResource/Type")
        }
        {
            $v = "EQUIPMENT","ROOM"
            break
        }

        # Amazon.WorkMail.UserRole
        {
            ($_ -eq "New-WMUser/Role") -Or
            ($_ -eq "Update-WMUser/Role")
        }
        {
            $v = "REMOTE_USER","RESOURCE","SYSTEM_USER","USER"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WM_map = @{
    "AuthenticationMode"=@("Write-WMIdentityProviderConfiguration")
    "Effect"=@("New-WMMobileDeviceAccessRule","Update-WMMobileDeviceAccessRule","Write-WMAccessControlRule","Write-WMMobileDeviceAccessOverride")
    "Filters_State"=@("Get-WMGroupList","Get-WMResourceList","Get-WMUserList")
    "PersonalAccessTokenConfiguration_Status"=@("Write-WMIdentityProviderConfiguration")
    "Role"=@("New-WMUser","Update-WMUser")
    "Type"=@("New-WMImpersonationRole","New-WMResource","Update-WMImpersonationRole","Update-WMResource")
}

_awsArgumentCompleterRegistration $WM_Completers $WM_map

$WM_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WM.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WM_SelectMap = @{
    "Select"=@("Add-WMDelegateToResource",
               "Add-WMMemberToGroup",
               "Invoke-WMImpersonationRole",
               "Stop-WMMailboxExportJob",
               "New-WMAlias",
               "New-WMAvailabilityConfiguration",
               "New-WMGroup",
               "New-WMIdentityCenterApplication",
               "New-WMImpersonationRole",
               "New-WMMobileDeviceAccessRule",
               "New-WMOrganization",
               "New-WMResource",
               "New-WMUser",
               "Remove-WMAccessControlRule",
               "Remove-WMAlias",
               "Remove-WMAvailabilityConfiguration",
               "Remove-WMEmailMonitoringConfiguration",
               "Remove-WMGroup",
               "Remove-WMIdentityCenterApplication",
               "Remove-WMIdentityProviderConfiguration",
               "Remove-WMImpersonationRole",
               "Remove-WMMailboxPermission",
               "Remove-WMMobileDeviceAccessOverride",
               "Remove-WMMobileDeviceAccessRule",
               "Remove-WMOrganization",
               "Remove-WMPersonalAccessToken",
               "Remove-WMResource",
               "Remove-WMRetentionPolicy",
               "Remove-WMUser",
               "Remove-WMFromWorkMail",
               "Remove-WMMailDomain",
               "Get-WMEmailMonitoringConfiguration",
               "Get-WMEntity",
               "Get-WMGroup",
               "Get-WMIdentityProviderConfiguration",
               "Get-WMInboundDmarcSetting",
               "Get-WMMailboxExportJob",
               "Get-WMOrganization",
               "Get-WMResource",
               "Get-WMUser",
               "Remove-WMDelegateFromResource",
               "Remove-WMMemberFromGroup",
               "Get-WMAccessControlEffect",
               "Get-WMDefaultRetentionPolicy",
               "Get-WMImpersonationRole",
               "Get-WMImpersonationRoleEffect",
               "Get-WMMailboxDetail",
               "Get-WMMailDomain",
               "Get-WMMobileDeviceAccessEffect",
               "Get-WMMobileDeviceAccessOverride",
               "Get-WMPersonalAccessTokenMetadata",
               "Get-WMAccessControlRuleList",
               "Get-WMAliasList",
               "Get-WMAvailabilityConfigurationList",
               "Get-WMMemberList",
               "Get-WMGroupList",
               "Get-WMGroupsForEntityList",
               "Get-WMImpersonationRoleList",
               "Get-WMMailboxExportJobList",
               "Get-WMMailboxPermissionList",
               "Get-WMMailDomainList",
               "Get-WMMobileDeviceAccessOverrideList",
               "Get-WMMobileDeviceAccessRuleList",
               "Get-WMOrganizationList",
               "Get-WMPersonalAccessTokenList",
               "Get-WMDelegateList",
               "Get-WMResourceList",
               "Get-WMResourceTag",
               "Get-WMUserList",
               "Write-WMAccessControlRule",
               "Write-WMEmailMonitoringConfiguration",
               "Write-WMIdentityProviderConfiguration",
               "Write-WMInboundDmarcSetting",
               "Write-WMMailboxPermission",
               "Write-WMMobileDeviceAccessOverride",
               "Write-WMRetentionPolicy",
               "Add-WMMailDomain",
               "Register-WMToWorkMail",
               "Reset-WMPassword",
               "Start-WMMailboxExportJob",
               "Add-WMResourceTag",
               "Test-WMAvailabilityConfiguration",
               "Remove-WMResourceTag",
               "Update-WMAvailabilityConfiguration",
               "Update-WMDefaultMailDomain",
               "Update-WMGroup",
               "Update-WMImpersonationRole",
               "Update-WMMailboxQuota",
               "Update-WMMobileDeviceAccessRule",
               "Update-WMPrimaryEmailAddress",
               "Update-WMResource",
               "Update-WMUser")
}

_awsArgumentCompleterRegistration $WM_SelectCompleters $WM_SelectMap
# Argument completions for service Amazon WorkMail Message Flow


$WMMF_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WMMF.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WMMF_SelectMap = @{
    "Select"=@("Get-WMMFRawMessageContent",
               "Write-WMMFRawMessageContent")
}

_awsArgumentCompleterRegistration $WMMF_SelectCompleters $WMMF_SelectMap
# Argument completions for service Amazon WorkSpaces


$WKS_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.WorkSpaces.AccessPropertyValue
        {
            ($_ -eq "Edit-WKSWorkspaceAccessProperty/WorkspaceAccessProperties_DeviceTypeAndroid") -Or
            ($_ -eq "Edit-WKSWorkspaceAccessProperty/WorkspaceAccessProperties_DeviceTypeChromeOs") -Or
            ($_ -eq "Edit-WKSWorkspaceAccessProperty/WorkspaceAccessProperties_DeviceTypeIo") -Or
            ($_ -eq "Edit-WKSWorkspaceAccessProperty/WorkspaceAccessProperties_DeviceTypeLinux") -Or
            ($_ -eq "Edit-WKSWorkspaceAccessProperty/WorkspaceAccessProperties_DeviceTypeOsx") -Or
            ($_ -eq "Edit-WKSWorkspaceAccessProperty/WorkspaceAccessProperties_DeviceTypeWeb") -Or
            ($_ -eq "Edit-WKSWorkspaceAccessProperty/WorkspaceAccessProperties_DeviceTypeWindow") -Or
            ($_ -eq "Edit-WKSWorkspaceAccessProperty/WorkspaceAccessProperties_DeviceTypeZeroClient")
        }
        {
            $v = "ALLOW","DENY"
            break
        }

        # Amazon.WorkSpaces.ApplicationSettingsStatusEnum
        {
            ($_ -eq "New-WKSWorkspacesPool/ApplicationSettings_Status") -Or
            ($_ -eq "Update-WKSWorkspacesPool/ApplicationSettings_Status")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.WorkSpaces.CertificateBasedAuthStatusEnum
        "Edit-WKSCertificateBasedAuthProperty/CertificateBasedAuthProperties_Status"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.WorkSpaces.Compute
        {
            ($_ -eq "New-WKSWorkspaceBundle/ComputeType_Name") -Or
            ($_ -eq "Edit-WKSWorkspaceProperty/WorkspaceProperties_ComputeTypeName")
        }
        {
            $v = "GRAPHICS","GRAPHICSPRO","GRAPHICSPRO_G4DN","GRAPHICS_G4DN","PERFORMANCE","POWER","POWERPRO","STANDARD","VALUE"
            break
        }

        # Amazon.WorkSpaces.DataReplication
        "Edit-WKSWorkspaceProperty/DataReplication"
        {
            $v = "NO_REPLICATION","PRIMARY_AS_SOURCE"
            break
        }

        # Amazon.WorkSpaces.DedicatedTenancySupportEnum
        "Edit-WKSAccount/DedicatedTenancySupport"
        {
            $v = "ENABLED"
            break
        }

        # Amazon.WorkSpaces.ImageType
        "Get-WKSWorkspaceImage/ImageType"
        {
            $v = "OWNED","SHARED"
            break
        }

        # Amazon.WorkSpaces.LogUploadEnum
        "Edit-WKSClientProperty/ClientProperties_LogUploadEnabled"
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.WorkSpaces.OperatingSystemName
        "Edit-WKSWorkspaceProperty/WorkspaceProperties_OperatingSystemName"
        {
            $v = "AMAZON_LINUX_2","RHEL_8","UBUNTU_18_04","UBUNTU_20_04","UBUNTU_22_04","UNKNOWN","WINDOWS_10","WINDOWS_11","WINDOWS_7","WINDOWS_SERVER_2016","WINDOWS_SERVER_2019","WINDOWS_SERVER_2022"
            break
        }

        # Amazon.WorkSpaces.ReconnectEnum
        {
            ($_ -eq "Edit-WKSClientProperty/ClientProperties_ReconnectEnabled") -Or
            ($_ -eq "Edit-WKSSelfservicePermission/SelfservicePermissions_ChangeComputeType") -Or
            ($_ -eq "Edit-WKSSelfservicePermission/SelfservicePermissions_IncreaseVolumeSize") -Or
            ($_ -eq "Edit-WKSSelfservicePermission/SelfservicePermissions_RebuildWorkspace") -Or
            ($_ -eq "Edit-WKSSelfservicePermission/SelfservicePermissions_RestartWorkspace") -Or
            ($_ -eq "Edit-WKSSelfservicePermission/SelfservicePermissions_SwitchRunningMode")
        }
        {
            $v = "DISABLED","ENABLED"
            break
        }

        # Amazon.WorkSpaces.RunningMode
        "Edit-WKSWorkspaceProperty/WorkspaceProperties_RunningMode"
        {
            $v = "ALWAYS_ON","AUTO_STOP","MANUAL"
            break
        }

        # Amazon.WorkSpaces.SamlStatusEnum
        "Edit-WKSSamlProperty/SamlProperties_Status"
        {
            $v = "DISABLED","ENABLED","ENABLED_WITH_DIRECTORY_LOGIN_FALLBACK"
            break
        }

        # Amazon.WorkSpaces.StreamingExperiencePreferredProtocolEnum
        "Edit-WKSStreamingProperty/StreamingProperties_StreamingExperiencePreferredProtocol"
        {
            $v = "TCP","UDP"
            break
        }

        # Amazon.WorkSpaces.TargetWorkspaceState
        "Edit-WKSWorkspaceState/WorkspaceState"
        {
            $v = "ADMIN_MAINTENANCE","AVAILABLE"
            break
        }

        # Amazon.WorkSpaces.Tenancy
        "Register-WKSWorkspaceDirectory/Tenancy"
        {
            $v = "DEDICATED","SHARED"
            break
        }

        # Amazon.WorkSpaces.UserIdentityType
        "Register-WKSWorkspaceDirectory/UserIdentityType"
        {
            $v = "AWS_DIRECTORY_SERVICE","AWS_IAM_IDENTITY_CENTER","CUSTOMER_MANAGED"
            break
        }

        # Amazon.WorkSpaces.WorkSpaceApplicationLicenseType
        "Get-WKSApplication/LicenseType"
        {
            $v = "LICENSED","UNLICENSED"
            break
        }

        # Amazon.WorkSpaces.WorkspaceImageIngestionProcess
        "Import-WKSWorkspaceImage/IngestionProcess"
        {
            $v = "BYOL_GRAPHICS","BYOL_GRAPHICSPRO","BYOL_GRAPHICS_G4DN","BYOL_GRAPHICS_G4DN_BYOP","BYOL_GRAPHICS_G4DN_WSP","BYOL_REGULAR","BYOL_REGULAR_BYOP","BYOL_REGULAR_WSP"
            break
        }

        # Amazon.WorkSpaces.WorkspaceType
        "Register-WKSWorkspaceDirectory/WorkspaceType"
        {
            $v = "PERSONAL","POOLS"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WKS_map = @{
    "ApplicationSettings_Status"=@("New-WKSWorkspacesPool","Update-WKSWorkspacesPool")
    "CertificateBasedAuthProperties_Status"=@("Edit-WKSCertificateBasedAuthProperty")
    "ClientProperties_LogUploadEnabled"=@("Edit-WKSClientProperty")
    "ClientProperties_ReconnectEnabled"=@("Edit-WKSClientProperty")
    "ComputeType_Name"=@("New-WKSWorkspaceBundle")
    "DataReplication"=@("Edit-WKSWorkspaceProperty")
    "DedicatedTenancySupport"=@("Edit-WKSAccount")
    "ImageType"=@("Get-WKSWorkspaceImage")
    "IngestionProcess"=@("Import-WKSWorkspaceImage")
    "LicenseType"=@("Get-WKSApplication")
    "SamlProperties_Status"=@("Edit-WKSSamlProperty")
    "SelfservicePermissions_ChangeComputeType"=@("Edit-WKSSelfservicePermission")
    "SelfservicePermissions_IncreaseVolumeSize"=@("Edit-WKSSelfservicePermission")
    "SelfservicePermissions_RebuildWorkspace"=@("Edit-WKSSelfservicePermission")
    "SelfservicePermissions_RestartWorkspace"=@("Edit-WKSSelfservicePermission")
    "SelfservicePermissions_SwitchRunningMode"=@("Edit-WKSSelfservicePermission")
    "StreamingProperties_StreamingExperiencePreferredProtocol"=@("Edit-WKSStreamingProperty")
    "Tenancy"=@("Register-WKSWorkspaceDirectory")
    "UserIdentityType"=@("Register-WKSWorkspaceDirectory")
    "WorkspaceAccessProperties_DeviceTypeAndroid"=@("Edit-WKSWorkspaceAccessProperty")
    "WorkspaceAccessProperties_DeviceTypeChromeOs"=@("Edit-WKSWorkspaceAccessProperty")
    "WorkspaceAccessProperties_DeviceTypeIo"=@("Edit-WKSWorkspaceAccessProperty")
    "WorkspaceAccessProperties_DeviceTypeLinux"=@("Edit-WKSWorkspaceAccessProperty")
    "WorkspaceAccessProperties_DeviceTypeOsx"=@("Edit-WKSWorkspaceAccessProperty")
    "WorkspaceAccessProperties_DeviceTypeWeb"=@("Edit-WKSWorkspaceAccessProperty")
    "WorkspaceAccessProperties_DeviceTypeWindow"=@("Edit-WKSWorkspaceAccessProperty")
    "WorkspaceAccessProperties_DeviceTypeZeroClient"=@("Edit-WKSWorkspaceAccessProperty")
    "WorkspaceProperties_ComputeTypeName"=@("Edit-WKSWorkspaceProperty")
    "WorkspaceProperties_OperatingSystemName"=@("Edit-WKSWorkspaceProperty")
    "WorkspaceProperties_RunningMode"=@("Edit-WKSWorkspaceProperty")
    "WorkspaceState"=@("Edit-WKSWorkspaceState")
    "WorkspaceType"=@("Register-WKSWorkspaceDirectory")
}

_awsArgumentCompleterRegistration $WKS_Completers $WKS_map

$WKS_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WKS.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WKS_SelectMap = @{
    "Select"=@("Approve-WKSAccountLinkInvitation",
               "Register-WKSConnectionAlias",
               "Register-WKSIpGroup",
               "Register-WKSWorkspaceApplication",
               "Approve-WKSIpRule",
               "Copy-WKSWorkspaceImage",
               "New-WKSAccountLinkInvitation",
               "New-WKSConnectClientAddIn",
               "New-WKSConnectionAlias",
               "New-WKSIpGroup",
               "New-WKSStandbyWorkspace",
               "New-WKSTag",
               "New-WKSUpdatedWorkspaceImage",
               "New-WKSWorkspaceBundle",
               "New-WKSWorkspaceImage",
               "New-WKSWorkspace",
               "New-WKSWorkspacesPool",
               "Remove-WKSAccountLinkInvitation",
               "Remove-WKSClientBranding",
               "Remove-WKSConnectClientAddIn",
               "Remove-WKSConnectionAlias",
               "Remove-WKSIpGroup",
               "Remove-WKSTag",
               "Remove-WKSWorkspaceBundle",
               "Remove-WKSWorkspaceImage",
               "Publish-WKSWorkspaceApplication",
               "Unregister-WKSWorkspaceDirectory",
               "Get-WKSAccount",
               "Get-WKSAccountModification",
               "Get-WKSApplicationAssociation",
               "Get-WKSApplication",
               "Get-WKSBundleAssociation",
               "Get-WKSClientBranding",
               "Get-WKSClientProperty",
               "Get-WKSConnectClientAddIn",
               "Get-WKSConnectionAlias",
               "Get-WKSConnectionAliasPermission",
               "Get-WKSImageAssociation",
               "Get-WKSIpGroup",
               "Get-WKSTag",
               "Get-WKSWorkspaceAssociation",
               "Get-WKSWorkspaceBundle",
               "Get-WKSWorkspaceDirectory",
               "Get-WKSWorkspaceImagePermission",
               "Get-WKSWorkspaceImage",
               "Get-WKSWorkspace",
               "Get-WKSWorkspacesConnectionStatus",
               "Get-WKSWorkspaceSnapshot",
               "Get-WKSWorkspacesPool",
               "Get-WKSWorkspacesPoolSession",
               "Unregister-WKSConnectionAlias",
               "Unregister-WKSIpGroup",
               "Unregister-WKSWorkspaceApplication",
               "Get-WKSAccountLink",
               "Import-WKSClientBranding",
               "Import-WKSWorkspaceImage",
               "Get-WKSAccountLinkList",
               "Get-WKSAvailableManagementCidrRangeList",
               "Start-WKSWorkspaceMigration",
               "Edit-WKSAccount",
               "Edit-WKSCertificateBasedAuthProperty",
               "Edit-WKSClientProperty",
               "Edit-WKSSamlProperty",
               "Edit-WKSSelfservicePermission",
               "Edit-WKSStreamingProperty",
               "Edit-WKSWorkspaceAccessProperty",
               "Edit-WKSWorkspaceCreationProperty",
               "Edit-WKSWorkspaceProperty",
               "Edit-WKSWorkspaceState",
               "Restart-WKSWorkspace",
               "Reset-WKSWorkspace",
               "Register-WKSWorkspaceDirectory",
               "Deny-WKSAccountLinkInvitation",
               "Restore-WKSWorkspace",
               "Revoke-WKSIpRule",
               "Start-WKSWorkspace",
               "Start-WKSWorkspacesPool",
               "Stop-WKSWorkspace",
               "Stop-WKSWorkspacesPool",
               "Remove-WKSWorkspace",
               "Remove-WKSWorkspacesPool",
               "Remove-WKSWorkspacesPoolSession",
               "Update-WKSConnectClientAddIn",
               "Update-WKSConnectionAliasPermission",
               "Update-WKSRulesOfIpGroup",
               "Update-WKSWorkspaceBundle",
               "Update-WKSWorkspaceImagePermission",
               "Update-WKSWorkspacesPool")
}

_awsArgumentCompleterRegistration $WKS_SelectCompleters $WKS_SelectMap
# Argument completions for service Amazon WorkSpaces Thin Client


$WSTC_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.WorkSpacesThinClient.ApplyTimeOf
        {
            ($_ -eq "New-WSTCEnvironment/MaintenanceWindow_ApplyTimeOf") -Or
            ($_ -eq "Update-WSTCEnvironment/MaintenanceWindow_ApplyTimeOf")
        }
        {
            $v = "DEVICE","UTC"
            break
        }

        # Amazon.WorkSpacesThinClient.MaintenanceWindowType
        {
            ($_ -eq "New-WSTCEnvironment/MaintenanceWindow_Type") -Or
            ($_ -eq "Update-WSTCEnvironment/MaintenanceWindow_Type")
        }
        {
            $v = "CUSTOM","SYSTEM"
            break
        }

        # Amazon.WorkSpacesThinClient.SoftwareSetUpdateMode
        {
            ($_ -eq "New-WSTCEnvironment/SoftwareSetUpdateMode") -Or
            ($_ -eq "Update-WSTCEnvironment/SoftwareSetUpdateMode")
        }
        {
            $v = "USE_DESIRED","USE_LATEST"
            break
        }

        # Amazon.WorkSpacesThinClient.SoftwareSetUpdateSchedule
        {
            ($_ -eq "New-WSTCEnvironment/SoftwareSetUpdateSchedule") -Or
            ($_ -eq "Update-WSTCDevice/SoftwareSetUpdateSchedule") -Or
            ($_ -eq "Update-WSTCEnvironment/SoftwareSetUpdateSchedule")
        }
        {
            $v = "APPLY_IMMEDIATELY","USE_MAINTENANCE_WINDOW"
            break
        }

        # Amazon.WorkSpacesThinClient.SoftwareSetValidationStatus
        "Update-WSTCSoftwareSet/ValidationStatus"
        {
            $v = "NOT_VALIDATED","VALIDATED"
            break
        }

        # Amazon.WorkSpacesThinClient.TargetDeviceStatus
        "Unregister-WSTCDevice/TargetDeviceStatus"
        {
            $v = "ARCHIVED","DEREGISTERED"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WSTC_map = @{
    "MaintenanceWindow_ApplyTimeOf"=@("New-WSTCEnvironment","Update-WSTCEnvironment")
    "MaintenanceWindow_Type"=@("New-WSTCEnvironment","Update-WSTCEnvironment")
    "SoftwareSetUpdateMode"=@("New-WSTCEnvironment","Update-WSTCEnvironment")
    "SoftwareSetUpdateSchedule"=@("New-WSTCEnvironment","Update-WSTCDevice","Update-WSTCEnvironment")
    "TargetDeviceStatus"=@("Unregister-WSTCDevice")
    "ValidationStatus"=@("Update-WSTCSoftwareSet")
}

_awsArgumentCompleterRegistration $WSTC_Completers $WSTC_map

$WSTC_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WSTC.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WSTC_SelectMap = @{
    "Select"=@("New-WSTCEnvironment",
               "Remove-WSTCDevice",
               "Remove-WSTCEnvironment",
               "Unregister-WSTCDevice",
               "Get-WSTCDevice",
               "Get-WSTCEnvironment",
               "Get-WSTCSoftwareSet",
               "Get-WSTCDeviceList",
               "Get-WSTCEnvironmentList",
               "Get-WSTCSoftwareSetList",
               "Get-WSTCResourceTag",
               "Add-WSTCResourceTag",
               "Remove-WSTCResourceTag",
               "Update-WSTCDevice",
               "Update-WSTCEnvironment",
               "Update-WSTCSoftwareSet")
}

_awsArgumentCompleterRegistration $WSTC_SelectCompleters $WSTC_SelectMap
# Argument completions for service Amazon WorkSpaces Web


$WSW_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.WorkSpacesWeb.AuthenticationType
        {
            ($_ -eq "New-WSWPortal/AuthenticationType") -Or
            ($_ -eq "Update-WSWPortal/AuthenticationType")
        }
        {
            $v = "IAM_Identity_Center","Standard"
            break
        }

        # Amazon.WorkSpacesWeb.EnabledType
        {
            ($_ -eq "New-WSWUserSetting/CopyAllowed") -Or
            ($_ -eq "Update-WSWUserSetting/CopyAllowed") -Or
            ($_ -eq "New-WSWUserSetting/DeepLinkAllowed") -Or
            ($_ -eq "Update-WSWUserSetting/DeepLinkAllowed") -Or
            ($_ -eq "New-WSWUserSetting/DownloadAllowed") -Or
            ($_ -eq "Update-WSWUserSetting/DownloadAllowed") -Or
            ($_ -eq "New-WSWUserSetting/PasteAllowed") -Or
            ($_ -eq "Update-WSWUserSetting/PasteAllowed") -Or
            ($_ -eq "New-WSWUserSetting/PrintAllowed") -Or
            ($_ -eq "Update-WSWUserSetting/PrintAllowed") -Or
            ($_ -eq "New-WSWUserSetting/UploadAllowed") -Or
            ($_ -eq "Update-WSWUserSetting/UploadAllowed")
        }
        {
            $v = "Disabled","Enabled"
            break
        }

        # Amazon.WorkSpacesWeb.IdentityProviderType
        {
            ($_ -eq "New-WSWIdentityProvider/IdentityProviderType") -Or
            ($_ -eq "Update-WSWIdentityProvider/IdentityProviderType")
        }
        {
            $v = "Facebook","Google","LoginWithAmazon","OIDC","SAML","SignInWithApple"
            break
        }

        # Amazon.WorkSpacesWeb.InstanceType
        {
            ($_ -eq "New-WSWPortal/InstanceType") -Or
            ($_ -eq "Update-WSWPortal/InstanceType")
        }
        {
            $v = "standard.large","standard.regular","standard.xlarge"
            break
        }

        # Amazon.WorkSpacesWeb.SessionSortBy
        "Get-WSWSessionList/SortBy"
        {
            $v = "StartTimeAscending","StartTimeDescending"
            break
        }

        # Amazon.WorkSpacesWeb.SessionStatus
        "Get-WSWSessionList/Status"
        {
            $v = "Active","Terminated"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WSW_map = @{
    "AuthenticationType"=@("New-WSWPortal","Update-WSWPortal")
    "CopyAllowed"=@("New-WSWUserSetting","Update-WSWUserSetting")
    "DeepLinkAllowed"=@("New-WSWUserSetting","Update-WSWUserSetting")
    "DownloadAllowed"=@("New-WSWUserSetting","Update-WSWUserSetting")
    "IdentityProviderType"=@("New-WSWIdentityProvider","Update-WSWIdentityProvider")
    "InstanceType"=@("New-WSWPortal","Update-WSWPortal")
    "PasteAllowed"=@("New-WSWUserSetting","Update-WSWUserSetting")
    "PrintAllowed"=@("New-WSWUserSetting","Update-WSWUserSetting")
    "SortBy"=@("Get-WSWSessionList")
    "Status"=@("Get-WSWSessionList")
    "UploadAllowed"=@("New-WSWUserSetting","Update-WSWUserSetting")
}

_awsArgumentCompleterRegistration $WSW_Completers $WSW_map

$WSW_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.WSW.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$WSW_SelectMap = @{
    "Select"=@("Register-WSWBrowserSetting",
               "Register-WSWIpAccessSetting",
               "Register-WSWNetworkSetting",
               "Register-WSWTrustStore",
               "Register-WSWUserAccessLoggingSetting",
               "Register-WSWUserSetting",
               "New-WSWBrowserSetting",
               "New-WSWIdentityProvider",
               "New-WSWIpAccessSetting",
               "New-WSWNetworkSetting",
               "New-WSWPortal",
               "New-WSWTrustStore",
               "New-WSWUserAccessLoggingSetting",
               "New-WSWUserSetting",
               "Remove-WSWBrowserSetting",
               "Remove-WSWIdentityProvider",
               "Remove-WSWIpAccessSetting",
               "Remove-WSWNetworkSetting",
               "Remove-WSWPortal",
               "Remove-WSWTrustStore",
               "Remove-WSWUserAccessLoggingSetting",
               "Remove-WSWUserSetting",
               "Unregister-WSWBrowserSetting",
               "Unregister-WSWIpAccessSetting",
               "Unregister-WSWNetworkSetting",
               "Unregister-WSWTrustStore",
               "Unregister-WSWUserAccessLoggingSetting",
               "Unregister-WSWUserSetting",
               "Revoke-WSWSession",
               "Get-WSWBrowserSetting",
               "Get-WSWIdentityProvider",
               "Get-WSWIpAccessSetting",
               "Get-WSWNetworkSetting",
               "Get-WSWPortal",
               "Get-WSWPortalServiceProviderMetadata",
               "Get-WSWSession",
               "Get-WSWTrustStore",
               "Get-WSWTrustStoreCertificate",
               "Get-WSWUserAccessLoggingSetting",
               "Get-WSWUserSetting",
               "Get-WSWBrowserSettingList",
               "Get-WSWIdentityProviderList",
               "Get-WSWIpAccessSettingList",
               "Get-WSWNetworkSettingList",
               "Get-WSWPortalList",
               "Get-WSWSessionList",
               "Get-WSWResourceTag",
               "Get-WSWTrustStoreCertificateList",
               "Get-WSWTrustStoreList",
               "Get-WSWUserAccessLoggingSettingList",
               "Get-WSWUserSettingList",
               "Add-WSWResourceTag",
               "Remove-WSWResourceTag",
               "Update-WSWBrowserSetting",
               "Update-WSWIdentityProvider",
               "Update-WSWIpAccessSetting",
               "Update-WSWNetworkSetting",
               "Update-WSWPortal",
               "Update-WSWTrustStore",
               "Update-WSWUserAccessLoggingSetting",
               "Update-WSWUserSetting")
}

_awsArgumentCompleterRegistration $WSW_SelectCompleters $WSW_SelectMap
# Argument completions for service AWS X-Ray


$XR_Completers = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Amazon.XRay.EncryptionType
        "Write-XREncryptionConfig/Type"
        {
            $v = "KMS","NONE"
            break
        }

        # Amazon.XRay.SamplingStrategyName
        "Get-XRTraceSummary/SamplingStrategy_Name"
        {
            $v = "FixedRate","PartialScan"
            break
        }

        # Amazon.XRay.TimeRangeType
        "Get-XRTraceSummary/TimeRangeType"
        {
            $v = "Event","Service","TraceId"
            break
        }


    }

    $v |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$XR_map = @{
    "SamplingStrategy_Name"=@("Get-XRTraceSummary")
    "TimeRangeType"=@("Get-XRTraceSummary")
    "Type"=@("Write-XREncryptionConfig")
}

_awsArgumentCompleterRegistration $XR_Completers $XR_map

$XR_SelectCompleters = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.XR.$($commandName.Replace('-', ''))Cmdlet]"
    if (-not $cmdletType) {
        return
    }
    $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false)
    if (-not $awsCmdletAttribute) {
        return
    }
    $type = $awsCmdletAttribute.SelectReturnType
    if (-not $type) {
        return
    }

    $splitSelect = $wordToComplete -Split '\.'
    $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object {
        $propertyName = $_
        $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName }
        if ($properties.Length -ne 1) {
            break
        }
        $type = $properties.PropertyType
        $prefix += "$($properties.Name)."

        $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1')
        if ($asEnumerableType -and $type -ne [System.String]) {
            $type =  $asEnumerableType.GetGenericArguments()[0]
        }
    }

    $v = @( '*' )
    $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object
    if ($properties) {
        $v += ($properties | ForEach-Object { $prefix + $_ })
    }
    $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object
    if ($parameters) {
        $v += ($parameters | ForEach-Object { "^$_" })
    }

    $v |
        Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } |
        ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

$XR_SelectMap = @{
    "Select"=@("Get-XRTraceBatch",
               "New-XRGroup",
               "New-XRSamplingRule",
               "Remove-XRGroup",
               "Remove-XRResourcePolicy",
               "Remove-XRSamplingRule",
               "Get-XREncryptionConfig",
               "Get-XRGroup",
               "Get-XRGroupSummary",
               "Get-XRInsight",
               "Get-XRInsightEvent",
               "Get-XRInsightImpactGraph",
               "Get-XRInsightSummary",
               "Get-XRSamplingRule",
               "Get-XRSamplingStatisticSummary",
               "Get-XRSamplingTarget",
               "Get-XRServiceGraph",
               "Get-XRTimeSeriesServiceStatistic",
               "Get-XRTraceGraph",
               "Get-XRTraceSummary",
               "Get-XRResourcePolicyList",
               "Get-XRResourceTag",
               "Write-XREncryptionConfig",
               "Write-XRResourcePolicy",
               "Write-XRTelemetryRecord",
               "Write-XRTraceSegment",
               "Add-XRResourceTag",
               "Remove-XRResourceTag",
               "Update-XRGroup",
               "Update-XRSamplingRule")
}

_awsArgumentCompleterRegistration $XR_SelectCompleters $XR_SelectMap


$AWS_RegionCompleter = {
    param ($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $regionHash = @{ }

    # Similar to Get-AWSRegion
    $regions = [Amazon.RegionEndpoint]::EnumerableAllRegions
    foreach ($r in $regions)
    {
        $regionHash.Add($r.SystemName, $r.DisplayName)
    }

    $regionHash.Keys |
    Sort-Object |
    Where-Object { $_ -like "$wordToComplete*" } |
    ForEach-Object {
        New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $regionHash[$_]
    }
}

_awsArgumentCompleterRegistration $AWS_RegionCompleter @{ "Region"=@() }

$AWS_ProfileNameCompleter = {
    param ($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    # allow for new user with no profiles set up yet
    $profiles = Get-AWSCredentials -ListProfileDetail | select -expandproperty ProfileName
    if ($profiles)
    {
        $profiles |
        Sort-Object |
        Where-Object { $_ -like "$wordToComplete*" } |
        ForEach-Object {
            New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_
        }
    }
}

_awsArgumentCompleterRegistration $AWS_ProfileNameCompleter @{ "ProfileName"=@() }
$AWS_EC2ImageByNameCompleter = {
    param ($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    $keys = [Amazon.EC2.Util.ImageUtilities]::ImageKeys

    $keys |
    Sort-Object -Descending |
    Where-Object { $_ -like "$wordToComplete*" } |
    ForEach-Object {
        New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_
    }
}

_awsArgumentCompleterRegistration $AWS_EC2ImageByNameCompleter @{ "Name"=@("Get-EC2ImageByName") }

# The attribute name parameter for EC2 apis such as ModifyImageAttribute is modeled as a string
# in the service model rather than an enum type, which means by default we cannot auto-generate
# an argument completer. Api's use as DescribeImageAttribute do use an enum type (ImageAttributeName)
# and so don't have this problem.
$AWS_EC2ImageAttributeCompleter = {
    param ($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

    switch ($("$commandName/$parameterName"))
    {
        # Taken from Amazon.EC2.ImageAttributeName
        "Edit-EC2ImageAttribute/Attribute"
        {
            $v = "description","kernel","ramdisk","launchPermission","productCodes","blockDeviceMapping","sriovNetSupport"
            break
        }
    }

    $v |
    Where-Object { $_ -like "$wordToComplete*" } |
    ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }
}

_awsArgumentCompleterRegistration $AWS_EC2ImageAttributeCompleter @{ "Attribute"=@("Edit-EC2ImageAttribute") }
# SIG # Begin signature block
# MIIueAYJKoZIhvcNAQcCoIIuaTCCLmUCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBi+suUDhvkAtaE
# fDSgijA1VFJO/4yulUaVdWJsyjFWdKCCE+owggXAMIIEqKADAgECAhAP0bvKeWvX
# +N1MguEKmpYxMA0GCSqGSIb3DQEBCwUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV
# BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMjIwMTEz
# MDAwMDAwWhcNMzExMTA5MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMM
# RGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQD
# ExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0GCSqGSIb3DQEBAQUAA4IC
# DwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEppz1Yq3aa
# za57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllV
# cq9ok3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT
# +CFhmzTrBcZe7FsavOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd
# 463JT17lNecxy9qTXtyOj4DatpGYQJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+
# EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6MUSaM0C/CNdaSaTC5qmgZ92k
# J7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtmmnTK3kse5w5j
# rubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7
# f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJU
# KSWJbOUOUlFHdL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+wh
# X8QgUWtvsauGi0/C1kVfnSD8oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQAB
# o4IBZjCCAWIwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5n
# P+e6mK4cD08wHwYDVR0jBBgwFoAUsT7DaQP4v0cB1JgmGggC72NkK8MwDgYDVR0P
# AQH/BAQDAgGGMBMGA1UdJQQMMAoGCCsGAQUFBwMDMH8GCCsGAQUFBwEBBHMwcTAk
# BggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEkGCCsGAQUFBzAC
# hj1odHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRIaWdoQXNzdXJh
# bmNlRVZSb290Q0EuY3J0MEsGA1UdHwREMEIwQKA+oDyGOmh0dHA6Ly9jcmwzLmRp
# Z2ljZXJ0LmNvbS9EaWdpQ2VydEhpZ2hBc3N1cmFuY2VFVlJvb3RDQS5jcmwwHAYD
# VR0gBBUwEzAHBgVngQwBAzAIBgZngQwBBAEwDQYJKoZIhvcNAQELBQADggEBAEHx
# qRH0DxNHecllao3A7pgEpMbjDPKisedfYk/ak1k2zfIe4R7sD+EbP5HU5A/C5pg0
# /xkPZigfT2IxpCrhKhO61z7H0ZL+q93fqpgzRh9Onr3g7QdG64AupP2uU7SkwaT1
# IY1rzAGt9Rnu15ClMlIr28xzDxj4+87eg3Gn77tRWwR2L62t0+od/P1Tk+WMieNg
# GbngLyOOLFxJy34riDkruQZhiPOuAnZ2dMFkkbiJUZflhX0901emWG4f7vtpYeJa
# 3Cgh6GO6Ps9W7Zrk9wXqyvPsEt84zdp7PiuTUy9cUQBY3pBIowrHC/Q7bVUx8ALM
# R3eWUaNetbxcyEMRoacwggawMIIEmKADAgECAhAIrUCyYNKcTJ9ezam9k67ZMA0G
# CSqGSIb3DQEBDAUAMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ
# bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lDZXJ0
# IFRydXN0ZWQgUm9vdCBHNDAeFw0yMTA0MjkwMDAwMDBaFw0zNjA0MjgyMzU5NTla
# MGkxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5EaWdpQ2VydCwgSW5jLjFBMD8GA1UE
# AxM4RGlnaUNlcnQgVHJ1c3RlZCBHNCBDb2RlIFNpZ25pbmcgUlNBNDA5NiBTSEEz
# ODQgMjAyMSBDQTEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDVtC9C
# 0CiteLdd1TlZG7GIQvUzjOs9gZdwxbvEhSYwn6SOaNhc9es0JAfhS0/TeEP0F9ce
# 2vnS1WcaUk8OoVf8iJnBkcyBAz5NcCRks43iCH00fUyAVxJrQ5qZ8sU7H/Lvy0da
# E6ZMswEgJfMQ04uy+wjwiuCdCcBlp/qYgEk1hz1RGeiQIXhFLqGfLOEYwhrMxe6T
# SXBCMo/7xuoc82VokaJNTIIRSFJo3hC9FFdd6BgTZcV/sk+FLEikVoQ11vkunKoA
# FdE3/hoGlMJ8yOobMubKwvSnowMOdKWvObarYBLj6Na59zHh3K3kGKDYwSNHR7Oh
# D26jq22YBoMbt2pnLdK9RBqSEIGPsDsJ18ebMlrC/2pgVItJwZPt4bRc4G/rJvmM
# 1bL5OBDm6s6R9b7T+2+TYTRcvJNFKIM2KmYoX7BzzosmJQayg9Rc9hUZTO1i4F4z
# 8ujo7AqnsAMrkbI2eb73rQgedaZlzLvjSFDzd5Ea/ttQokbIYViY9XwCFjyDKK05
# huzUtw1T0PhH5nUwjewwk3YUpltLXXRhTT8SkXbev1jLchApQfDVxW0mdmgRQRNY
# mtwmKwH0iU1Z23jPgUo+QEdfyYFQc4UQIyFZYIpkVMHMIRroOBl8ZhzNeDhFMJlP
# /2NPTLuqDQhTQXxYPUez+rbsjDIJAsxsPAxWEQIDAQABo4IBWTCCAVUwEgYDVR0T
# AQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUaDfg67Y7+F8Rhvv+YXsIiGX0TkIwHwYD
# VR0jBBgwFoAU7NfjgtJxXWRM3y5nP+e6mK4cD08wDgYDVR0PAQH/BAQDAgGGMBMG
# A1UdJQQMMAoGCCsGAQUFBwMDMHcGCCsGAQUFBwEBBGswaTAkBggrBgEFBQcwAYYY
# aHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEEGCCsGAQUFBzAChjVodHRwOi8vY2Fj
# ZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRUcnVzdGVkUm9vdEc0LmNydDBDBgNV
# HR8EPDA6MDigNqA0hjJodHRwOi8vY3JsMy5kaWdpY2VydC5jb20vRGlnaUNlcnRU
# cnVzdGVkUm9vdEc0LmNybDAcBgNVHSAEFTATMAcGBWeBDAEDMAgGBmeBDAEEATAN
# BgkqhkiG9w0BAQwFAAOCAgEAOiNEPY0Idu6PvDqZ01bgAhql+Eg08yy25nRm95Ry
# sQDKr2wwJxMSnpBEn0v9nqN8JtU3vDpdSG2V1T9J9Ce7FoFFUP2cvbaF4HZ+N3HL
# IvdaqpDP9ZNq4+sg0dVQeYiaiorBtr2hSBh+3NiAGhEZGM1hmYFW9snjdufE5Btf
# Q/g+lP92OT2e1JnPSt0o618moZVYSNUa/tcnP/2Q0XaG3RywYFzzDaju4ImhvTnh
# OE7abrs2nfvlIVNaw8rpavGiPttDuDPITzgUkpn13c5UbdldAhQfQDN8A+KVssIh
# dXNSy0bYxDQcoqVLjc1vdjcshT8azibpGL6QB7BDf5WIIIJw8MzK7/0pNVwfiThV
# 9zeKiwmhywvpMRr/LhlcOXHhvpynCgbWJme3kuZOX956rEnPLqR0kq3bPKSchh/j
# wVYbKyP/j7XqiHtwa+aguv06P0WmxOgWkVKLQcBIhEuWTatEQOON8BUozu3xGFYH
# Ki8QxAwIZDwzj64ojDzLj4gLDb879M4ee47vtevLt/B3E+bnKD+sEq6lLyJsQfmC
# XBVmzGwOysWGw/YmMwwHS6DTBwJqakAwSEs0qFEgu60bhQjiWQ1tygVQK+pKHJ6l
# /aCnHwZ05/LWUpD9r4VIIflXO7ScA+2GRfS0YW6/aOImYIbqyK+p/pQd52MbOoZW
# eE4wggduMIIFVqADAgECAhAOG4Qdo7UmBpSv170eUaMrMA0GCSqGSIb3DQEBCwUA
# MGkxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5EaWdpQ2VydCwgSW5jLjFBMD8GA1UE
# AxM4RGlnaUNlcnQgVHJ1c3RlZCBHNCBDb2RlIFNpZ25pbmcgUlNBNDA5NiBTSEEz
# ODQgMjAyMSBDQTEwHhcNMjQwODAyMDAwMDAwWhcNMjUwODAxMjM1OTU5WjCB9jET
# MBEGCysGAQQBgjc8AgEDEwJVUzEZMBcGCysGAQQBgjc8AgECEwhEZWxhd2FyZTEd
# MBsGA1UEDwwUUHJpdmF0ZSBPcmdhbml6YXRpb24xEDAOBgNVBAUTBzQxNTI5NTQx
# CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdTZWF0
# dGxlMSIwIAYDVQQKExlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRcwFQYDVQQL
# Ew5TREtzIGFuZCBUb29sczEiMCAGA1UEAxMZQW1hem9uIFdlYiBTZXJ2aWNlcywg
# SW5jLjCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAJn5K00vaam9Tsax
# bhWuOwBweiOIeGUkpi0F5SYcPijYzpnd7vS0G3WYbFuSTGKipaRe37VDHdNa9Y1F
# faRSBrKmeNytBzNsnIUtiKl5OWuQkbaNcH/8XHwPOf6szaqz6wnnkhj0Bv0zA+Ih
# IVAyPg7T8bqJRkGfOf5ugIH06fPVFj1KWuugiXNs1/M4/FLyBLsSJZbfvID+TVWO
# 2YjFBLDDVrOB7rw22KJYl4w1q+wfUUm05uRX5I+uLiRaT88l1MZHLwHg1nuL0Vm9
# t41X2xTOn4QeqxIXo1BbcVfiyjPogrU9xHUs2B1JyEVZWjv4VUwfOW0X3er1Ukwn
# Kqxsjg/2ikAT4oRjFgWnLsU0VoRDkkShhfVtC5pSB6v/v0gzgReQNqElCVcKwOHj
# fiTzbRRWHFwYzNwEqnSAhC+qB/zYXWg9KBF1DtVcWVLaHMXuLn0plnHWA/AoPZcl
# hc7HjClr15RcrHl6pcclBHtRBtJkX7jLlC7cAWkob+4Wp/QyVwIDAQABo4ICAjCC
# Af4wHwYDVR0jBBgwFoAUaDfg67Y7+F8Rhvv+YXsIiGX0TkIwHQYDVR0OBBYEFAa4
# CewhP0BkYi71XHKKI9o8p1BMMD0GA1UdIAQ2MDQwMgYFZ4EMAQMwKTAnBggrBgEF
# BQcCARYbaHR0cDovL3d3dy5kaWdpY2VydC5jb20vQ1BTMA4GA1UdDwEB/wQEAwIH
# gDATBgNVHSUEDDAKBggrBgEFBQcDAzCBtQYDVR0fBIGtMIGqMFOgUaBPhk1odHRw
# Oi8vY3JsMy5kaWdpY2VydC5jb20vRGlnaUNlcnRUcnVzdGVkRzRDb2RlU2lnbmlu
# Z1JTQTQwOTZTSEEzODQyMDIxQ0ExLmNybDBToFGgT4ZNaHR0cDovL2NybDQuZGln
# aWNlcnQuY29tL0RpZ2lDZXJ0VHJ1c3RlZEc0Q29kZVNpZ25pbmdSU0E0MDk2U0hB
# Mzg0MjAyMUNBMS5jcmwwgZQGCCsGAQUFBwEBBIGHMIGEMCQGCCsGAQUFBzABhhho
# dHRwOi8vb2NzcC5kaWdpY2VydC5jb20wXAYIKwYBBQUHMAKGUGh0dHA6Ly9jYWNl
# cnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFRydXN0ZWRHNENvZGVTaWduaW5nUlNB
# NDA5NlNIQTM4NDIwMjFDQTEuY3J0MAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQAD
# ggIBAISiRgUmPdqs8OdhLLJ8Blj9EmNwt3MNQszq45nw9ApvgRRXBYFTA/5JFJQv
# 4k3qqAeOlt0vbGnzDHVzWq7JEGJZrUn7qfkmj4jflPJ1c6iOCUZFb8+x+45K/9ks
# o4yS4Y3M2gCDKJMrKmgyhm/qZL2oXbViT3XB4iVYr/+eHLf+146UWYrYtR5clim9
# FM1tkXV9n4gk+h5FRgSDXoqSiwoyM60ziNutQAKsNAHjnazBWRluKwhtpVMRuHu8
# 1SbIeTJ/xz0F2P90vmMu2SBhtsnO4QL3uMznLJ6qvAQVfny/T2bMSSPROHIXSDvA
# qCThkA49Gi/5NXKmMs8ukZzLOkTEx8V5uKxEf4gI9q17oLYG8oX5e+FlldVpxRRf
# kru1RtPu4MCAzvLYTdLgk9Rovglztgic8gQNSQO/pjHX7zAZ5Ys+M4japyzrzhwK
# yCwfnKWAv8b+5pqSsJh4bdoXQtGBP/QOiKjD3+ip/D36hw4ZKYoVu5XJu+rnY+or
# 8dXYA9uaZYrVGLH16W8bidzPT3wCcBOWcod4WHQW+Rk2AoRLAj2Nj+TxwlDIDQkA
# SD/n7Sm0FLFzjBmPD5YfFu58jefNV2HW3aBFuM+1e0VyjuRPz+dmP0vG8HVL8ste
# NxL0ev/CF619Ef4FsUgUwTSV0IvDtgYkxlbtwuzHqYSWUFo4MYIZ5DCCGeACAQEw
# fTBpMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xQTA/BgNV
# BAMTOERpZ2lDZXJ0IFRydXN0ZWQgRzQgQ29kZSBTaWduaW5nIFJTQTQwOTYgU0hB
# Mzg0IDIwMjEgQ0ExAhAOG4Qdo7UmBpSv170eUaMrMA0GCWCGSAFlAwQCAQUAoHww
# EAYKKwYBBAGCNwIBDDECMAAwGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYK
# KwYBBAGCNwIBCzEOMAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIO/wuJ+o
# OTGnulUXc2BXWxRqgCVyy7p10zIyLkVpSCjVMA0GCSqGSIb3DQEBAQUABIIBgI/T
# bfjE8VmUzaDGyfpXSGmLw1eolzlzTW6c50yeexnqTLxyzPmRUNXFNLyQjJxoKiGY
# afSNapy+r5OZI4IPTtzSsqnwgwtsNPKXl4snqbuN9vvY9l9pBwB6Er3SInkkMo4i
# xs5OEaalGVVdGIURIRWrHM2T58rVdNldN+lJLbt42jNh0hw89ciAZXOKYM5wXu0e
# ywvEaZEIH8vo4/99nY90fa8/cftjCepiTX7o2fM2Zt0Yv0bDBLhqbQC1IxD4LW+l
# p82MY6IXA6ACzxTrUoWoJHZdfpevcPzM6oB2LtnbHaLfWKUnbgHB36I4a/R+l/kn
# x1OyQshVPvQx7enk8W34Voj2Gynpq6PPWuhIRc2jNX/eRVUCrJ/ACm+qSJpsDLML
# +xYrd00nfczZyt7R2VdYk3+l7ZConpeKpF60QVwquicmnVLc7P+Zl0cJJgf0SpPc
# RVpbo4oC0z25y8tGz/KKi/rFNh2tHmvvgrwp0rWPyuN1LGiShmYgdIBl0BdJ5KGC
# Fzowghc2BgorBgEEAYI3AwMBMYIXJjCCFyIGCSqGSIb3DQEHAqCCFxMwghcPAgED
# MQ8wDQYJYIZIAWUDBAIBBQAweAYLKoZIhvcNAQkQAQSgaQRnMGUCAQEGCWCGSAGG
# /WwHATAxMA0GCWCGSAFlAwQCAQUABCDbai0NWMGGv5xJekY8hw9TYAoWbNkxpchI
# F5iHrOjjyQIRAM88bqXvfiXeCGxWTSTTkawYDzIwMjQxMDMxMjMwNjM3WqCCEwMw
# gga8MIIEpKADAgECAhALrma8Wrp/lYfG+ekE4zMEMA0GCSqGSIb3DQEBCwUAMGMx
# CzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5EaWdpQ2VydCwgSW5jLjE7MDkGA1UEAxMy
# RGlnaUNlcnQgVHJ1c3RlZCBHNCBSU0E0MDk2IFNIQTI1NiBUaW1lU3RhbXBpbmcg
# Q0EwHhcNMjQwOTI2MDAwMDAwWhcNMzUxMTI1MjM1OTU5WjBCMQswCQYDVQQGEwJV
# UzERMA8GA1UEChMIRGlnaUNlcnQxIDAeBgNVBAMTF0RpZ2lDZXJ0IFRpbWVzdGFt
# cCAyMDI0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvmpzn/aVIauW
# MLpbbeZZo7Xo/ZEfGMSIO2qZ46XB/QowIEMSvgjEdEZ3v4vrrTHleW1JWGErrjOL
# 0J4L0HqVR1czSzvUQ5xF7z4IQmn7dHY7yijvoQ7ujm0u6yXF2v1CrzZopykD07/9
# fpAT4BxpT9vJoJqAsP8YuhRvflJ9YeHjes4fduksTHulntq9WelRWY++TFPxzZrb
# ILRYynyEy7rS1lHQKFpXvo2GePfsMRhNf1F41nyEg5h7iOXv+vjX0K8RhUisfqw3
# TTLHj1uhS66YX2LZPxS4oaf33rp9HlfqSBePejlYeEdU740GKQM7SaVSH3TbBL8R
# 6HwX9QVpGnXPlKdE4fBIn5BBFnV+KwPxRNUNK6lYk2y1WSKour4hJN0SMkoaNV8h
# yyADiX1xuTxKaXN12HgR+8WulU2d6zhzXomJ2PleI9V2yfmfXSPGYanGgxzqI+Sh
# oOGLomMd3mJt92nm7Mheng/TBeSA2z4I78JpwGpTRHiT7yHqBiV2ngUIyCtd0pZ8
# zg3S7bk4QC4RrcnKJ3FbjyPAGogmoiZ33c1HG93Vp6lJ415ERcC7bFQMRbxqrMVA
# Niav1k425zYyFMyLNyE1QulQSgDpW9rtvVcIH7WvG9sqYup9j8z9J1XqbBZPJ5XL
# ln8mS8wWmdDLnBHXgYly/p1DhoQo5fkCAwEAAaOCAYswggGHMA4GA1UdDwEB/wQE
# AwIHgDAMBgNVHRMBAf8EAjAAMBYGA1UdJQEB/wQMMAoGCCsGAQUFBwMIMCAGA1Ud
# IAQZMBcwCAYGZ4EMAQQCMAsGCWCGSAGG/WwHATAfBgNVHSMEGDAWgBS6FtltTYUv
# cyl2mi91jGogj57IbzAdBgNVHQ4EFgQUn1csA3cOKBWQZqVjXu5Pkh92oFswWgYD
# VR0fBFMwUTBPoE2gS4ZJaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0
# VHJ1c3RlZEc0UlNBNDA5NlNIQTI1NlRpbWVTdGFtcGluZ0NBLmNybDCBkAYIKwYB
# BQUHAQEEgYMwgYAwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNv
# bTBYBggrBgEFBQcwAoZMaHR0cDovL2NhY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lD
# ZXJ0VHJ1c3RlZEc0UlNBNDA5NlNIQTI1NlRpbWVTdGFtcGluZ0NBLmNydDANBgkq
# hkiG9w0BAQsFAAOCAgEAPa0eH3aZW+M4hBJH2UOR9hHbm04IHdEoT8/T3HuBSyZe
# q3jSi5GXeWP7xCKhVireKCnCs+8GZl2uVYFvQe+pPTScVJeCZSsMo1JCoZN2mMew
# /L4tpqVNbSpWO9QGFwfMEy60HofN6V51sMLMXNTLfhVqs+e8haupWiArSozyAmGH
# /6oMQAh078qRh6wvJNU6gnh5OruCP1QUAvVSu4kqVOcJVozZR5RRb/zPd++PGE3q
# F1P3xWvYViUJLsxtvge/mzA75oBfFZSbdakHJe2BVDGIGVNVjOp8sNt70+kEoMF+
# T6tptMUNlehSR7vM+C13v9+9ZOUKzfRUAYSyyEmYtsnpltD/GWX8eM70ls1V6QG/
# ZOB6b6Yum1HvIiulqJ1Elesj5TMHq8CWT/xrW7twipXTJ5/i5pkU5E16RSBAdOp1
# 2aw8IQhhA/vEbFkEiF2abhuFixUDobZaA0VhqAsMHOmaT3XThZDNi5U2zHKhUs5u
# HHdG6BoQau75KiNbh0c+hatSF+02kULkftARjsyEpHKsF7u5zKRbt5oK5YGwFvgc
# 4pEVUNytmB3BpIiowOIIuDgP5M9WArHYSAR16gc0dP2XdkMEP5eBsX7bf/MGN4K3
# HP50v/01ZHo/Z5lGLvNwQ7XHBx1yomzLP8lx4Q1zZKDyHcp4VQJLu2kWTsKsOqQw
# ggauMIIElqADAgECAhAHNje3JFR82Ees/ShmKl5bMA0GCSqGSIb3DQEBCwUAMGIx
# CzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
# dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lDZXJ0IFRydXN0ZWQgUm9vdCBH
# NDAeFw0yMjAzMjMwMDAwMDBaFw0zNzAzMjIyMzU5NTlaMGMxCzAJBgNVBAYTAlVT
# MRcwFQYDVQQKEw5EaWdpQ2VydCwgSW5jLjE7MDkGA1UEAxMyRGlnaUNlcnQgVHJ1
# c3RlZCBHNCBSU0E0MDk2IFNIQTI1NiBUaW1lU3RhbXBpbmcgQ0EwggIiMA0GCSqG
# SIb3DQEBAQUAA4ICDwAwggIKAoICAQDGhjUGSbPBPXJJUVXHJQPE8pE3qZdRodbS
# g9GeTKJtoLDMg/la9hGhRBVCX6SI82j6ffOciQt/nR+eDzMfUBMLJnOWbfhXqAJ9
# /UO0hNoR8XOxs+4rgISKIhjf69o9xBd/qxkrPkLcZ47qUT3w1lbU5ygt69OxtXXn
# HwZljZQp09nsad/ZkIdGAHvbREGJ3HxqV3rwN3mfXazL6IRktFLydkf3YYMZ3V+0
# VAshaG43IbtArF+y3kp9zvU5EmfvDqVjbOSmxR3NNg1c1eYbqMFkdECnwHLFuk4f
# sbVYTXn+149zk6wsOeKlSNbwsDETqVcplicu9Yemj052FVUmcJgmf6AaRyBD40Nj
# gHt1biclkJg6OBGz9vae5jtb7IHeIhTZgirHkr+g3uM+onP65x9abJTyUpURK1h0
# QCirc0PO30qhHGs4xSnzyqqWc0Jon7ZGs506o9UD4L/wojzKQtwYSH8UNM/STKvv
# mz3+DrhkKvp1KCRB7UK/BZxmSVJQ9FHzNklNiyDSLFc1eSuo80VgvCONWPfcYd6T
# /jnA+bIwpUzX6ZhKWD7TA4j+s4/TXkt2ElGTyYwMO1uKIqjBJgj5FBASA31fI7tk
# 42PgpuE+9sJ0sj8eCXbsq11GdeJgo1gJASgADoRU7s7pXcheMBK9Rp6103a50g5r
# mQzSM7TNsQIDAQABo4IBXTCCAVkwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4E
# FgQUuhbZbU2FL3MpdpovdYxqII+eyG8wHwYDVR0jBBgwFoAU7NfjgtJxXWRM3y5n
# P+e6mK4cD08wDgYDVR0PAQH/BAQDAgGGMBMGA1UdJQQMMAoGCCsGAQUFBwMIMHcG
# CCsGAQUFBwEBBGswaTAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQu
# Y29tMEEGCCsGAQUFBzAChjVodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGln
# aUNlcnRUcnVzdGVkUm9vdEc0LmNydDBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8v
# Y3JsMy5kaWdpY2VydC5jb20vRGlnaUNlcnRUcnVzdGVkUm9vdEc0LmNybDAgBgNV
# HSAEGTAXMAgGBmeBDAEEAjALBglghkgBhv1sBwEwDQYJKoZIhvcNAQELBQADggIB
# AH1ZjsCTtm+YqUQiAX5m1tghQuGwGC4QTRPPMFPOvxj7x1Bd4ksp+3CKDaopafxp
# wc8dB+k+YMjYC+VcW9dth/qEICU0MWfNthKWb8RQTGIdDAiCqBa9qVbPFXONASIl
# zpVpP0d3+3J0FNf/q0+KLHqrhc1DX+1gtqpPkWaeLJ7giqzl/Yy8ZCaHbJK9nXzQ
# cAp876i8dU+6WvepELJd6f8oVInw1YpxdmXazPByoyP6wCeCRK6ZJxurJB4mwbfe
# Kuv2nrF5mYGjVoarCkXJ38SNoOeY+/umnXKvxMfBwWpx2cYTgAnEtp/Nh4cku0+j
# Sbl3ZpHxcpzpSwJSpzd+k1OsOx0ISQ+UzTl63f8lY5knLD0/a6fxZsNBzU+2QJsh
# IUDQtxMkzdwdeDrknq3lNHGS1yZr5Dhzq6YBT70/O3itTK37xJV77QpfMzmHQXh6
# OOmc4d0j/R0o08f56PGYX/sr2H7yRp11LB4nLCbbbxV7HhmLNriT1ObyF5lZynDw
# N7+YAN8gFk8n+2BnFqFmut1VwDophrCYoCvtlUG3OtUVmDG0YgkPCr2B2RP+v6TR
# 81fZvAT6gt4y3wSJ8ADNXcL50CN/AAvkdgIm2fBldkKmKYcJRyvmfxqkhQ/8mJb2
# VVQrH4D6wPIOK+XW+6kvRBVK5xMOHds3OBqhK/bt1nz8MIIFjTCCBHWgAwIBAgIQ
# DpsYjvnQLefv21DiCEAYWjANBgkqhkiG9w0BAQwFADBlMQswCQYDVQQGEwJVUzEV
# MBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29t
# MSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMjIwODAx
# MDAwMDAwWhcNMzExMTA5MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMM
# RGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQD
# ExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0GCSqGSIb3DQEBAQUAA4IC
# DwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEppz1Yq3aa
# za57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllV
# cq9ok3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT
# +CFhmzTrBcZe7FsavOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd
# 463JT17lNecxy9qTXtyOj4DatpGYQJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+
# EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6MUSaM0C/CNdaSaTC5qmgZ92k
# J7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtmmnTK3kse5w5j
# rubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7
# f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJU
# KSWJbOUOUlFHdL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+wh
# X8QgUWtvsauGi0/C1kVfnSD8oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQAB
# o4IBOjCCATYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5n
# P+e6mK4cD08wHwYDVR0jBBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDgYDVR0P
# AQH/BAQDAgGGMHkGCCsGAQUFBwEBBG0wazAkBggrBgEFBQcwAYYYaHR0cDovL29j
# c3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRwOi8vY2FjZXJ0cy5kaWdp
# Y2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3J0MEUGA1UdHwQ+MDww
# OqA4oDaGNGh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJ
# RFJvb3RDQS5jcmwwEQYDVR0gBAowCDAGBgRVHSAAMA0GCSqGSIb3DQEBDAUAA4IB
# AQBwoL9DXFXnOF+go3QbPbYW1/e/Vwe9mqyhhyzshV6pGrsi+IcaaVQi7aSId229
# GhT0E0p6Ly23OO/0/4C5+KH38nLeJLxSA8hO0Cre+i1Wz/n096wwepqLsl7Uz9FD
# RJtDIeuWcqFItJnLnU+nBgMTdydE1Od/6Fmo8L8vC6bp8jQ87PcDx4eo0kxAGTVG
# amlUsLihVo7spNU96LHc/RzY9HdaXFSMb++hUD38dglohJ9vytsgjTVgHAIDyyCw
# rFigDkBjxZgiwbJZ9VVrzyerbHbObyMt9H5xaiNrIv8SuFQtJ37YOtnwtoeW/VvR
# XKwYw02fc7cBqZ9Xql4o4rmUMYIDdjCCA3ICAQEwdzBjMQswCQYDVQQGEwJVUzEX
# MBUGA1UEChMORGlnaUNlcnQsIEluYy4xOzA5BgNVBAMTMkRpZ2lDZXJ0IFRydXN0
# ZWQgRzQgUlNBNDA5NiBTSEEyNTYgVGltZVN0YW1waW5nIENBAhALrma8Wrp/lYfG
# +ekE4zMEMA0GCWCGSAFlAwQCAQUAoIHRMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0B
# CRABBDAcBgkqhkiG9w0BCQUxDxcNMjQxMDMxMjMwNjM3WjArBgsqhkiG9w0BCRAC
# DDEcMBowGDAWBBTb04XuYtvSPnvk9nFIUIck1YZbRTAvBgkqhkiG9w0BCQQxIgQg
# v9MUtidp+yVek8x/t34ymR2lXAcj14Lbv1HE4xG76/cwNwYLKoZIhvcNAQkQAi8x
# KDAmMCQwIgQgdnafqPJjLx9DCzojMK7WVnX+13PbBdZluQWTmEOPmtswDQYJKoZI
# hvcNAQEBBQAEggIArB3LGLILvIm5tnHgcxT/x3kzgNzGrWHykFezjNg0QTUz4u4j
# i+10VDmEM4aC4Vdzoxqtk4JI7b9FPz+qe9A/FHBvFzkzpTTBQu3goptaveT8EDHc
# s49qIrAWbFJEvzJ01Z0NycUQwX1hGOs0XNjGVjmh3hB4lJ1dFtDkZchX0R1iXhVp
# SOfrQvjo2lQAufR/ZoIBcgxrNZ+alTDFHs6wuDD52f+W7m6EK4OuGLFlkcHCu3Ah
# CcjOEjTLfBZQCHTkm0Rz5nmB6nFcSgEEBsipfedvMLmuWBE82dPHZxoORanKYqfD
# 8LbH76Rsj83VPmfYWS9dtxle9ZA2vvRTF05CfP0Tjo6SJpbCfz3JnE9/EVM+ix62
# jVnJg0TKW2C/SPMQDgao6tV5F1+GWg3Cf5493JxuhfJqLLpqMsXnp4G9djrAsht8
# aBDcqjyF5Dla5DChv0DR2FVU0SSvwPgr7sd20fBO+1DaOQd7P4dPeV2R1OUpa/oy
# qxt5uB4sV1tjZgHFhCKKcRWw+N2ovX3aWShefS2X+zeDcySchKwHG35Wkk6MLJDz
# slSeIbh0PfEayV59rLTemF7hE9Coz5PvIitg9AbPXayTcG9k4MW8sM4XExk2hV0Y
# DlEQIyTGrFDjo7H7Z59NJbsz97wbMSv5U3DB3mqWhCChcSgcC0iSD/ubKnQ=
# SIG # End signature block