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
# MIIpiAYJKoZIhvcNAQcCoIIpeTCCKXUCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAPUgSTCsdjIQuv
# I3FxXJTa8np+So3sH38nK9JMfa8Es6CCDnQwggawMIIEmKADAgECAhAIr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