DeprecatedApiTranslator/vSphereRestApiTranslation.ps1

# Unhandled cases that algorithm is going to fail:

#
# 1.
# "OldPath": "/rest/appliance/recovery/backup/schedules/{schedule}"
# "NewPath": "/api/appliance/recovery/backup/schedules"

#
# 2.
# "OldPath": "/rest/appliance/recovery/backup/system-name/{system_name}/archives",
# "NewPath": "/api/appliance/recovery/backup/system-name/{system_name}/archives?action=list",

#
# 3. Structure with sefref properties
#

#
# 4. Query parameters
#

# The algorithm searches for matching substructs in the translation scheme
# comparing the first property of the Old and New structure scheme
# There is a risk of wrong translation if in the New structure scheme
# a property is added in front. Meaning the New APIs extend existing structure
# with new property added on the first position.

# Import All Translation Function
. (Join-Path $PSScriptRoot 'CommonAPITranslation.ps1')
. (Join-Path $PSScriptRoot 'InputTransformation.ps1')

$script:apiToTranslationFunction = @{}

# Example Function Registration

# $script:apiToTranslationFunction['post./api/appliance/recovery/backup/system-name/{system_name}/archives?action=list'] = @{
# 'ConvertToDeprecatedBody' = (Get-Command -Name 'ConvertTo-DeprecatedBodyApplianceRecoveryBackupList')
# 'ConvertFromDeprecatedBody' = $null
# 'ConvertDeprecatedQueryParam' = $null
# }

function Get-ConvertToDeprecatedBodyTranslationFunction {
    param(
        [Parameter()]
        [PSCustomObject]
        $OperationTranslateSchema)

    if ($OperationTranslateSchema -ne $null -and `
            $OperationTranslateSchema.NewVerb -ne $null -and `
            $OperationTranslateSchema.NewPath -ne $null) {

        $apiToTranslationFunctionKey = "$($OperationTranslateSchema.NewVerb).$($OperationTranslateSchema.NewPath)"
        if ($script:apiToTranslationFunction.ContainsKey($apiToTranslationFunctionKey) -and `
                $script:apiToTranslationFunction[$apiToTranslationFunctionKey]['ConvertToDeprecatedBody'] -ne $null) {

            return $script:apiToTranslationFunction[$apiToTranslationFunctionKey]['ConvertToDeprecatedBody']
        }
        else {
            return (Get-Command -Name 'ConvertTo-DeprecatedBodyCommon')
        }
    }
}

function Get-ConvertFromDeprecatedBodyTranslationFunction {
    param(
        [Parameter()]
        [PSCustomObject]
        $OperationTranslateSchema)

    if ($OperationTranslateSchema -ne $null -and `
            $OperationTranslateSchema.NewVerb -ne $null -and `
            $OperationTranslateSchema.NewPath -ne $null) {

        $apiToTranslationFunctionKey = "$($OperationTranslateSchema.NewVerb).$($OperationTranslateSchema.NewPath)"
        if ($script:apiToTranslationFunction.ContainsKey($apiToTranslationFunctionKey) -and `
                $script:apiToTranslationFunction[$apiToTranslationFunctionKey]['ConvertFromDeprecatedBody'] -ne $null) {

            return $script:apiToTranslationFunction[$apiToTranslationFunctionKey]['ConvertFromDeprecatedBody']
        }
        else {
            return (Get-Command -Name 'ConvertFrom-DeprecatedBodyCommon')
        }
    }
}

