<service-logic
    xmlns='http://www.onap.org/sdnc/svclogic'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
    <method rpc='sdwan-get-wan-param' mode='sync'>
        <block atomic="true">
            <for index="idx" start="0" end="`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`">
                <block>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name  == 'id'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.id' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'name'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.name' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name  == 'description'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.description' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'deviceName'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.deviceName' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'portType'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.portType' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'apn'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.apn-name' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'portNumber'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.portNumber' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'ipAddress'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.ipAddress' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'providerIpAddress'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.providerIpAddress' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'vlanId'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.vlanId' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'transportNetworkName'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.transportNetworkName' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'inputBandwidth'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.inputBandwidth' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'outputBandwidth'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.outputBandwidth' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'devicePortId'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.devicePortId' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'wanPortId'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.wanPortId' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'publicIP'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.publicIP' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'IPMode'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.wan.IPMode' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <return status='success'>
                        <parameter name="ack-final-indicator" value="Y" />
                        <parameter name="error-code" value="200" />
                        <parameter name="error-message" value="`$error-message`" />
                    </return>
                </block>
            </for>
        </block>
    </method>
</service-logic>