class VfModuleTopologyOperationRequestMapper {

    public GenericResourceApiVfModuleOperationInformation reqMapper(SDNCSvcOperation svcOperation,
            SDNCSvcAction svcAction, VfModule vfModule, VolumeGroup volumeGroup, GenericVnf vnf,
            ServiceInstance serviceInstance, Customer customer, CloudRegion cloudRegion, RequestContext requestContext,
            String sdncAssignResponse, URI callbackURL) throws MapperException {
        GenericResourceApiVfModuleOperationInformation req = new GenericResourceApiVfModuleOperationInformation();

        boolean includeModelInformation = false;

        GenericResourceApiRequestActionEnumeration requestAction =
                GenericResourceApiRequestActionEnumeration.CREATEVFMODULEINSTANCE;
        GenericResourceApiSvcActionEnumeration genericResourceApiSvcAction =
                GenericResourceApiSvcActionEnumeration.ASSIGN;

        if (svcAction.equals(SDNCSvcAction.ACTIVATE)) {
            genericResourceApiSvcAction = GenericResourceApiSvcActionEnumeration.ACTIVATE;
            requestAction = GenericResourceApiRequestActionEnumeration.CREATEVFMODULEINSTANCE;
            includeModelInformation = true;
        } else if (svcAction.equals(SDNCSvcAction.ASSIGN)) {
            genericResourceApiSvcAction = GenericResourceApiSvcActionEnumeration.ASSIGN;
            requestAction = GenericResourceApiRequestActionEnumeration.CREATEVFMODULEINSTANCE;
            includeModelInformation = true;
        } else if (svcAction.equals(SDNCSvcAction.DEACTIVATE)) {
            genericResourceApiSvcAction = GenericResourceApiSvcActionEnumeration.DEACTIVATE;
            requestAction = GenericResourceApiRequestActionEnumeration.DELETEVFMODULEINSTANCE;
            includeModelInformation = false;
        } else if (svcAction.equals(SDNCSvcAction.DELETE)) {
            genericResourceApiSvcAction = GenericResourceApiSvcActionEnumeration.DELETE;
            requestAction = GenericResourceApiRequestActionEnumeration.DELETEVFMODULEINSTANCE;
            includeModelInformation = false;
        } else if (svcAction.equals(SDNCSvcAction.UNASSIGN)) {
            genericResourceApiSvcAction = GenericResourceApiSvcActionEnumeration.UNASSIGN;
            requestAction = GenericResourceApiRequestActionEnumeration.DELETEVFMODULEINSTANCE;
            includeModelInformation = false;
        } else if (svcAction.equals(SDNCSvcAction.CHANGE_ASSIGN)) {
            genericResourceApiSvcAction = GenericResourceApiSvcActionEnumeration.CHANGEASSIGN;
            requestAction = GenericResourceApiRequestActionEnumeration.CREATEVFMODULEINSTANCE;
            includeModelInformation = true;
        }

        String sdncReqId = UUID.randomUUID().toString();
        String msoRequestId = UUID.randomUUID().toString();
        if (requestContext != null && requestContext.getMsoRequestId() != null) {
            msoRequestId = requestContext.getMsoRequestId();
        }

        GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper
                .buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, requestAction);
        GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper
                .buildServiceInformation(serviceInstance, requestContext, customer, includeModelInformation);
        GenericResourceApiVnfinformationVnfInformation vnfInformation =
                generalTopologyObjectMapper.buildVnfInformation(vnf, serviceInstance, includeModelInformation);
        GenericResourceApiVfmoduleinformationVfModuleInformation vfModuleInformation = generalTopologyObjectMapper
                .buildVfModuleInformation(vfModule, vnf, serviceInstance, requestContext, includeModelInformation);
        GenericResourceApiVfmodulerequestinputVfModuleRequestInput vfModuleRequestInput =
                buildVfModuleRequestInput(vfModule, volumeGroup, cloudRegion, requestContext);
        GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader =
                buildVfModuleSdncRequestHeader(sdncReqId, genericResourceApiSvcAction, callbackURL);

        req.setRequestInformation(requestInformation);
        req.setSdncRequestHeader(sdncRequestHeader);
        req.setServiceInformation(serviceInformation);
        req.setVnfInformation(vnfInformation);
        req.setVfModuleInformation(vfModuleInformation);
        req.setVfModuleRequestInput(vfModuleRequestInput);

        return req;
    }

}