function Get-ConvertDeprecatedQueryParamTranslationFunction {
    param(
        [Parameter()]
        [PSCustomObject]
        $OperationTranslateSchema)

    if ($OperationTranslateSchema -ne $null -and `
            $OperationTranslateSchema.NewVerb -ne $null -and `
            $OperationTranslateSchema.NewPath -ne $null) {

        $apiToTranslationFunctionKey = "$($OperationTranslateSchema.NewVerb).$($OperationTranslateSchema.NewPath)"
        if ($script:apiToTranslationFunction.ContainsKey($apiToTranslationFunctionKey) -and `
                $script:apiToTranslationFunction[$apiToTranslationFunctionKey]['ConvertDeprecatedQueryParam'] -ne $null) {

            return $script:apiToTranslationFunction[$apiToTranslationFunctionKey]['ConvertDeprecatedQueryParam']
        }
        else {
            return (Get-Command -Name 'ConvertTo-DeprecatedQueryParamCommon')
        }
    }
}

function Read-OperationTranslationSchema {
    param(
        [Parameter(Mandatory = $true)]
        [ValidateScript( { Test-Path $_ })]
        [string]
        $TranslationSchemeFilePath
    )

    Get-Content $TranslationSchemeFilePath -Raw | ConvertFrom-JsonX -Depth 100
}

$script:translationSchema = $null
function Load-OperationTranslationSchema {
    if (-not $script:translationSchema)    {
        $script:translationSchema = Read-OperationTranslationSchema (Join-Path $PSScriptRoot 'translation-scheme.json')
    }
}

function Get-OperationTranslationSchema {
    param(
        [Parameter()]
        [string]
        $operationPath = $null,

        [Parameter()]
        [string]
        $operationVerb = $null)

    Load-OperationTranslationSchema

    $script:translationSchema | Where-Object {
        ([string]::IsNullOrEmpty($operationPath) -or $_.NewPath -eq $operationPath) -and `
        ([string]::IsNullOrEmpty($operationVerb) -or $_.NewVerb -eq $operationVerb)
    }
}

function Convert-OutputBody {
    <#
    .SYNOPSIS
    Converts Body Output object from Deprecated APIs to New APIs
 
    .PARAMETER OperationTranslateSchema
    Translation Schema Object retrieved from Get-OperationTranslationSchema
 
    .PARAMETER OperationOutputObject
    API Operation Ouput Body Object to translate
#>

    param(
        [Parameter()]
        [PSCustomObject]
        $OperationTranslateSchema,

        [Parameter()]
        [PSCustomObject]
        $OperationOutputObject
    )
    $translationFunction = Get-ConvertFromDeprecatedBodyTranslationFunction -OperationTranslateSchema $OperationTranslateSchema
    & $translationFunction -OperationTranslateSchema $OperationTranslateSchema -OperationOutputObject $OperationOutputObject
}

function ConvertTo-DeprecatedBody {
    <#
    .SYNOPSIS
    Converts Body Parameter object from new APIs to Deprecated APIs
 
    .PARAMETER OperationTranslateSchema
    Translation Schema Object retrieved from Get-OperationTranslationSchema
 
    .PARAMETER OperationQueryInputObject
    API Operation Input Body Parameter Object to translate
#>

    param(
        [Parameter()]
        [PSCustomObject]
        $OperationTranslateSchema,

        [Parameter()]
        [PSCustomObject]
        $OperationInputObject
    )
    $translationFunction = Get-ConvertToDeprecatedBodyTranslationFunction -OperationTranslateSchema $OperationTranslateSchema
    & $translationFunction -OperationTranslateSchema $OperationTranslateSchema -OperationInputObject $OperationInputObject
}

function ConvertTo-DeprecatedQueryParam {
<#
    .SYNOPSIS
    Converts Query Param object from new APIs to Deprecated APIs
 
    .PARAMETER OperationTranslateSchema
    Translation Schema Object retrieved from Get-OperationTranslationSchema
 
    .PARAMETER OperationQueryInputObject
    API Operation Input Query Parameter Object to translate
#>

    param(
        [Parameter()]
        [PSCustomObject]
        $OperationTranslateSchema,

        [Parameter()]
        [PSCustomObject]
        $OperationQueryInputObject
    )

    $translationFunction = Get-ConvertDeprecatedQueryParamTranslationFunction -OperationTranslateSchema $OperationTranslateSchema
    & $translationFunction -OperationTranslateSchema $OperationTranslateSchema -OperationQueryInputObject $OperationQueryInputObject
}

function Convert-InputStructure {
    param(
        [Parameter()]
        [PSCustomObject]
        $OperationTranslateSchema,

        [Parameter()]
        [PSCustomObject]
        $OperationInputObject,

        [Parameter()]
        [ValidateSet('Body', 'Query')]
        [string]
        $InputType
    )

    if (
        $null -ne $OperationTranslateSchema.OldInQueryParams -and
        $null -eq $OperationTranslateSchema.OldInBodyStruct -and
        $null -eq $OperationTranslateSchema.NewInQueryParams -and
        $null -ne $OperationTranslateSchema.NewInBodyStruct -and
        $InputType -eq 'Query'
    ) {
        # Old operation has input in query that is migrated to body in the New APIs
        # Convert Body to Query

        $translationSchema = [PSCustomObject]@{
            'OldVerb' = $OperationTranslateSchema.OldVerb
            'NewVerb' = $OperationTranslateSchema.NewVerb
            'OldPath' = $OperationTranslateSchema.OldPath
            'NewPath' = $OperationTranslateSchema.NewPath
            'OldInQueryParams' = $OperationTranslateSchema.OldInQueryParams
            'NewInQueryParams' = $OperationTranslateSchema.NewInBodyStruct
        }

        # return
        (ConvertTo-DeprecatedQueryParam -OperationTranslateSchema $translationSchema -OperationQueryInputObject $OperationInputObject)
    }

    if (
        $null -eq $OperationTranslateSchema.OldInQueryParams -and
        $null -ne $OperationTranslateSchema.OldInBodyStruct -and
        $null -ne $OperationTranslateSchema.NewInQueryParams -and
        $null -eq $OperationTranslateSchema.NewInBodyStruct -and
        $InputType -eq 'Body'
    ) {
        # Old operation has input in body that is migrated to Query Params in the New APIs
        # Convert Query to Body

        $translationSchema = [PSCustomObject]@{
            'OldVerb' = $OperationTranslateSchema.OldVerb
            'NewVerb' = $OperationTranslateSchema.NewVerb
            'OldPath' = $OperationTranslateSchema.OldPath
            'NewPath' = $OperationTranslateSchema.NewPath
            'OldInBodyStruct' = $OperationTranslateSchema.OldInBodyStruct
            'NewInBodyStruct' = $OperationTranslateSchema.NewInQueryParams
        }

        $queryInputParameter = $OperationInputObject
        $oldStructProps = $translationSchema.OldInBodyStruct | Get-Member -MemberType NoteProperty

        # Handles query input parameter which is array.
        if (
            $OperationInputObject -is [array] -and
            $OperationInputObject.Count -gt 0 -and
            $oldStructProps.Count -eq 1 -and
            $translationSchema.NewInBodyStruct.Count -eq 1 -and
            $oldStructProps[0].Name -eq $translationSchema.NewInBodyStruct[0]
        ) {
            $queryInputParameter = [PSCustomObject] @{
                $translationSchema.NewInBodyStruct[0] = $OperationInputObject
            }
        }

        # return
        (ConvertTo-DeprecatedBody -OperationTranslateSchema $translationSchema -OperationInputObject $queryInputParameter)
    }

    if (
        $null -eq $OperationTranslateSchema.OldInQueryParams -and
        $null -ne $OperationTranslateSchema.OldInBodyStruct -and
        $null -eq $OperationTranslateSchema.NewInQueryParams -and
        $null -ne $OperationTranslateSchema.NewInBodyStruct -and
        $InputType -eq 'Body'
    ) {
        # Convert Body to Body
        # return
        (ConvertTo-DeprecatedBody -OperationTranslateSchema $OperationTranslateSchema -OperationInputObject $OperationInputObject)
    }

    if (
        $null -ne $OperationTranslateSchema.OldInQueryParams -and
        $null -eq $OperationTranslateSchema.OldInBodyStruct -and
        $null -ne $OperationTranslateSchema.NewInQueryParams -and
        $null -eq $OperationTranslateSchema.NewInBodyStruct -and
        $InputType -eq 'Query'
    ) {
        # Convert Query to Query
        # return
        (ConvertTo-DeprecatedQueryParam -OperationTranslateSchema $OperationTranslateSchema -OperationQueryInputObject $OperationInputObject)
    }
}

# SIG # Begin signature block
# MIIp0AYJKoZIhvcNAQcCoIIpwTCCKb0CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAPUgSTCsdjIQuv
# I3FxXJTa8np+So3sH38nK9JMfa8Es6CCDrwwggawMIIEmKADAgECAhAIr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